Skip to content

Releases: DiscreteTom/retsac

v0.9.0

16 Apr 14:54
Compare
Choose a tag to compare

Highlight Features

This version's main target is to optimize the performance.

Tested with dt0, the time spent on parser building reduced 26% (~130ms => ~95ms).

v0.8.0

11 Mar 13:33
Compare
Choose a tag to compare

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, use options in ParserBuilder.build instead.
  • Remove AdvancedBuilder.expand, make AdvancedBuilder extend ParserBuilder, they both implement IParserBuilder.

v0.7.0

06 Mar 16:03
Compare
Choose a tag to compare

Breaking Changes

ParserBuilder.generateResolvers/checkConflicts is now private, and ParserBuilder.checkAll is removed. Use options in ParserBuilder.build instead.

Highlight Features

  • Add debug option to AdvancedBuilder.expand.
  • Auto resolve R-S conflicts when AdvancedBuilder.expand.
  • Allow '*' as the next when resolve RS/RR conflicts.
  • Optimize performance.

v0.6.0

24 Feb 11:05
Compare
Choose a tag to compare

Highlight Features

Add ELR.AdvancedBuilder to support meta characters like +*? when defining grammar rules!

v0.5.0

20 Feb 14:27
Compare
Choose a tag to compare

Highlight Features

  • Add ASTNode.traverse and DefinitionContext.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

24 Jan 07:28
Compare
Choose a tag to compare
v0.4.0-beta.3 Pre-release
Pre-release

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

17 Jan 08:06
Compare
Choose a tag to compare
v0.4.0-beta.2 Pre-release
Pre-release

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

07 Jan 04:57
Compare
Choose a tag to compare
v0.4.0-beta.1 Pre-release
Pre-release

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.