tranalyze 0.18.1

dotnet tool install --global tranalyze --version 0.18.1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local tranalyze --version 0.18.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=tranalyze&version=0.18.1
nuke :add-package tranalyze --version 0.18.1

Reads an Antlr4 grammar from stdin and identifies problems in the grammar.
This program is part of the Trash toolkit.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
0.18.1 613 11/11/2022
0.18.0 460 11/7/2022
0.17.0 457 9/11/2022
0.16.5 531 7/29/2022
0.16.4 564 6/13/2022
0.16.3 519 5/7/2022
0.16.2 516 5/6/2022
0.16.1 474 5/5/2022
0.16.0 522 4/13/2022
0.15.1 516 4/4/2022
0.15.0 498 3/20/2022
0.14.3 515 2/27/2022
0.14.2 513 2/18/2022
0.14.1 570 1/26/2022
0.14.0 536 1/26/2022
0.13.8 507 1/14/2022
0.13.7 492 1/13/2022
0.13.6 513 1/13/2022
0.13.5 481 1/12/2022
0.13.4 524 1/11/2022
0.13.3 498 1/10/2022
0.13.2 380 12/24/2021
0.13.1 348 12/24/2021
0.13.0 370 12/23/2021
0.12.0 343 12/6/2021
0.11.5 384 10/17/2021
0.11.4 407 10/17/2021
0.11.3 376 9/28/2021
0.11.2 374 9/26/2021
0.11.1 386 9/25/2021
0.11.0 433 9/24/2021
0.10.0 364 9/9/2021
0.8.9 333 8/13/2021
0.8.8 366 8/5/2021
0.8.7 367 7/20/2021
0.8.6 370 7/13/2021
0.8.5 362 7/6/2021
0.8.4 387 6/24/2021
0.8.3 447 6/13/2021
0.8.2 416 6/8/2021
0.8.1 354 6/2/2021
0.8.0 380 5/27/2021

# tranalyze
## Summary
Analyze a grammar
## Description
Reads an Antlr4 grammar in the form of parse tree data from stdin,
searches for problems in the grammar, and outputs the results to stdout.
## Usage
tranalyze
## Details
`tranalyze` performs a multi-pass search of a grammar in the
form of a parse result (from `trparse`), looking for problems in the
grammar.
* Classify each node type and output a count for each type.
* Check for unused symbols.
* Check for Unicode literals of the type '\unnnn' with
numbers that are over 32-bits.
* Check for common groupings in alts.
* Check for useless parentheses.
* Identify if a symbol derives the empty string, a non-empty string, or both.
* Check for unhalting nonterminals symbols in a single rule or group of rules.
## Example
Consider the following combined grammar.
_Input to command_
grammar Test;
start : 'a' empty infinite0 infinite1 infinite2 ;
unused : 'b';
infinite0 : (infinite0 'c')* ;  // Not legal in Antlr4 MLR, but okay
infinite1 : (infinite1 'c')+ ;  // Not legal in Antlr4 MLR, infinite
infinite2 : ('c' infinite2)+ ;  // Not flagged by Antlr4, infinite
empty : ;
_Command_
trparse Test.g4 | tranalyze
_Output_
6 occurrences of Antlr - nonterminal def
7 occurrences of Antlr - nonterminal ref
1 occurrences of Antlr - keyword
5 occurrences of Antlr - literal
Rule start is NonEmpty
Rule unused is NonEmpty
Rule infinite0 is NonEmpty
Rule infinite1 is NonEmpty
Rule infinite2 is NonEmpty
Rule empty is Empty
Rule infinite1 is malformed. It does not derive a string with referencing itself.
Rule infinite2 is malformed. It does not derive a string with referencing itself.
## Current version
0.18.1 Fix trperf, trfirst. 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.