jison-lex
jison-lex copied to clipboard
[for reference] all work done which is not in original repo
Co-exists with zaach/jison#338.
Features / Fixes / Changes
- [to be edited]
- engine adds stop-gap check at lexer runtime to prevent user-programmer mistakes from causing obscure/hard-to-diagnose internal lexer crashes (#19) - see SHA-1: 57dd80420ed3c654a86e60b693d3714755d22fa7 (Check whether a sane condition has been pushed before: this makes the lexer robust against user-programmer bugs such as #19)
- fixes:
- #9 + #10 (undefined start conditions)
- #11 (faster exec of simple return statements via lookup table)
- #15 (CLI to lexer options: now its own CLI and jison CLI pass the options (filtered) to the lexer)
- #16 (no input location info passed to error: now lexer parseError receives a hash info object with location info and other context at the time of error, just like we already did in the parser)
- #16 + #17 (recursive
lex()call === stack overflow crash) - #19
- #23 (feed the API lexer rules' action code in the form of JavaScript arrow functions instead of classic JavaScript functions (
function () { return 'TOKEN'; }) or action code string ('return "TOKEN";')