0.3.1
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>
toParser<SyntaxTree<T>>
, see the Syntax trees section; -
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:
-
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
.