From b50ad0cad099c99d4e739fc465b69779f661b77d Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 20 Jan 2021 15:46:21 -0800 Subject: Fixed grammar syntax for `..%` --- grammars/lua.bp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'grammars/lua.bp') diff --git a/grammars/lua.bp b/grammars/lua.bp index 7ffdc73..e8c9ba8 100644 --- a/grammars/lua.bp +++ b/grammars/lua.bp @@ -6,14 +6,14 @@ # full parse tree, and having one makes the task considerably more complicated. # See the accompanying README.md for more info. -comment: "--" (`[ @eqs=*`= `[ ..(`]eqs`]) % \n / ..$) -string: `"..`" % (`\.) / `'..`' % (`\.) / `[ @eqs=*`= `[ .. (`]eqs`]) % \n -table: `{..`} % (table/string/comment/\n) +comment: "--" (`[ @eqs=*`= `[ ..%\n (`]eqs`]) / ..$) +string: `"..%(`\.) `" / `' ..%(`\.) `' / `[ @eqs=*`= `[ ..%\n (`]eqs`]) +table: `{ ..%(table/string/comment/\n) `} keyword: |( "and" / "break" / "do" / "else" / "elseif" / "end" / "false" / "for" / "function" / "goto" / "if" / "in" / "local" / "nil" / "not" / "or" / "repeat" / "return" / "then" / "true" / "until" / "while" )| function-def: |"function"|[_id (*(`.id)[`:id])]_ parens -block: function / |("do"/"then")| .. (|"end"|) % (comment/string/block/\n) -function: function-def .. (|"end"|) % (comment/string/block/\n) +block: function / |("do"/"then")| ..%(comment/string/block/\n) (|"end"|) +function: function-def ..%(comment/string/block/\n) (|"end"|) -- cgit v1.2.3