|
|
|
|
|
by qznc
3835 days ago
|
|
There is a trick for parsing "indented" syntax which is not covered by this tutorial: the lexer (not the parser) keeps track of indentation. Lexer inserts Indent and Descent tokens, which the parser considers like { and } tokens in a C syntax language. Now your parser implements a context-free grammar although the language is not context-free. |
|