diff options
Diffstat (limited to '')
-rw-r--r-- | LuaSL/src/LuaSL_yaccer.y | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/LuaSL/src/LuaSL_yaccer.y b/LuaSL/src/LuaSL_yaccer.y index 9b060b5..4b456b1 100644 --- a/LuaSL/src/LuaSL_yaccer.y +++ b/LuaSL/src/LuaSL_yaccer.y | |||
@@ -50,14 +50,13 @@ | |||
50 | %% | 50 | %% |
51 | 51 | ||
52 | input : | 52 | input : |
53 | ignorable { } | 53 | ignorable |
54 | | expr { ((LuaSL_yyparseParam*)data)->ast = addOperation(LSL_EXPRESSION, $1, $1); } | 54 | | expr { ((LuaSL_yyparseParam*)data)->ast = addOperation(LSL_EXPRESSION, $1, $1); } |
55 | | statement { ((LuaSL_yyparseParam*)data)->ast = addStatement($1, ((LuaSL_yyparseParam*)data)->ast); } | 55 | | statement { ((LuaSL_yyparseParam*)data)->ast = addStatement($1, ((LuaSL_yyparseParam*)data)->ast); } |
56 | | script { } | 56 | | script |
57 | ; | 57 | ; |
58 | 58 | ||
59 | ignorable : | 59 | ignorable : LSL_SPACE { ((LuaSL_yyparseParam*)data)->ast = addSpace($1, ((LuaSL_yyparseParam*)data)->ast); } |
60 | LSL_SPACE { ((LuaSL_yyparseParam*)data)->ast = addSpace($1, ((LuaSL_yyparseParam*)data)->ast); } | ||
61 | ; | 60 | ; |
62 | 61 | ||
63 | expr : | 62 | expr : |
@@ -86,12 +85,10 @@ expr : | |||
86 | | LSL_INTEGER { $$ = addInteger($1); } | 85 | | LSL_INTEGER { $$ = addInteger($1); } |
87 | ; | 86 | ; |
88 | 87 | ||
89 | statement : | 88 | statement : expr LSL_STATEMENT { $$ = createStatement(LSL_EXPRESSION, $1); YYVALID; } |
90 | expr LSL_STATEMENT { $$ = createStatement(LSL_EXPRESSION, $1); YYVALID; } | ||
91 | ; | 89 | ; |
92 | 90 | ||
93 | script : | 91 | script : script LSL_STATEMENT statement |
94 | script LSL_STATEMENT statement | ||
95 | 92 | ||
96 | %% | 93 | %% |
97 | 94 | ||