Skip to content

Commit

Permalink
Add pest to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hildjj committed Jan 16, 2025
1 parent 101b668 commit e37f9ac
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 96 deletions.
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,30 @@ Options:

### abnf_gen

Generate a [Peggy](https://peggyjs.org/) grammar from the ABNF. The idea
is that you could then annotate this grammar with actions in order to create
a useful parser.
Generate a [Peggy](https://peggyjs.org/) or [Pest](https://pest.rs/) grammar
from the ABNF. The idea is that you could then annotate this grammar with
actions in order to create a useful parser.

```txt
Usage: abnf_gen [options] [abnfFile...]
Create a Peggy grammar from an ABNF file
Create a grammar from an ABNF file
Arguments:
abnfFile ABNF files to turn into peggy grammars.
abnfFile ABNF files to turn into grammars.
Options:
-s, --startRule <ruleName> Start rule for peggy grammar. Defaults to first
rule in ABNF grammar.
--stubs Generate stubs for rules that do not exist,
rather than failing.
-o, --output <file> Output peggy grammar file name. Derived from
input file name if not specified. (default:
"stdin.peggy")
-u, --unused Output rules that are not reachable from the
start rule
-f, --format <format> Output format (choices: "peggy", "pest", default:
"peggy")
-s, --startRule <ruleName> Start rule for generated grammar. Defaults to
first rule in ABNF grammar. Can be specified
multiple times.
--stubs Generate stubs for rules that do not exist, rather
than failing.
-o, --output <file> Output grammar file name. Derived from input file
name if not specified. (default: "stdin.peggy")
-u, --unused Output rules that are not reachable from the start
rule
-c, --core Include core rules from RFC 5234, Appendix B.
-h, --help display help for command
```
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@
"devDependencies": {
"@peggyjs/coverage": "1.3.2",
"@peggyjs/eslint-config": "^5.0.3",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.19.1",
"@typescript-eslint/eslint-plugin": "^8.20.0",
"@typescript-eslint/parser": "^8.20.0",
"ava": "6.2.0",
"c8": "10.1.3",
"eslint": "^9.17.0",
"eslint": "^9.18.0",
"typescript": "^5.7.3"
},
"packageManager": "[email protected].3",
"packageManager": "[email protected].4",
"engines": {
"node": ">=18"
}
Expand Down
Loading

0 comments on commit e37f9ac

Please sign in to comment.