Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/kaby76/g4-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
kaby76 committed May 14, 2024
2 parents 4733ba0 + 6456924 commit 15ae8a8
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ for Antlr4 grammars.
* [testrig.sh](https://github.com/kaby76/g4-checks/blob/main/testrig.sh) -- Script that simplifies running the org.antlr.v4.gui.TestRig program.
* [find-cover.sh](https://github.com/kaby76/g4-checks/blob/main/find-cover.sh) -- Generate cover.html, which is a "heat map" of the grammar showing what rules were used in the parse.

### Grammar linting
* [unused.sh](https://github.com/kaby76/g4-checks/blob/main/unused.sh) -- Find unused parser symbols.
* [unused-lexer.sh](https://github.com/kaby76/g4-checks/blob/main/unused-lexer.sh) -- Find unused lexer symbols.
### Antlr4 grammar linting
* [find-unused-parser-symbols.sh](https://github.com/kaby76/g4-checks/blob/main/find-unused-parser-symbols.sh) -- Find unused parser symbols.
* [find-unused-lexer-symbols.sh](https://github.com/kaby76/g4-checks/blob/main/find-unused-lexer-symbols.sh) -- Find unused lexer symbols.

### Grammar properties
### Antlr4 grammar properties
* [find-start.sh](https://github.com/kaby76/g4-checks/blob/main/find-start.sh) -- Find start-rule.
* [all-rules.sh](https://github.com/kaby76/g4-checks/blob/main/all-rules.sh) -- Finds the transitive closure of a rule in a parser grammar.
* [count-lexers.sh](https://github.com/kaby76/g4-checks/blob/main/count-lexers.sh) -- Count the number of lexer leaf nodes in a parse tree.
Expand All @@ -20,10 +20,12 @@ for Antlr4 grammars.
* [find-refs.sh](https://github.com/kaby76/g4-checks/blob/main/find-refs.sh) -- Finds all references (applied and defining) of a symbol.
* [find-actions.sh](https://github.com/kaby76/g4-checks/blob/main/find-actions.sh) -- Finds all actions in a grammar.

### Grammar clean ups
### Antlr4 grammar clean ups
* [delete-useless-parentheses.sh](https://github.com/kaby76/g4-checks/blob/main/find-useless.sh) -- Find useless parentheses. Contains test option.
* [remove-underscores-grammars.sh](https://github.com/kaby76/g4-checks/blob/main/remove-underscores-grammars.sh) -- Remove trailing underscores on symbols.
* [strip-python.sh](https://github.com/kaby76/g4-checks/blob/main/strip-python.sh) -- Strip the python.gram file of attributes and other assorted junk.
* [strip.xq](https://github.com/kaby76/g4-scripts/blob/main/strip.xq) -- trquery script to strip all junk from an Antlr4 grammar.
* [delabel.xq](https://github.com/kaby76/g4-scripts/blob/main/delabel.xq) -- trquery script to "delabel" an Antlr4 grammar.

### Grammar conversion
* [bison.sh](https://github.com/kaby76/g4-checks/blob/main/bison.sh) -- Convert Bison grammar to Antlr4.
* [bison.sh](https://github.com/kaby76/g4-checks/blob/main/bison.sh) -- Convert Bison grammar to Antlr4. ___Not finished.___

0 comments on commit 15ae8a8

Please sign in to comment.