diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-09-13 22:04:51 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-09-13 22:04:51 -0700 |
| commit | 1570dd55e8f3601e72893d6954044317973d7c60 (patch) | |
| tree | db3169b0d18a8e8d3930d73819c6a20d95c5a7b3 /bpeg.bpeg | |
| parent | 1d1c3d35aae0e060a6527d6e83575dd7ff71328e (diff) | |
Changed "upto-and" syntax to ".."/"..."
Diffstat (limited to 'bpeg.bpeg')
| -rw-r--r-- | bpeg.bpeg | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -7,14 +7,14 @@ Def = @[name]Ref __ `= __ @[definition]extended-pat; String-pattern = *(`\ pat ?`; / .); pat = suffixed-pat / simple-pat; -simple-pat = Empty / Dot / String / Char-range / Char / Escape-range / Escape / No / Anything-but - / Upto-and / Repeat / After / Before / Capture / Replace / Ref / parens; +simple-pat = Empty / Upto / Dot / String / Char-range / Char / Escape-range / Escape / No / Anything-but + / Repeat / After / Before / Capture / Replace / Ref / parens; suffixed-pat = Eq-pat; Eq-pat = @[first]simple-pat "==" @[second]pat; Empty = `/ >(__ (`)/`})); -Dot = `.; +Dot = `. !`.; String = ( `" @[s]*(Escape / ~`") `" / `' @[s]*(Escape / ~`') `' @@ -30,7 +30,7 @@ escape-sequence = ( ); No = `! _ @pat; Anything-but = `~ ?`~ _ @pat; -Upto-and = `& ?`& _ @pat; +Upto = 2-3`. ?>(_@pat); Repeat = ( @[min]int _ `- _ @[max]int /{@[min]{=>"0"}=>} @[max]int _ `- @@ -64,7 +64,7 @@ $ = !.; ^^ = !<$.; ^ = !<.; -hash-comment = `# *.; +hash-comment = `# .. $; # Note: comments are undefined by default in regular BPEG comment = hash-comment; |
