aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_lemon_yaccer.y
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-21 13:44:20 +1000
committerDavid Walter Seikel2012-01-21 13:44:20 +1000
commit0fa706b49693daf582c643f3917b37b124f7b380 (patch)
treeabe877c4da040f676bd6d9c0455185ebb85e7d42 /LuaSL/src/LuaSL_lemon_yaccer.y
parentMore stuff for parsing blocks and their statement lists. (diff)
downloadSledjHamr-0fa706b49693daf582c643f3917b37b124f7b380.zip
SledjHamr-0fa706b49693daf582c643f3917b37b124f7b380.tar.gz
SledjHamr-0fa706b49693daf582c643f3917b37b124f7b380.tar.bz2
SledjHamr-0fa706b49693daf582c643f3917b37b124f7b380.tar.xz
Make typecast parse.
Diffstat (limited to '')
-rw-r--r--LuaSL/src/LuaSL_lemon_yaccer.y14
1 files changed, 7 insertions, 7 deletions
diff --git a/LuaSL/src/LuaSL_lemon_yaccer.y b/LuaSL/src/LuaSL_lemon_yaccer.y
index 881bdaf..af2423a 100644
--- a/LuaSL/src/LuaSL_lemon_yaccer.y
+++ b/LuaSL/src/LuaSL_lemon_yaccer.y
@@ -156,13 +156,13 @@ expr ::= LSL_IDENTIFIER LSL_PARENTHESIS_OPEN exprList LSL_PARENTHESIS_CLOSE.
156expr(A) ::= identifier(B). { A = B; } 156expr(A) ::= identifier(B). { A = B; }
157 157
158%right LSL_ASSIGNMENT_CONCATENATE LSL_ASSIGNMENT_ADD LSL_ASSIGNMENT_SUBTRACT LSL_ASSIGNMENT_MULTIPLY LSL_ASSIGNMENT_MODULO LSL_ASSIGNMENT_DIVIDE LSL_ASSIGNMENT_PLAIN. 158%right LSL_ASSIGNMENT_CONCATENATE LSL_ASSIGNMENT_ADD LSL_ASSIGNMENT_SUBTRACT LSL_ASSIGNMENT_MULTIPLY LSL_ASSIGNMENT_MODULO LSL_ASSIGNMENT_DIVIDE LSL_ASSIGNMENT_PLAIN.
159expr ::= identifier LSL_ASSIGNMENT_CONCATENATE expr. 159expr(A) ::= identifier LSL_ASSIGNMENT_CONCATENATE expr(B). { A = B; }
160expr ::= identifier LSL_ASSIGNMENT_ADD expr. 160expr(A) ::= identifier LSL_ASSIGNMENT_ADD expr(B). { A = B; }
161expr ::= identifier LSL_ASSIGNMENT_SUBTRACT expr. 161expr(A) ::= identifier LSL_ASSIGNMENT_SUBTRACT expr(B) . { A = B; }
162expr ::= identifier LSL_ASSIGNMENT_MULTIPLY expr. 162expr(A) ::= identifier LSL_ASSIGNMENT_MULTIPLY expr(B). { A = B; }
163expr ::= identifier LSL_ASSIGNMENT_MODULO expr. 163expr(A) ::= identifier LSL_ASSIGNMENT_MODULO expr(B). { A = B; }
164expr ::= identifier LSL_ASSIGNMENT_DIVIDE expr. 164expr(A) ::= identifier LSL_ASSIGNMENT_DIVIDE expr(B). { A = B; }
165expr ::= identifier LSL_ASSIGNMENT_PLAIN expr. 165expr(A) ::= identifier LSL_ASSIGNMENT_PLAIN expr(B). { A = B; }
166 166
167// Hmm think this can have commas seperating the assignment parts, or is that only in C?. If so, best to separate them when converting to Lua, as it uses that syntax for something else. 167// Hmm think this can have commas seperating the assignment parts, or is that only in C?. If so, best to separate them when converting to Lua, as it uses that syntax for something else.
168statement(A) ::= type(B) LSL_IDENTIFIER(C) LSL_ASSIGNMENT_PLAIN(D) expr(E) LSL_STATEMENT(F). { A = addStatement(F, LSL_IDENTIFIER, addVariable(compiler, B, C, D, E)); } 168statement(A) ::= type(B) LSL_IDENTIFIER(C) LSL_ASSIGNMENT_PLAIN(D) expr(E) LSL_STATEMENT(F). { A = addStatement(F, LSL_IDENTIFIER, addVariable(compiler, B, C, D, E)); }