aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src
diff options
context:
space:
mode:
Diffstat (limited to 'LuaSL/src')
-rw-r--r--LuaSL/src/LuaSL_yaccer.y20
1 files changed, 10 insertions, 10 deletions
diff --git a/LuaSL/src/LuaSL_yaccer.y b/LuaSL/src/LuaSL_yaccer.y
index 57d3075..0b87df4 100644
--- a/LuaSL/src/LuaSL_yaccer.y
+++ b/LuaSL/src/LuaSL_yaccer.y
@@ -40,17 +40,8 @@ input :
40 | ignorable { ((LuaSL_yyparseParam*)data)->ast = addSpace($1, ((LuaSL_yyparseParam*)data)->ast); } 40 | ignorable { ((LuaSL_yyparseParam*)data)->ast = addSpace($1, ((LuaSL_yyparseParam*)data)->ast); }
41; 41;
42 42
43ignorable :
44 LSL_SPACE { $$ = strdup($1); }
45;
46
47statement :
48 expr LSL_STATEMENT { $$ = createStatement(LSL_EXPRESSION, $1); }
49;
50
51expr : 43expr :
52 LSL_INTEGER { $$ = addInteger($1); } 44 expr LSL_BOOL_AND expr { $$ = addOperation( LSL_BOOL_AND, $1, $3 ); }
53 | expr LSL_BOOL_AND expr { $$ = addOperation( LSL_BOOL_AND, $1, $3 ); }
54 | expr LSL_BOOL_OR expr { $$ = addOperation( LSL_BOOL_OR, $1, $3 ); } 45 | expr LSL_BOOL_OR expr { $$ = addOperation( LSL_BOOL_OR, $1, $3 ); }
55 | expr LSL_BIT_OR expr { $$ = addOperation( LSL_BIT_OR, $1, $3 ); } 46 | expr LSL_BIT_OR expr { $$ = addOperation( LSL_BIT_OR, $1, $3 ); }
56 | expr LSL_BIT_XOR expr { $$ = addOperation( LSL_BIT_XOR, $1, $3 ); } 47 | expr LSL_BIT_XOR expr { $$ = addOperation( LSL_BIT_XOR, $1, $3 ); }
@@ -72,6 +63,15 @@ expr :
72 | LSL_BOOL_NOT expr { $$ = addOperation( LSL_BOOL_NOT, NULL, $2 ); } 63 | LSL_BOOL_NOT expr { $$ = addOperation( LSL_BOOL_NOT, NULL, $2 ); }
73 | LSL_SUBTRACT expr { $$ = addOperation( LSL_NEGATION, NULL, $2 ); } %prec LSL_NEGATION 64 | LSL_SUBTRACT expr { $$ = addOperation( LSL_NEGATION, NULL, $2 ); } %prec LSL_NEGATION
74 | LSL_PARENTHESIS_OPEN expr LSL_PARENTHESIS_CLOSE { $$ = addParenthesis($2); } 65 | LSL_PARENTHESIS_OPEN expr LSL_PARENTHESIS_CLOSE { $$ = addParenthesis($2); }
66 | LSL_INTEGER { $$ = addInteger($1); }
67;
68
69statement :
70 expr LSL_STATEMENT { $$ = createStatement(LSL_EXPRESSION, $1); }
71;
72
73ignorable :
74 LSL_SPACE { $$ = strdup($1); }
75; 75;
76 76
77%% 77%%