From a93220972f8130732c8cd0267c0b14db77ac19ea Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 11 May 2021 12:38:58 -0700 Subject: Overhaul of |-word boundaries (| is deprecated), performance improvements for repeating matches, tweaks to the logic of word vs. id --- grammars/shell.bp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'grammars/shell.bp') diff --git a/grammars/shell.bp b/grammars/shell.bp index 1ad182d..ff13d0b 100644 --- a/grammars/shell.bp +++ b/grammars/shell.bp @@ -9,11 +9,10 @@ comment: `#..$ string: `" ..%(`\./subcommand/\n) `" / `' ..%\n `' / "<<" _ @delim=id _$ ..%\n (^delim$) subcommand: `` ..%\n `` / "$" parens -keyword: |( +keyword: "echo" / "read" / "set" / "unset" / "readonly" / "shift" / "export" / "if" / "fi" / "else" / "while" / "do" / "done" / "for" / "until" / "case" / "esac" / "break" / "continue" / "exit" / "return" / "trap" / "wait" / "eval" / "exec" / "ulimit" / "umask" -)| function-def: ^_ ["function"_] id _ `(_`) >(__`{) function: function-def __ braces var: `$ (id / braces) -- cgit v1.2.3