aboutsummaryrefslogtreecommitdiff
path: root/grammars/bpeg.bp
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-01-14 16:16:41 -0800
committerBruce Hill <bruce@bruce-hill.com>2021-01-14 16:16:41 -0800
commit9238ffea8819461687e24ea45e466403faa68681 (patch)
treedf565e8391736de4674c83c575940130179807cf /grammars/bpeg.bp
parent43aeadaab8c29351e506c03829c3dc74a9f6b86a (diff)
Added rule for hiding
Diffstat (limited to 'grammars/bpeg.bp')
-rw-r--r--grammars/bpeg.bp3
1 files changed, 2 insertions, 1 deletions
diff --git a/grammars/bpeg.bp b/grammars/bpeg.bp
index e8d7259..23a2250 100644
--- a/grammars/bpeg.bp
+++ b/grammars/bpeg.bp
@@ -11,7 +11,7 @@ String-pattern: ..$$ % (\n / Nodent / Escape / `\ pat [`;])
pat: simple-pat !(__("!="/"==")) / suffixed-pat
simple-pat: Upto-and / Dot / String / Chars / Nodent / Escape-range
- / Escape / Repeat / Optional / No / After / Before / Capture
+ / Escape / Repeat / Optional / No / Hide / After / Before / Capture
/ Ref / parens
suffixed-pat: (
@@ -41,6 +41,7 @@ escape-sequence: (
/ `x 2 `0-9,a-f,A-F
)
No: `! (__@pat / @!=(''=>"Expected a pattern after the exclamation mark"))
+Hide: `~ (__@pat / @!=(''=>"Expected a pattern after the tilde"))
Nodent: `\ `N
Upto-and: ".." [__@first=simple-pat] [__`%__@second=simple-pat]
Repeat: (