3 ms·
Lexing should be strictly local and possible to do as a state machine that is reset after each token. So if something depends on the context, save it for the pa
by kryptiskt 3y ago
Lexing should be strictly local and possible to do as a state machine that is reset after each token. So if something depends on the context, save it for the parser.
- justin_oaks 3y agoYes, that makes sense. Chunks of text that don't depend on context is for the lexter, and context sensitive (i.e. "{" needs a matching "}" ) is for the parser