aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-01-17 13:38:08 -0800
committerBruce Hill <bruce@bruce-hill.com>2021-01-17 13:38:08 -0800
commit1d86625f92ca8ae1570b58a404ae621337ec8b43 (patch)
tree5507e492489bf5705a5f4548dc478bb1e99bfd8e
parent3cc645f2d0393e6e2d1d03a099a0c3320acb2a20 (diff)
Zazzing up repetitions with fancy ∞ symbol
-rw-r--r--grammars/bpeg.bp4
1 files changed, 2 insertions, 2 deletions
diff --git a/grammars/bpeg.bp b/grammars/bpeg.bp
index 6cc118b..0894e76 100644
--- a/grammars/bpeg.bp
+++ b/grammars/bpeg.bp
@@ -44,9 +44,9 @@ No: `! (__@pat / @!=(''=>"Expected a pattern after the exclamation mark"))
Nodent: `\ `N
Upto-and: ".." [__@first=simple-pat] [__`%__@second=simple-pat]
Repeat: (
- @min=(''=>'0') `* @max=''
+ @min=(''=>'0') (`*=>"-") @max=(''=>'∞')
/ @min=int __ `- __ @max=int
- / @min=(int / ''=>'1') __ `+ @max=''
+ / @min=(int / ''=>'1') __ (`+=>"-") @max=(''=>'∞')
/ @min=@max=int
) __ @repeat-pat=pat [__`%__@sep=pat]
Optional: `[ __ extended-pat (__`] / @!=(''=> "Expected closing square bracket here"))