DmitrySoshnikov / syntax

Syntactic analysis toolkit, language-agnostic parser generator.
MIT License
613 stars 88 forks source link

Expose lexer in parser semantic actions #36

Open DmitrySoshnikov opened 7 years ago

DmitrySoshnikov commented 7 years ago

We should provide an ability to access lexer (e.g. to change its state) from semantic actions of productions:

e: e + e { yy.lexer.pushState('condition'); ... }
DmitrySoshnikov commented 7 years ago