Related articles |
---|
keywords and identifiers.. ash_nw@my-deja.com (1999-09-11) |
Re: keywords and identifiers.. wmm@fastdial.net (1999-09-16) |
Re: keywords and identifiers.. world!cfc@uunet.uu.net (Chris F Clark) (1999-09-16) |
Re: keywords and identifiers.. webid@asi.fr (Armel) (1999-09-16) |
Re: keywords and identifiers.. jerrold.leichter@smarts.com (Jerry Leichter) (1999-09-20) |
Re: keywords and identifiers.. genew@shuswap.net (1999-09-24) |
Re: keywords and identifiers.. delta-t@t-online.de (Leif Leonhardy) (1999-09-27) |
From: | "Armel" <webid@asi.fr> |
Newsgroups: | comp.compilers |
Date: | 16 Sep 1999 01:58:02 -0400 |
Organization: | WebID |
References: | 99-09-045 |
Keywords: | parse |
> Are there languages which allow a keyword to be
>accepted as an identifier.
Yes, most of the old (incomprehensible) languages did that (like PL/1
i think but i'm not sure, i'm not very used to obsolete languages).
the problem is to disambiguate certain situations... when you say
that :
if if = then then call call.
where 'if' is an 'int', 'then' too and 'call' a procedure : if there is a
syntactical error... how to get an your feet ? no way.
what you say about the technique is what i would do, but in case of errors i
would simply stop the compiler.
there are other tricks were, because of things like :
do if i = 0 then do = 0
neither the human reader nor the compiler understand anything because
the right context must be used to disambiguate (too often) and with
those languages right context means the whole remain of the file !
Return to the
comp.compilers page.
Search the
comp.compilers archives again.