aboutsummaryrefslogtreecommitdiff
path: root/grammars
diff options
context:
space:
mode:
Diffstat (limited to 'grammars')
-rw-r--r--grammars/bpeg.bp3
-rw-r--r--grammars/builtins.bp20
2 files changed, 1 insertions, 22 deletions
diff --git a/grammars/bpeg.bp b/grammars/bpeg.bp
index 23a2250..e8d7259 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 / Hide / After / Before / Capture
+ / Escape / Repeat / Optional / No / After / Before / Capture
/ Ref / parens
suffixed-pat: (
@@ -41,7 +41,6 @@ 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: (
diff --git a/grammars/builtins.bp b/grammars/builtins.bp
index 59104c3..fcc1f20 100644
--- a/grammars/builtins.bp
+++ b/grammars/builtins.bp
@@ -9,26 +9,6 @@ is-text-file: >32(\t/\n/\r/\x20-x7e/!\x00-x7f utf8-codepoint/$$)
# Meta-rules for acting on everything:
pattern: !'' # Not defined by default
replacement: !'' # Not defined by default
-replace-all: (
- (include-binary-files / is-text-file)
- +(..replacement%\n) ..%\n
-)
-find-all: (
- (include-binary-files / is-text-file)
- *(!..pattern ~(..\n))
- +(+(..@pattern) ..(\n/$$) / ~(..\n))
- [!<\n => "\n"]
-)
-find-lines: (
- (include-binary-files / is-text-file)
- *(!(pattern$) ~(..\n))
- +(@pattern (\n/$$) / ~(..\n))
- [!<\n => "\n"]
-)
-only-matches: (
- (include-binary-files / is-text-file)
- +(..@pattern%\n =>'@1\n')
-)
# Helper definitions (commonly used)
url: (