From 14cfc7d0932dd67bfcd980776049e652fee4a5f4 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Fri, 6 Jan 2012 04:51:33 +1000 Subject: Add more LSL parsing structure. --- LuaSL/src/LuaSL_yaccer.y | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'LuaSL/src/LuaSL_yaccer.y') 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 @@ %token TOKEN_PLUS %token TOKEN_MULTIPLY -%token TOKEN_NUMBER +%token TOKEN_NUMBER -%type expr +%type expr %% input: - expr { ((SParserParam*)data)->expression = $1; } + expr { ((LuaSL_yyparseParam*)data)->expression = $1; } ; expr: - expr TOKEN_PLUS expr { $$ = createOperation( ePLUS, $1, $3 ); } - | expr TOKEN_MULTIPLY expr { $$ = createOperation( eMULTIPLY, $1, $3 ); } + expr TOKEN_PLUS expr { $$ = addOperation( LSL_ADD, $1, $3 ); } + | expr TOKEN_MULTIPLY expr { $$ = addOperation( LSL_MULTIPLY, $1, $3 ); } | TOKEN_LPAREN expr TOKEN_RPAREN { $$ = $2; } - | TOKEN_NUMBER { $$ = createNumber($1); } + | TOKEN_NUMBER { $$ = addInteger($1); } ; %% -- cgit v1.1