Next: , Up: Lexical analyzer



12.2.1 Lexer problems

Pascal is a language that's easy to lex and parse. Then came Borland ...

A number of their ad-hoc syntax extensions cause lexing or parsing problems, and even ambiguities. This lexer tries to solve them as well as possible, sometimes with clever rules, other times with gross hacks and with help from the parser. (And, BTW, it handles regular Pascal as well. ;-)

Some of the problems are (see also see Parsing conflicts):