|building a lexer generator email@example.com (2006-11-29)|
|Re: building a lexer generator firstname.lastname@example.org (Karsten Nyblad) (2006-12-01)|
|Re: building a lexer generator email@example.com (2006-12-01)|
|Re: building a lexer generator DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-12-03)|
|Re: building a lexer generator firstname.lastname@example.org (2007-01-05)|
|From:||Hans-Peter Diettrich <DrDiettrich1@aol.com>|
|Date:||3 Dec 2006 21:31:36 -0500|
Karsten Nyblad wrote:
> of the regular expression you prefer to recognize, e.g., if a state can
> recognize a keyword and an identifier, you let the state recognize the
There exist cases where it is not wise to classify keywords immediately.
In C/C++ keywords can be used as macro identifiers, so that different
lexers would be required for an separate preprocessor, and for the
parser itself. Delphi/OPL defines "directives" along with keywords,
where directives are recognized only in a specific context, and
otherwise are ordinary identifiers.
In such cases it might be easier to detect keywords while looking up the
identifiers in the symbol table.
Return to the
Search the comp.compilers archives again.