Topic summary
The lexer hack
Extracted from the Wikipedia article Lexer hack.
The lexer hack is frowned upon in modern compilers as it creates tight coupling between otherwise largely independent steps in the compilation process. Instead, identifier-like tokens are tokenized as identifiers and later disambiguated by the parser, allowing cleaner separation of concerns.