Releases: DiscreteTom/retsac
Releases · DiscreteTom/retsac
v0.9.0
v0.8.0
Highlight Features
- Add high-level resolver APIs:
builder.priority/leftSA/rightSA
. - Add
builder.use
to apply custom decorators. builder.resolveRS/resolveRR
support*+?
.- Provide versioned documentation.
Breaking Changes
ParserBuilder.checkSymbols
is now private, useoptions
inParserBuilder.build
instead.- Remove
AdvancedBuilder.expand
, makeAdvancedBuilder
extendParserBuilder
, they both implementIParserBuilder
.
v0.7.0
Breaking Changes
ParserBuilder.generateResolvers/checkConflicts
is now private, and ParserBuilder.checkAll
is removed. Use options
in ParserBuilder.build
instead.
Highlight Features
- Add
debug
option toAdvancedBuilder.expand
. - Auto resolve R-S conflicts when
AdvancedBuilder.expand
. - Allow
'*'
as thenext
when resolve RS/RR conflicts. - Optimize performance.
v0.6.0
Highlight Features
Add ELR.AdvancedBuilder
to support meta characters like +*?
when defining grammar rules!
v0.5.0
Highlight Features
- Add
ASTNode.traverse
andDefinitionContext.traverser
to make it super easy to invoke a top-down traverse after the AST is built. - Add
ASTNode.$
to query children by its type name or literal value.
v0.4.0-beta.3
Highlight Features
- Add
DefinicionContext.rollback
so you can rollback global state when re-lex. (ELR parser only) - Add
parser.commit
to commit existing changes to prevent re-lex. (ELR parser only)
v0.4.0-beta.2
Highlight Features
Introducing ELR(Expectational LR) Parser
- The ELR parser will actively use the Lexer to lex the input string to tokens according to the grammar rules.
- Re-Lex: If the lexed token can't be accepted, the ELR parser will try to restore & re-lex input.
Lexer
- Add
Lexer.trimStart/clone/dryClone/take
.
v0.4.0-beta.1
Highlight Features
- LR parser support conflict detection (for reduce-shift conflicts and reduce-reduce conflicts), and will try to auto resolve those conflicts by LR-1 peeking.
- Add
ParserBuilder.generateResolver
to generate code to manually resolve conflicts which can not be auto resolved. - DFA will cache computed states on the fly to optimize performance. You can also use
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).
TODO
- Optimize errors and output.
- Add wiki and Chinese documents.
- Optimize test code.
CHANGELOG
For detailed information, see CHANGELOG.