diff options
Diffstat (limited to 'script/parser/grammar.lua')
-rw-r--r-- | script/parser/grammar.lua | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/script/parser/grammar.lua b/script/parser/grammar.lua index fb68d5b9..b5c02aef 100644 --- a/script/parser/grammar.lua +++ b/script/parser/grammar.lua @@ -124,6 +124,7 @@ NOT <- Sp 'not' Cut OR <- Sp {'or'} Cut RETURN <- Sp 'return' Cut TRUE <- Sp 'true' Cut +CONTINUE <- Sp 'continue' Cut DO <- Sp {} 'do' {} Cut / Sp({} 'then' {} Cut) -> ErrDo @@ -186,9 +187,9 @@ UnaryList <- NOT / '~' !'=' POWER <- Sp {'^'} -BinaryOp <-( Sp {} {'or'} Cut - / Sp {} {'and'} Cut - / Sp {} {'<=' / '>=' / '<'!'<' / '>'!'>' / '~=' / '=='} +BinaryOp <-( Sp {} {'or' / '||'} Cut + / Sp {} {'and' / '&&'} Cut + / Sp {} {'<=' / '>=' / '<'!'<' / '>'!'>' / '~=' / '==' / '!='} / Sp {} ({} '=' {}) -> ErrEQ / Sp {} ({} '!=' {}) -> ErrUEQ / Sp {} {'|'} @@ -200,7 +201,7 @@ BinaryOp <-( Sp {} {'or'} Cut / Sp {} {'*' / '//' / '/' / '%'} / Sp {} {'^'} )-> BinaryOp -UnaryOp <-( Sp {} {'not' Cut / '#' / '~' !'=' / '-' !'-'} +UnaryOp <-( Sp {} {'not' Cut / '#' / '~' !'=' / '-' !'-' / '!' !'='} )-> UnaryOp PL <- Sp '(' @@ -408,11 +409,12 @@ CrtAction <- Semicolon / LocalFunction / Local / Set + / Continue / Call / ExpInAction UnkAction <- ({} {Word+}) -> UnknownAction - / ({} '//' {} (LongComment / ShortComment)) + / ({} '//' {} (LongComment / ShortComment) {}) -> CCommentPrefix / ({} {. (!Sps !CrtAction .)*}) -> UnknownAction @@ -431,6 +433,10 @@ Do <- Sp ({} Break <- Sp ({} BREAK {}) -> Break +Continue <- Sp ({} CONTINUE {}) + => RTContinue + -> Continue + Return <- Sp ({} RETURN ReturnExpList {}) -> Return ReturnExpList |