|
|
|
|
|
by vstm
4720 days ago
|
|
Agreed. The lexer just recognizes tokens it does (usually/ideally) not know about the grammar, the parser checks if the "token stream" actually complies with the grammar. If the grammar allows for example "2x" as a "shortcut" for "2 * x" (if you parse mathematical expressions) it would make sense. Nitpick: Depending on the syntax the lexer might also yield 99f (float literal) and the identifier "oo". |
|