diff options
Diffstat (limited to 'LuaSL/src/LuaSL_yaccer.y')
-rw-r--r-- | LuaSL/src/LuaSL_yaccer.y | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/LuaSL/src/LuaSL_yaccer.y b/LuaSL/src/LuaSL_yaccer.y index 897a83e..414b5e9 100644 --- a/LuaSL/src/LuaSL_yaccer.y +++ b/LuaSL/src/LuaSL_yaccer.y | |||
@@ -2,6 +2,9 @@ | |||
2 | 2 | ||
3 | #include "LuaSL_LSL_tree.h" | 3 | #include "LuaSL_LSL_tree.h" |
4 | 4 | ||
5 | //extern char *yytext; | ||
6 | //#define YYDEBUG_LEXER_TEXT yytext | ||
7 | |||
5 | %} | 8 | %} |
6 | 9 | ||
7 | %define api.pure | 10 | %define api.pure |
@@ -25,9 +28,9 @@ input: | |||
25 | ; | 28 | ; |
26 | 29 | ||
27 | expr: | 30 | expr: |
28 | expr LSL_ADD expr { $$ = addOperation( LSL_ADD, $1, $3 ); } | 31 | LSL_PARENTHESIS_OPEN expr LSL_PARENTHESIS_CLOSE { $$ = $2; } |
29 | | expr LSL_MULTIPLY expr { $$ = addOperation( LSL_MULTIPLY, $1, $3 ); } | 32 | | expr LSL_MULTIPLY expr { $$ = addOperation( LSL_MULTIPLY, $1, $3 ); } |
30 | | LSL_PARENTHESIS_OPEN expr LSL_PARENTHESIS_CLOSE { $$ = $2; } | 33 | | expr LSL_ADD expr { $$ = addOperation( LSL_ADD, $1, $3 ); } |
31 | | LSL_INTEGER { $$ = addInteger($1); } | 34 | | LSL_INTEGER { $$ = addInteger($1); } |
32 | ; | 35 | ; |
33 | 36 | ||