Text lexer and parser. Compiler frontend framework.
MIT License
Bot releases are hidden (Show)
Published by DiscreteTom over 1 year ago
builder.priority/leftSA/rightSA
.builder.use
to apply custom decorators.builder.resolveRS/resolveRR
support *+?
.ParserBuilder.checkSymbols
is now private, use options
in ParserBuilder.build
instead.AdvancedBuilder.expand
, make AdvancedBuilder
extend ParserBuilder
, they both implement IParserBuilder
.Published by DiscreteTom over 1 year ago
ParserBuilder.generateResolvers/checkConflicts
is now private, and ParserBuilder.checkAll
is removed. Use options
in ParserBuilder.build
instead.
debug
option to AdvancedBuilder.expand
.AdvancedBuilder.expand
.'*'
as the next
when resolve RS/RR conflicts.Published by DiscreteTom over 1 year ago
Add ELR.AdvancedBuilder
to support meta characters like +*?
when defining grammar rules!
Published by DiscreteTom over 1 year ago
ASTNode.traverse
and DefinitionContext.traverser
to make it super easy to invoke a top-down traverse after the AST is built.ASTNode.$
to query children by its type name or literal value.Published by DiscreteTom over 1 year ago
DefinicionContext.rollback
so you can rollback global state when re-lex. (ELR parser only)parser.commit
to commit existing changes to prevent re-lex. (ELR parser only)Published by DiscreteTom over 1 year ago
Lexer.trimStart/clone/dryClone/take
.Published by DiscreteTom almost 2 years ago
ParserBuilder.generateResolver
to generate code to manually resolve conflicts which can not be auto resolved.DFA.calculateAllStates
to calculate and cache all states ahead of time.ASTNode
can be serialized to a JSON object to co-work with other tools (e.g. compiler backend libs).For detailed information, see CHANGELOG.