better-parse

A nice parser combinator library for Kotlin

APACHE-2.0 License

Stars
412
Committers
7
better-parse - 0.4.4 Latest Release

Published by h0tk3y over 2 years ago

  • Fixed #51 (thanks a lot @InfectedBytes!)
  • Update Kotlin dependencies to 1.6.20
better-parse - 0.4.3

Published by h0tk3y almost 3 years ago

  • Fix reported range when an optional parser is lifted to an AST parser (thanks @Thomvis!)
  • Fix InvalidMutabilityException in RegexToken (thanks @itegulov!)
  • Use Kotlin 1.5.31
better-parse - 0.4.2

Published by h0tk3y over 3 years ago

  • Make the JVM RegexToken implementation thread-safe
  • Release JS IR artifacts along with the JS legacy ones
better-parse - 0.4.1

Published by h0tk3y almost 4 years ago

  • Updated to Kotlin 1.4.21 and new Multiplatform library publishing layout (no need to depend on platform modules or -metadata part)
  • Fixed issue #28
  • better-parse is now available on Maven Central
better-parse - 0.4.0

Published by h0tk3y over 4 years ago

  • 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
better-parse - 0.3.2

Published by h0tk3y almost 7 years ago

  • Fixed Regex / Pattern converted to their string representations with loss of flags;
  • Made Parsed<T>.remainder public;
  • Optimized TokenizerMatchesSequence to avoid redundant objects allocation
better-parse - 0.3.1

Published by h0tk3y almost 7 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;

    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.

better-parse - 0.2.1

Published by h0tk3y about 7 years ago

  • Change JVM target to 1.6 to make better-parse compatible with Android
better-parse - 0.2

Published by h0tk3y over 7 years ago

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

Package Rankings
Top 15.02% on Repo1.maven.org
Badges
Extracted from project README