aboutsummaryrefslogtreecommitdiff
path: root/grammars/shell.bp
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-05-19 21:58:54 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-05-19 21:58:54 -0700
commit5d5817c2a3d21e91db4eaaf607ff881d71b57638 (patch)
treec147550067d237a8d45c35870e18ea4957772c0b /grammars/shell.bp
parent6ff7a6753032bc41098042258096bde73ed4bd1c (diff)
Fancier string escape sequences and a bit of cleanup.
Diffstat (limited to 'grammars/shell.bp')
-rw-r--r--grammars/shell.bp5
1 files changed, 3 insertions, 2 deletions
diff --git a/grammars/shell.bp b/grammars/shell.bp
index ff13d0b..72b83cc 100644
--- a/grammars/shell.bp
+++ b/grammars/shell.bp
@@ -7,8 +7,9 @@
# See the accompanying README.md for more info.
comment: `#..$
-string: `" ..%(`\./subcommand/\n) `" / `' ..%\n `' / "<<" _ @delim=id _$ ..%\n (^delim$)
-subcommand: `` ..%\n `` / "$" parens
+string: `" ..%(string-escape / subcommand / \n) `" / `' ..%\n `' / "<<" _ @delim=id _$ ..%\n (^delim$)
+string-escape: `\ `",`
+subcommand: `` ..%\n `` / "$" (parens/braces)
keyword:
"echo" / "read" / "set" / "unset" / "readonly" / "shift" / "export" / "if" / "fi" /
"else" / "while" / "do" / "done" / "for" / "until" / "case" / "esac" / "break" /