You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Release 4.0.0 expands Trash's interpreted-parser pipeline beyond ANTLR4. The shared grammar front-end and binding layer lowers several grammar notations into the existing ATN compiler, producing .interp and .tokens files that dotnet trash parse --allstar can run without a generated target-language parser.
Highlights
Add experimental G4X (.g4x) interpretation. Lexer versus parser rule kind follows the grammar declaration rather than rule-name capitalization; the front end binds vocabularies, handles start-rule selection, and diagnoses unsupported constructs.
Add documented basic front ends for REx, scannerless iXML, ABNF, Bison, and W3C EBNF. ABNF, iXML, and W3C EBNF use character-level lexing; Bison productions use a separately supplied ANTLR4 or G4X lexer.
Replace the old XPath-based implementations of trcombine and trrename with XQuery4 transformations, preserving unrelated bundle members. The trrename regression script now runs under both MSYS2 and Linux.
Add XQuery4 examples for sorting REx and ANTLR4 productions, including EOF-terminated start rules, and for structurally converting Tree-sitter grammar.json files to W3C EBNF.
Update the introduction, command documentation, examples, tests, and 4.0.0 version metadata; refresh bundled grammar sources and test dependencies.
Coverage and limitations
These new front ends implement documented subsets, not full conformance. iXML produces Trash parse trees rather than iXML's prescribed XML output. G4X set difference and scannerless parser character sets are not compiled yet; arbitrary target-language actions and predicates are not executed. The Tree-sitter conversion is intentionally lossy and marks untranslatable regexes and constructs with undefined symbols. See each example's README for its supported subset.
Validation
Added unit and runnable integration coverage for the new front ends and transformation examples. The W3C EBNF front end passed its 10 focused tests, 33 neighboring front-end regression tests, and its end-to-end example; the Tree-sitter conversion example also reparses its sample output as W3C EBNF.
Standard ANTLR .tokens files include the required EOF=-1 entry (for example tests/grammars-v4/acme/interp/acme.tokens:1), but this condition rejects every non-positive type before reading the name. A parser that relies on a sidecar token vocabulary will therefore fail binding even when the vocabulary is valid; allow exactly EOF=-1 while continuing to reject other invalid types.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Release 4.0.0 expands Trash's interpreted-parser pipeline beyond ANTLR4. The shared grammar front-end and binding layer lowers several grammar notations into the existing ATN compiler, producing .interp and .tokens files that dotnet trash parse --allstar can run without a generated target-language parser.
Highlights
Coverage and limitations
These new front ends implement documented subsets, not full conformance. iXML produces Trash parse trees rather than iXML's prescribed XML output. G4X set difference and scannerless parser character sets are not compiled yet; arbitrary target-language actions and predicates are not executed. The Tree-sitter conversion is intentionally lossy and marks untranslatable regexes and constructs with undefined symbols. See each example's README for its supported subset.
Validation
Added unit and runnable integration coverage for the new front ends and transformation examples. The W3C EBNF front end passed its 10 focused tests, 33 neighboring front-end regression tests, and its end-to-end example; the Tree-sitter conversion example also reparses its sample output as W3C EBNF.