better-parse v0.3.1 Release Notes

Release Date: 2017-10-29 // over 3 years ago
  • 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;


    0️⃣ 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:

    0️⃣ 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.