bp/grammars
2021-05-22 13:28:33 -07:00
..
bash.bp Added C++ grammar and aliases. 2021-01-17 20:19:49 -08:00
bp.bp Fixes for char sets/ranges and cleanups 2021-05-20 16:46:14 -07:00
builtins.bp Slight tweak 2021-05-22 13:28:33 -07:00
c.bp Fancier string escape sequences and a bit of cleanup. 2021-05-19 21:58:54 -07:00
c++.bp Fancier string escape sequences and a bit of cleanup. 2021-05-19 21:58:54 -07:00
cpp.bp Added C++ grammar and aliases. 2021-01-17 20:19:49 -08:00
go.bp Fancier string escape sequences and a bit of cleanup. 2021-05-19 21:58:54 -07:00
html.bp Added ~ and !~ operators as replacements for == and != 2021-05-19 23:41:57 -07:00
javascript.bp Fancier string escape sequences and a bit of cleanup. 2021-05-19 21:58:54 -07:00
js.bp Added Javscript and simplified python imports 2021-01-17 20:30:59 -08:00
lisp.bp Fancier string escape sequences and a bit of cleanup. 2021-05-19 21:58:54 -07:00
lua.bp Fancier string escape sequences and a bit of cleanup. 2021-05-19 21:58:54 -07:00
py.bp Added some aliases 2021-01-17 21:42:06 -08:00
python.bp Fancier string escape sequences and a bit of cleanup. 2021-05-19 21:58:54 -07:00
README.md Adding more language grammars 2021-01-17 19:42:11 -08:00
rust.bp Fancier string escape sequences and a bit of cleanup. 2021-05-19 21:58:54 -07:00
sh.bp Added some aliases 2021-01-17 21:42:06 -08:00
shell.bp Fancier string escape sequences and a bit of cleanup. 2021-05-19 21:58:54 -07:00
utf8-id.bp Fix for keyword check 2021-05-22 13:25:14 -07:00
web.bp Added web grammar 2021-01-26 17:21:57 -08:00

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, 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, but in short, it's a list of whitespace-separated rule definitions of the form id __ ":" __ pattern.