Re: Parsing / Lexing question & P-code

Herwig Huener <Herwig.Huener@pgtm0035.mch.sni.de>
21 Apr 2000 23:03:50 -0400

          From comp.compilers

Related articles
Parsing / Lexing question & P-code lojedaortiz@interlink.com.ar (Nicolás) (2000-04-14)
Re: Parsing / Lexing question & P-code Herwig.Huener@pgtm0035.mch.sni.de (Herwig Huener) (2000-04-21)
Re: Parsing / Lexing question & P-code kst@cts.com (Keith Thompson) (2000-04-25)
Re: Parsing / Lexing question & P-code sebmol@gmx.net (Sebastian Moleski) (2000-04-25)
| List of all articles for this month |
From: Herwig Huener <Herwig.Huener@pgtm0035.mch.sni.de>
Newsgroups: comp.compilers
Date: 21 Apr 2000 23:03:50 -0400
Organization: Siemens Inc.
References: 00-04-100
Keywords: Pascal, symbols

Nicolás wrote:
>
> ...
>
> But recently I came up with another idea: instead of returning an ID
> for any identifier, I looked up the identifier in the lexer, and
> returned ID_UNKNOWN, ID_FUNCTION, etc ... This allowed me to have much
> less error checking and no conflicts in the bison grammar.
>
> I would appreciate any opinions as to which one is better.


Methinks when compiling Pascal, it is the most natural way that
the lexer peeks into the symbol table in order to know what he
(it?) has to return. That should be no problem for Pascal -
IMHO Pascal was designed to be analyzed easily this way.


Herwig


BTW: I just remembered the first name of the Pascal-Designer:
It's a small world, isn't it?


Post a followup to this message

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