diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-09-14 11:00:03 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-09-14 11:00:03 -0700 |
| commit | 57669a2d704253d8458371b6ba64fd7af6da9e26 (patch) | |
| tree | 380b8712dc3e7eb530d5587778d91eb92b15b66d /README.md | |
| parent | 556893787e8cdb9c2ea3c8df9d88eb23856f0c6e (diff) | |
Added readme
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..5dc4578 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# BPEG + +BPEG is a parsing expression grammar tool for the command line. +It's written in pure C with no dependencies. + +## Usage +`bpeg [flags] <pattern> [<input files>...]` + +### Flags +* `-h` `--help` print the usage and quit +* `-v` `--verbose` print verbose debugging info +* `-d` `--define <name>=<def>` define a grammar rule +* `-D` `--define-string <name>=<def>` define a grammar rule (string-pattern) +* `-p` `--pattern <pat>` provide a pattern (equivalent to bpeg ' +* `-P` `--pattern-string <pat>` provide a string pattern (equivalent to bpeg '<pat>', but may be useful if '<pat>' begins with a '-') +* `-r` `--replace <replacement>` replace the input pattern with the given replacement +* `-m` `--mode <mode>` set the behavior mode (defult: find-all) +* `-g` `--grammar <grammar file>` use the specified file as a grammar + +See `man ./bpeg.1` for more details. + +## BPEG Patterns +BPEG patterns are a mixture of Parsing Expression Grammar and Regular +Expression syntax, with a preference for prefix operators instead of +suffix operators. + +See `man ./bpeg.1` for more details. + +## License +BPEG is provided under the MIT license with the Commons Clause (see +[LICENSE](LICENSE) for details). |
