4 ms·
If Lexing is context sensitive and you have random access to your input, why not make it part of parsing by calling specific lexing functions based on the conte
by fjfaase 6y ago
If Lexing is context sensitive and you have random access to your input, why not make it part of parsing by calling specific lexing functions based on the context. (I have used this approach in https://github.com/FransFaase/IParse https://github.com/FransFaase/IParse and https://github.com/FransFaase/RawParser https://github.com/FransFaase/RawParser). You can implement some caching, for example with keywords, which usually require you to 'parse' an identifier and then check if it is a keyword.