Re: Am I parsing this correctly? (when do I build the symbol table)

glen herrmannsfeldt <gah@ugcs.caltech.edu>
Wed, 23 May 2007 10:58:01 -0800

          From comp.compilers

Related articles
[5 earlier articles]
Re: Am I parsing this correctly? (when do I build the symbol table) jeffrey.kenton@comcast.net (Jeff Kenton) (2007-05-19)
Re: Am I parsing this correctly? (when do I build the symbol table) gneuner2@comcast.net (George Neuner) (2007-05-19)
Re: Am I parsing this correctly? (when do I build the symbol table) 148f3wg02@sneakemail.com (Karsten Nyblad) (2007-05-20)
Re: Am I parsing this correctly? (when do I build the symbol table) ulimakesacompiler@googlemail.com (Uli Kusterer) (2007-05-20)
Re: Am I parsing this correctly? (when do I build the symbol table) chris.dollin@hp.com (Chris Dollin) (2007-05-21)
Re: Am I parsing this correctly? (when do I build the symbol table) ulimakesacompiler@googlemail.com (Uli Kusterer) (2007-05-22)
Re: Am I parsing this correctly? (when do I build the symbol table) gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-05-23)
Re: Am I parsing this correctly? (when do I build the symbol table) paul@paul-robinson.us (Paul Robinson) (2007-05-31)
| List of all articles for this month |

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


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.