From bbab1b7fd1085e470d05b5e064ed5c655f264b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 31 Dec 2018 11:58:36 +0800 Subject: =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=AF=AD=E6=B3=95=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/parser/grammar.lua | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'server/src/parser/grammar.lua') diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua index a840a7a0..18118ac6 100644 --- a/server/src/parser/grammar.lua +++ b/server/src/parser/grammar.lua @@ -313,25 +313,12 @@ AfterArg <- DOTS / MustName -Table <- ({} TL TR {}) +Table <- Sp ({} TL TableFields DirtyTR {}) -> Table - / ({} TL TableFields DirtyTR {}) - -> Table - / ({} TL DirtyTR {}) - -> Table -TableFields <- TableField - (TableAfterF)* - LastTableSep? - / DirtyExp - (TableAfterF)+ - LastTableSep? -TableAfterF <- TableSep !TR TableField - / Sp ({} {(!TR !COMMA !SEMICOLON !Word !BL .)+}) +TableFields <- (TableSep {} / TableField / DirtyField)* +DirtyField <- Sp ({} {(!TR !COMMA !SEMICOLON !Word !BL .)+}) -> UnknownSymbol TableSep <- COMMA / SEMICOLON - / {} - -> MissTableSep -LastTableSep<- COMMA / SEMICOLON TableField <- NewIndex / NewField / Exp NewIndex <- (BL DirtyExp DirtyBR DirtyAssign DirtyExp) -> NewIndex -- cgit v1.2.3