Changelog History
-
v0.4.0 Changes
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
withliteralToken
andregexToken
- ๐
-
v0.3.2 Changes
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
- ๐ Fixed
-
v0.3.1 Changes
October 29, 2017What'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>
toParser<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 rawString
instead of aPattern
. The default tokenizer implementation is now namedDefaultTokenizer
.๐
Parser<T>
properties now can be delegated insideGrammar
, which will store them into the the newdeclaredParsers
property;Optimizations of built-in combinators;
Regex parameters of
Token
factory functions annoteted for IntelliJ IDEA regex language injection;Names for
Token
s are no more necessary.Migration notes:
0๏ธโฃ If you used
Lexer
explicitly, useDefaultTokenizer
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 theGrammar
s toval p by someParser
. -
v0.2.1 Changes
August 01, 2017- ๐ Change JVM target to 1.6 to make
better-parse
compatible with Android
- ๐ Change JVM target to 1.6 to make
-
v0.2 Changes
July 12, 2017๐ Change the semantics of
and
chains: when there's only one non-skipped operandParser<T>
, the whole chain is now typed asParser<T>
, notParser<Tuple1<T>>
โ Add operator equivalents:
a * b
fora and b
, and-a
forskip(a)
.