Skip to content

Release 4.5.0

Choose a tag to compare

@kaby76 kaby76 released this 19 Oct 23:49

Summary

  • Add a built-in grammar and generated C# parser for .ast rewrite descriptions, so trparse can produce their parse trees.
  • Have trinterp compile one .ast mapping alongside one parser grammar and embed the rewrite table in the parser .interp file. Mapping inputs are recognized by their parse-tree root, including when read from stdin or a non-.ast filename.
  • Have the AllStar interpreter construct the AST during parsing from the embedded table. Remove the separate trparse --ast-map option.
  • Keep Earley from caching an unsupported mapped interpreter; AllStar also detects a cached runtime that is missing its embedded mapping instead of silently returning a CST.
  • Update the arithmetic and LINVAST-style C, Java, Kotlin, and Lua examples to use the parse → interp → AllStar pipeline. The LINVAST example links to its original ANTLR4-based source.
  • Bring desc.xsd in line with trgen's EOF-based start-rule selection and supported descriptor fields, and update command documentation and 4.5.0 tool versions.
  • Repair the generated AST C# project's launch, test, benchmark, and clean commands to use ast.dll or ast.csproj rather than nonexistent Test.exe or Test.csproj. Benchmark failures now propagate a nonzero exit status.

Validation

  • Earlier full AllStarParserTests run: 573 passed.
  • After the review fixes: 9 AST-mapping tests and 42 related G4X interpreter tests passed.
  • examples/ast-during-parse/run-example.sh and examples/linvast-ast/run-example.sh passed.
  • Direct Windows builds of the AST and ABNF grammar projects produced their DLLs and .exe apphosts. The AST Bash and PowerShell launchers, watchdog invocation, and MSBuild Test target ran successfully.

Current scope

Embedded AST mappings require ordinary --allstar parsing. They are not yet compatible with indirect left recursion, context-aware lexing, or runtime XQuery hooks. Earley explicitly rejects mapped interpreters.