diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-05-11 11:39:42 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-05-11 11:39:42 -0700 |
| commit | 3359a804c8fe02ea4e9bc1abb7430109affdd535 (patch) | |
| tree | 3f092a2645d7f25af4610f7830fbc3724ed05abe /grammars/bp.bp | |
| parent | b09bd4c746bd9682b29fa4f329c4b8e7effbfd51 (diff) | |
Converted ^/^^/$/$$ into pattern types instead of builtin definitions
Diffstat (limited to 'grammars/bp.bp')
| -rw-r--r-- | grammars/bp.bp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/grammars/bp.bp b/grammars/bp.bp index 6d98187..5e4dcc8 100644 --- a/grammars/bp.bp +++ b/grammars/bp.bp @@ -17,7 +17,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 - / Ref / parens + / Start-of-File / Start-of-Line / End-of-File / End-of-Line / Ref / parens suffixed-pat: ( Eq-pat @@ -63,6 +63,10 @@ Replace: ( @replace-pat=(Replace / Chain / pat) __ "=>" (__ @replacement=String / @!=(''=> "Expected replacement string")) ) Ref: @name=id !(__`:) +Start-of-File: "^^" +Start-of-Line: "^" +End-of-File: "$$" +End-of-Line: "$" parens: `( __ extended-pat (__ `) / @!=(''=> "Expected closing parenthesis here")) @@ -73,11 +77,7 @@ extended-pat: Otherwise / Replace / Chain / pat # Special-symbol rules: _: *(` / \t) __: *(` / \t / \r / \n / comment) -$$: !(./\n) -$: !. -^^: !<(./\n) -^: !<. -id: "^^" / "^" / "__" / "_" / "$$" / "$" / "|" / `a-z,A-Z *`a-z,A-Z,0-9,- +id: "__" / "_" / "|" / `a-z,A-Z *`a-z,A-Z,0-9,- comment: `# .. $ |
