|Parsing / Lexing question & P-code firstname.lastname@example.org (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 email@example.com (Keith Thompson) (2000-04-25)|
|Re: Parsing / Lexing question & P-code firstname.lastname@example.org (Sebastian Moleski) (2000-04-25)|
|From:||Herwig Huener <Herwig.Huener@pgtm0035.mch.sni.de>|
|Date:||21 Apr 2000 23:03:50 -0400|
> 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.
BTW: I just remembered the first name of the Pascal-Designer:
It's a small world, isn't it?
Return to the
Search the comp.compilers archives again.