From 57669a2d704253d8458371b6ba64fd7af6da9e26 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 14 Sep 2020 11:00:03 -0700 Subject: Added readme --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 README.md (limited to 'README.md') 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] [...]` + +### Flags +* `-h` `--help` print the usage and quit +* `-v` `--verbose` print verbose debugging info +* `-d` `--define =` define a grammar rule +* `-D` `--define-string =` define a grammar rule (string-pattern) +* `-p` `--pattern ` provide a pattern (equivalent to bpeg ' +* `-P` `--pattern-string ` provide a string pattern (equivalent to bpeg '', but may be useful if '' begins with a '-') +* `-r` `--replace ` replace the input pattern with the given replacement +* `-m` `--mode ` set the behavior mode (defult: find-all) +* `-g` `--grammar ` 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). -- cgit v1.2.3