aboutsummaryrefslogtreecommitdiff
path: root/grammars
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2020-09-16 21:47:48 -0700
committerBruce Hill <bruce@bruce-hill.com>2020-09-16 21:47:48 -0700
commit9ee7102f51c60469659de752f119b1ecbd3c0ba7 (patch)
tree23cb1f8b50eb9009c94e0eda1950f03bca028acb /grammars
parentd536f6a2ca46d4deed84eba38abdbbfc28207400 (diff)
Removed (/) (which is just a clunky way to do "")
Diffstat (limited to 'grammars')
-rw-r--r--grammars/bpeg.bpeg2
-rw-r--r--grammars/builtins.bpeg10
-rw-r--r--grammars/html.bpeg5
3 files changed, 8 insertions, 9 deletions
diff --git a/grammars/bpeg.bpeg b/grammars/bpeg.bpeg
index dd3a3b4..b1381bc 100644
--- a/grammars/bpeg.bpeg
+++ b/grammars/bpeg.bpeg
@@ -33,7 +33,7 @@ Nodent = `|;
Upto-and = 2-3`. 0-1(_@pat);
Repeat = (
@[min]int _ `- _ @[max]int
- / @[min]int _ `+ @[max](/)
+ / @[min]int _ `+ @[max]''
/ @[min]@[max]int
) _ @[repeat-pat]pat 0-1( __ `% __ @[sep]pat);
After = `< _ pat;
diff --git a/grammars/builtins.bpeg b/grammars/builtins.bpeg
index 8abb550..7446212 100644
--- a/grammars/builtins.bpeg
+++ b/grammars/builtins.bpeg
@@ -1,5 +1,5 @@
-yes = (/);
-no = !(/);
+yes = '';
+no = !'';
# Configurable options:
is-tty = no; # Defined as either always-match or always-fail, depending on stdout
@@ -8,8 +8,8 @@ print-filenames = is-tty;
highlight = is-tty;
# Meta-rules for acting on everything:
-pattern = !(/); # Not defined by default
-replacement = !(/); # Not defined by default
+pattern = !''; # Not defined by default
+replacement = !''; # Not defined by default
replace-all = define-highlights add-filename 1+(...@hl-replacement) ...;
find-all = define-highlights add-filename 1+find-next%\n 0-1{!<\n => "\n"};
find-next = matching-line / {..\n =>} find-next;
@@ -50,7 +50,7 @@ c-block-comment = '/*' ... '*/';
c-line-comment = '//' ..$;
c-comment = c-line-comment / c-block-comment;
hash-comment = `# ..$;
-comment = !(/); # No default definition, can be overridden
+comment = !''; # No default definition, can be overridden
WS = ` /\t/\n/\r/comment;
ws = ` /\t;
$$ = !$.;
diff --git a/grammars/html.bpeg b/grammars/html.bpeg
index 451e61c..3a2d9f2 100644
--- a/grammars/html.bpeg
+++ b/grammars/html.bpeg
@@ -19,9 +19,8 @@ normal-element = `< @[tag](id==match-tag) __attributes__ `> >match-body @[body]0
comment = "<!--" ..."-->";
-attributes = 0+(!(attribute==match-attribute))%__ __(attribute==match-attribute)__ 0+attribute%__;
+attributes = 0+attribute%__;
attribute = (1+id%`:)__`=__ (id / `" ..`" / `' ..`');
attribute = (1+id%`:)__`=__ (id / `" ..`" / `' ..`');
-match-attribute = attribute;
match-tag = id;
-match-body = (/);
+match-body = '';