Skip to content

0.3.1

Compare
Choose a tag to compare
@h0tk3y h0tk3y released this 29 Oct 14:06
· 93 commits to master since this release

What's new:

  • 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;

    image

  • 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.