aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_yaccer.y
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-06 04:51:33 +1000
committerDavid Walter Seikel2012-01-06 04:51:33 +1000
commit14cfc7d0932dd67bfcd980776049e652fee4a5f4 (patch)
tree2503e81a8fef238f672249ab12e34edd8773644f /LuaSL/src/LuaSL_yaccer.y
parentUpdate the not yet used real parser includes to. (diff)
downloadSledjHamr-14cfc7d0932dd67bfcd980776049e652fee4a5f4.zip
SledjHamr-14cfc7d0932dd67bfcd980776049e652fee4a5f4.tar.gz
SledjHamr-14cfc7d0932dd67bfcd980776049e652fee4a5f4.tar.bz2
SledjHamr-14cfc7d0932dd67bfcd980776049e652fee4a5f4.tar.xz
Add more LSL parsing structure.
Diffstat (limited to '')
-rw-r--r--LuaSL/src/LuaSL_yaccer.y12
1 files changed, 6 insertions, 6 deletions
diff --git a/LuaSL/src/LuaSL_yaccer.y b/LuaSL/src/LuaSL_yaccer.y
index 19009bf..820f7da 100644
--- a/LuaSL/src/LuaSL_yaccer.y
+++ b/LuaSL/src/LuaSL_yaccer.y
@@ -14,21 +14,21 @@
14%token TOKEN_PLUS 14%token TOKEN_PLUS
15%token TOKEN_MULTIPLY 15%token TOKEN_MULTIPLY
16 16
17%token <value> TOKEN_NUMBER 17%token <integerValue> TOKEN_NUMBER
18 18
19%type <expression> expr 19%type <expressionValue> expr
20 20
21%% 21%%
22 22
23input: 23input:
24 expr { ((SParserParam*)data)->expression = $1; } 24 expr { ((LuaSL_yyparseParam*)data)->expression = $1; }
25 ; 25 ;
26 26
27expr: 27expr:
28 expr TOKEN_PLUS expr { $$ = createOperation( ePLUS, $1, $3 ); } 28 expr TOKEN_PLUS expr { $$ = addOperation( LSL_ADD, $1, $3 ); }
29 | expr TOKEN_MULTIPLY expr { $$ = createOperation( eMULTIPLY, $1, $3 ); } 29 | expr TOKEN_MULTIPLY expr { $$ = addOperation( LSL_MULTIPLY, $1, $3 ); }
30 | TOKEN_LPAREN expr TOKEN_RPAREN { $$ = $2; } 30 | TOKEN_LPAREN expr TOKEN_RPAREN { $$ = $2; }
31 | TOKEN_NUMBER { $$ = createNumber($1); } 31 | TOKEN_NUMBER { $$ = addInteger($1); }
32; 32;
33 33
34%% 34%%