Published by h0tk3y almost 3 years ago
Published by h0tk3y over 3 years ago
RegexToken
implementation thread-safePublished by h0tk3y almost 4 years ago
-metadata
part)better-parse
is now available on Maven CentralPublished by h0tk3y over 4 years ago
better-parse
is now a multiplatform library! All Kotlin targets are supported;token
with literalToken
and regexToken
Published by h0tk3y almost 7 years ago
Regex
/ Pattern
converted to their string representations with loss of flags;Parsed<T>.remainder
public;TokenizerMatchesSequence
to avoid redundant objects allocationPublished by h0tk3y almost 7 years ago
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;
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 Token
s are no more necessary.
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 Grammar
s to val p by someParser
.
Published by h0tk3y about 7 years ago
better-parse
compatible with AndroidPublished 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)
.