This repo contains some useful Trash scripts for Antlr4 grammars.
- testrig.sh -- Script that simplifies running the org.antlr.v4.gui.TestRig program.
- find-cover.sh -- Generate cover.html, which is a "heat map" of the grammar showing what rules were used in the parse.
- find-unused-parser-symbols.sh -- Find unused parser symbols.
- find-unused-lexer-symbols.sh -- Find unused lexer symbols.
- find-start.sh -- Find start-rule.
- all-rules.sh -- Finds the transitive closure of a rule in a parser grammar.
- count-lexers.sh -- Count the number of lexer leaf nodes in a parse tree.
- count-parsers.sh -- Count the number of internal parse tree nodes in a parse tree.
- find-defs.sh -- Finds all definitions of a symbol.
- find-refs.sh -- Finds all references (applied and defining) of a symbol.
- find-actions.sh -- Finds all actions in a grammar.
- delete-useless-parentheses.sh -- Find useless parentheses. Contains test option.
- remove-underscores-grammars.sh -- Remove trailing underscores on symbols.
- strip-python.sh -- Strip the python.gram file of attributes and other assorted junk.
- strip.xq -- trquery script to strip all junk from an Antlr4 grammar.
- delabel.xq -- trquery script to "delabel" an Antlr4 grammar.
- bison.sh -- Convert Bison grammar to Antlr4. Not finished.