2 ms·
Thanks. That clears it up a lot. The example of using the same tokens but for different purposes makes it clear that the lexer shouldn't be in the business of
by justin_oaks 3y ago
Thanks. That clears it up a lot.
The example of using the same tokens but for different purposes makes it clear that the lexer shouldn't be in the business of assigning meaning (semantics) to the tokens, and the parser shouldn't be in the business of fiddling with characters when it's something the lexer can do.
- cellularmitosis 3y agoIf you have half an hour, this is worth a watch as well: https://www.destroyallsoftware.com/screencasts/catalog/a-compiler-from-scratch https://www.destroyallsoftware.com/screencasts/catalog/a-com...