From: | glen herrmannsfeldt <gah@ugcs.caltech.edu> |
Newsgroups: | comp.compilers |
Date: | Wed, 23 May 2007 10:58:01 -0800 |
Organization: | Compilers Central |
References: | 07-05-067 07-05-072 07-05-078 07-05-081 |
Keywords: | parse, design |
Posted-Date: | 24 May 2007 14:51:04 EDT |
Uli Kusterer wrote:
> In some cases one can just design the language so it's easy to
> parse. But sometimes one has to implement a particular pre-defined
> language, or try to approximate some other language, and in those
> cases one can't or doesn't want to just change the language to make it
> easier to parse.
At some point there is the choice of easy to parse by computer
or easy to write by people. Some designers choose one, some choose
the other.
One design point is reserved words or no reserved words.
Choosing reserved words makes it easier to parse in many cases,
and some might argue easier for people to read. In many cases,
though, it makes it harder to write, especially with a large
language with many keywords which one might not normally need
to know.
COBOL has a very large list of reserved words, many of which
one might find useful as descriptive variable or subroutine
names. PL/I has no reserved words to remove this restriction
on the programmer.
-- glen
Return to the
comp.compilers page.
Search the
comp.compilers archives again.