diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-01-17 19:42:11 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-01-17 19:42:11 -0800 |
| commit | 51313c4773f0af62121b2192ff0cca9560b7ab44 (patch) | |
| tree | 5873f54aafe2cd537e286a88b368ba0315d3e15d /grammars/README.md | |
| parent | 23f9b7ade9eccc6aee2e6c2a6737630a9d0cc77d (diff) | |
Adding more language grammars
Diffstat (limited to 'grammars/README.md')
| -rw-r--r-- | grammars/README.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/grammars/README.md b/grammars/README.md new file mode 100644 index 0000000..7fa486f --- /dev/null +++ b/grammars/README.md @@ -0,0 +1,14 @@ +# BP Grammars + +The files in this directory are predefined grammars for different languages and +contexts. They are intended to be used for common search patterns, and **not** +intended to be complete PEG definitions of language grammars, other than +[bp.bp](./bp.bp), which is included for stress-testing purposes, as well as a +showcase of some BP features. + +## Adding Grammars + +If you want to add your own grammar, the easiest way to do so is to create a +`.bp` file in `~/.config/bp/`. The syntax for grammar files is fully and +formally defined in [bp.bp](./bp.bp), but in short, it's a list of +whitespace-separated rule definitions of the form `id __ ":" __ pattern`. |
