diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-07-26 20:59:45 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-07-26 20:59:45 -0700 |
| commit | f23b9bc6375797d03dee54a31fcaa634f8376975 (patch) | |
| tree | 624128655eeb20d68098e8c772d9d3ac77f1ee1e /grammars | |
| parent | d7030709801cde01739850a85f156d181554f520 (diff) | |
Introduced cache to greatly speed up many use cases
Diffstat (limited to 'grammars')
| -rw-r--r-- | grammars/c++.bp | 4 | ||||
| -rw-r--r-- | grammars/c.bp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/grammars/c++.bp b/grammars/c++.bp index 30f47aa..333e9f3 100644 --- a/grammars/c++.bp +++ b/grammars/c++.bp @@ -24,5 +24,5 @@ keyword: "unsigned" / "using" / "virtual" / "void" / "volatile" / "wchar_t" / "while" / "xor" / "xor_eq" function-def: ^_ 2+(id / keyword / anglebraces / `*) % __ parens (__`; / >(__`{)) function: function-def __ braces -macro: ^"#define"} ..$ *(<`\ \n..$) -import: ^("#include"}/"#import"}) __ (string / `<..`>) +macro: ^"#define"\b ..$ *(<`\ \n..$) +import: ^`#("include"/"import")\b __ (string / `<..`>) diff --git a/grammars/c.bp b/grammars/c.bp index 36f580b..015e5ed 100644 --- a/grammars/c.bp +++ b/grammars/c.bp @@ -17,5 +17,5 @@ keyword: "volatile" / "while" function-def: ^_ 2+(id / keyword / `*) % __ parens (__`; / >(__`{)) function: function-def __ braces -macro: ^"#define"} ..$ *(<`\ \n..$) -import: ^"#include"} __ (string / `<..`>) +macro: ^"#define"\b ..$ *(<`\ \n..$) +import: ^"#include"\b __ (string / `<..`>) |
