trsort 0.18.0
See the version list below for details.
dotnet tool install --global trsort --version 0.18.0
dotnet new tool-manifest
dotnet tool install --local trsort --version 0.18.0
#tool dotnet:?package=trsort&version=0.18.0
nuke :add-package trsort --version 0.18.0
Reorder grammar rules.
This program is part of the Trash toolkit.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last Updated |
---|---|---|
0.23.26 | 2,721 | 8/17/2025 |
0.23.25 | 244 | 8/9/2025 |
0.23.24 | 2,617 | 7/15/2025 |
0.23.23 | 1,020 | 7/6/2025 |
0.23.22 | 600 | 6/27/2025 |
0.23.21 | 1,776 | 6/6/2025 |
0.23.20 | 358 | 6/4/2025 |
0.23.19 | 349 | 6/4/2025 |
0.23.18 | 1,282 | 5/13/2025 |
0.23.17 | 4,253 | 3/7/2025 |
0.23.16 | 559 | 3/4/2025 |
0.23.15 | 184 | 2/25/2025 |
0.23.14 | 685 | 2/9/2025 |
0.23.13 | 447 | 1/19/2025 |
0.23.12 | 473 | 1/16/2025 |
0.23.11 | 2,672 | 12/18/2024 |
0.23.10 | 177 | 12/12/2024 |
0.23.9 | 177 | 11/29/2024 |
0.23.8 | 193 | 11/1/2024 |
0.23.7 | 4,302 | 10/9/2024 |
0.23.6 | 795 | 9/21/2024 |
0.23.5 | 185 | 9/15/2024 |
0.23.4 | 190 | 9/7/2024 |
0.23.3 | 185 | 8/15/2024 |
0.18.1 | 618 | 11/11/2022 |
0.18.0 | 551 | 11/7/2022 |
0.17.0 | 594 | 9/11/2022 |
0.16.5 | 595 | 7/29/2022 |
0.16.4 | 598 | 6/13/2022 |
# trsort
## Summary
Sort rules in a grammar
## Description
Reads a parse tree from stdin, move rules according to the named
operation, and writes the modified tree
to stdout. The input and output are Parse Tree Data.
## Usage
trsort bfs <string>
trsort dfs <string>
## Details
Reorder the parser rules according to the specified type and start rule.
For BFS and DFS, an XPath expression must be supplied to specify all the start
rule symbols. For alphabetic reordering, all parser rules are retained, and
simply reordered alphabetically. For BFS and DFS, if the rule is unreachable
from a start node set that is specified via <string>, then the rule is dropped
from the grammar.
## Example
trparse Java.g4 | trsort alpha | trtext
trparse Java.g4 | trsort dfs ""//parserRuleSpec/RULE_REF[text()='libraryDefinition']"" | trtext
## Notes
If you are running MSYS2 on Windows, you may notice that XPaths are not being
processed by this command correctly. To avoid the Bash shell from altering
XPaths, type _export MSYS2_ARG_CONV_EXCL="*"_, then execute your command.
## Current version
0.18.0 Adding Xalan code. Fix #180. Fix crash in trgen https://github.com/antlr/grammars-v4/issues/2818. Fix #134. Add -e option to trrename. Update Antlr4BuildTasks version. Fix #197, #198. Fix trparse exit code. Add --quiet option to trparse to just get exit code. Change trgen templates to remove -file option, make file name parsing the default.