You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introducing syntax tree parsers that store the tree structure of the parsed input including the start/end positions of each tree node. Your parsers can automatically be transformed from Parser<T> to Parser<SyntaxTree<T>>, see the Syntax trees section;
Tokenizer interface to customize the default tokenizing behavior; To support tokenizer implementations that do not use Java regexes, Token now stores a raw String instead of a Pattern. The default tokenizer implementation is now named DefaultTokenizer.
Parser<T> properties now can be delegated inside Grammar, which will store them into the the new declaredParsers property;
Optimizations of built-in combinators;
Regex parameters of Token factory functions annoteted for IntelliJ IDEA regex language injection;
Names for Tokens are no more necessary.
Migration notes:
If you used Lexer explicitly, use DefaultTokenizer instead;
If you used Token::pattern, change to using the raw pattern string;
It is also good to change the val p = someParser declarations inside the Grammars to val p by someParser.
Change the semantics of and chains: when there's only one non-skipped operand Parser<T>, the whole chain is now typed as Parser<T>, not Parser<Tuple1<T>>
Add operator equivalents: a * b for a and b, and -a for skip(a).