Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lexer kernel: introducing two new APIs and augmenting the pre/post ca…
…llback set a la jison parser run-time: - `fastLex()`: return next match that has a token. Identical to the `lex()` API but does not invoke any of the `pre_lex()` nor any of the `post_lex()` callbacks. - `canIUse()`: return info about the lexer state that can help a parser or other lexer API user to use the most efficient means available. This API is provided to aid run-time performance for larger systems which employ this lexer. - now executes all `pre_lex()` and `post_lex()` callbacks provided as + member function, i.e. `lexer.pre_lex()` and `lexer.post_lex()` + member of the 'shared state' `yy` as passed to the lexer via the `setInput()` API, i.e. `lexer.yy.pre_lex()` and `lexer.yy.post_lex()` + member of the lexer options, i.e. `lexer.options.pre_lex()` and `lexer.options.post_lex()`
- Loading branch information