aboutsummaryrefslogtreecommitdiff
path: root/grammar.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2020-09-12 01:32:59 -0700
committerBruce Hill <bruce@bruce-hill.com>2020-09-12 01:32:59 -0700
commite9673459376b92e5c8be60783b608723af9b23d9 (patch)
tree76c7d9f4456507453af2e6742561762132defcfc /grammar.c
parent5c047efcb7f92de36df102dd164345d988f64567 (diff)
Tweaks to CLI, bugfix for escape replacements
Diffstat (limited to 'grammar.c')
-rw-r--r--grammar.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/grammar.c b/grammar.c
index 38403d8..84bada7 100644
--- a/grammar.c
+++ b/grammar.c
@@ -13,6 +13,7 @@ const char *BPEG_BUILTIN_GRAMMAR = (
"replace-all = *&&@replacement &&$$;\n"
"find-all = *(matching-line / {&&(\\n/$$)=>});\n"
"matching-line = +&@pattern *. $ ?\\n;\n"
+ "only-matches = *{&&@pattern=>'@1\\n'};\n"
// Helper definitions (commonly used)
"crlf=\\r\\n;\n"