All Versions
5
Latest Version
Avg Release Cycle
271 days
Latest Release
198 days ago

Changelog History

  • v0.4.0

    July 01, 2020
    • ๐Ÿ“œ better-parse is now a multiplatform library! All Kotlin targets are supported;
    • โšก๏ธ Optimize tokenization and parsing, thanks @orangy for his help!
    • Replace token with literalToken and regexToken
  • v0.3.2

    December 02, 2017
    • ๐Ÿ›  Fixed Regex / Pattern converted to their string representations with loss of flags;
    • ๐Ÿ“œ Made Parsed<T>.remainder public;
    • โšก๏ธ Optimized TokenizerMatchesSequence to avoid redundant objects allocation
  • v0.3.1

    October 29, 2017

    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

    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.

  • v0.2.1

    August 01, 2017
    • ๐Ÿ”„ Change JVM target to 1.6 to make better-parse compatible with Android
  • v0.2

    July 12, 2017

    ๐Ÿ”„ 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).