aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src
diff options
context:
space:
mode:
Diffstat (limited to 'LuaSL/src')
-rw-r--r--LuaSL/src/LuaSL_lemon_yaccer.y7
1 files changed, 4 insertions, 3 deletions
diff --git a/LuaSL/src/LuaSL_lemon_yaccer.y b/LuaSL/src/LuaSL_lemon_yaccer.y
index e6c4bcd..239b598 100644
--- a/LuaSL/src/LuaSL_lemon_yaccer.y
+++ b/LuaSL/src/LuaSL_lemon_yaccer.y
@@ -31,15 +31,16 @@ script ::= .
31// State definitions. 31// State definitions.
32 32
33%nonassoc LSL_BLOCK_OPEN LSL_BLOCK_CLOSE LSL_STATE. 33%nonassoc LSL_BLOCK_OPEN LSL_BLOCK_CLOSE LSL_STATE.
34stateBlock ::= LSL_BLOCK_OPEN functionList LSL_BLOCK_CLOSE. 34stateBlock(A) ::= LSL_BLOCK_OPEN functionList(B) LSL_BLOCK_CLOSE. { A = B; }
35state(S) ::= LSL_DEFAULT(I) stateBlock(B). { S = addState(compiler, I, B); } 35state(S) ::= LSL_DEFAULT(I) stateBlock(B). { S = addState(compiler, I, B); }
36state(S) ::= LSL_STATE_CHANGE LSL_IDENTIFIER(I) stateBlock(B). { S = addState(compiler, I, B); } 36state(S) ::= LSL_STATE_CHANGE LSL_IDENTIFIER(I) stateBlock(B). { S = addState(compiler, I, B); }
37 37
38// Function definitions. 38// Function definitions.
39 39
40%nonassoc LSL_PARAMETER LSL_PARAMETER_LIST LSL_FUNCTION. 40%nonassoc LSL_PARAMETER LSL_PARAMETER_LIST LSL_FUNCTION.
41functionList ::= functionList functionBody. 41functionList(A) ::= functionList(B) functionBody(C). { A = collectStatements(compiler, B, C); }
42functionList ::= . 42//functionList(A) ::= functionBody(C). { A = collectStatements(compiler, NULL, C); }
43functionList(A) ::= . { A = collectStatements(compiler, NULL, NULL); }
43 44
44functionBody(A) ::= function(B) funcBlock(C). { A = addFunctionBody(compiler, B, C); } 45functionBody(A) ::= function(B) funcBlock(C). { A = addFunctionBody(compiler, B, C); }
45 46