aboutsummaryrefslogtreecommitdiff
path: root/grammars/c.bp
diff options
context:
space:
mode:
Diffstat (limited to 'grammars/c.bp')
-rw-r--r--grammars/c.bp5
1 files changed, 2 insertions, 3 deletions
diff --git a/grammars/c.bp b/grammars/c.bp
index be91cbe..2c74c3d 100644
--- a/grammars/c.bp
+++ b/grammars/c.bp
@@ -8,14 +8,13 @@
comment: "//" .. $ / "/*" ..%\n "*/"
string: `" ..%(`\.) `"
-keyword: |(
+keyword:
"auto" / "break" / "case" / "char" / "const" / "continue" / "default" / "do" /
"double" / "else" / "enum" / "extern" / "float" / "for" / "goto" / "if" /
"int" / "long" / "register" / "return" / "short" / "signed" / "sizeof" /
"static" / "struct" / "switch" / "typedef" / "union" / "unsigned" / "void" /
"volatile" / "while"
-)|
-function-def: ^_ 2+(keyword / id / `*) % __ parens (__`; / >(__`{))
+function-def: ^_ 2+(id / keyword / `*) % __ parens (__`; / >(__`{))
function: function-def __ braces
macro: ^{#define} ..$ *(<`\ \n..$)
import: ^{#include} __ (string / `<..`>)