diff options
Diffstat (limited to 'indra/lscript')
-rwxr-xr-x | indra/lscript/lscript_compile/indra.l | 2 | ||||
-rwxr-xr-x | indra/lscript/lscript_compile/indra.y | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l index c2e21335e9..025cbfc3a3 100755 --- a/indra/lscript/lscript_compile/indra.l +++ b/indra/lscript/lscript_compile/indra.l @@ -102,7 +102,7 @@ int yyerror(const char *fmt, ...); "event" { count(); return(EVENT); } "jump" { count(); return(JUMP); } "return" { count(); return(RETURN); } -"if" { count(); return(IF); } +"if" { count(); return(IFF); } "else" { count(); return(ELSE); } "for" { count(); return(FOR); } "do" { count(); return(DO); } diff --git a/indra/lscript/lscript_compile/indra.y b/indra/lscript/lscript_compile/indra.y index c451eee3d8..efe4f1a60c 100755 --- a/indra/lscript/lscript_compile/indra.y +++ b/indra/lscript/lscript_compile/indra.y @@ -118,7 +118,7 @@ %token SHIFT_LEFT %token SHIFT_RIGHT -%token IF +%token IFF /* IF used by a helper library */ %token ELSE %token FOR %token DO @@ -1347,13 +1347,13 @@ statement { $$ = $1; } - | IF '(' expression ')' statement %prec LOWER_THAN_ELSE + | IFF '(' expression ')' statement %prec LOWER_THAN_ELSE { $$ = new LLScriptIf(gLine, gColumn, $3, $5); $5->mAllowDeclarations = FALSE; gAllocationManager->addAllocation($$); } - | IF '(' expression ')' statement ELSE statement + | IFF '(' expression ')' statement ELSE statement { $$ = new LLScriptIfElse(gLine, gColumn, $3, $5, $7); $5->mAllowDeclarations = FALSE; |