aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-23 19:53:05 +1000
committerDavid Walter Seikel2012-01-23 19:53:05 +1000
commit5d79985fe7d3873f9d4a82a559e387d0d8749550 (patch)
treeb21466db0750a99f59a8854ac79f11596b7f8b40
parentllSameGroup() returns integer, not key. I was only guessing before, actually... (diff)
downloadSledjHamr-5d79985fe7d3873f9d4a82a559e387d0d8749550.zip
SledjHamr-5d79985fe7d3873f9d4a82a559e387d0d8749550.tar.gz
SledjHamr-5d79985fe7d3873f9d4a82a559e387d0d8749550.tar.bz2
SledjHamr-5d79985fe7d3873f9d4a82a559e387d0d8749550.tar.xz
Implement assignments.
-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 38b9c36..71caaa1 100644
--- a/LuaSL/src/LuaSL_lemon_yaccer.y
+++ b/LuaSL/src/LuaSL_lemon_yaccer.y
@@ -161,13 +161,13 @@ expr(A) ::= identifier(B). { A = B; }
161 161
162%right LSL_ASSIGNMENT_CONCATENATE LSL_ASSIGNMENT_ADD LSL_ASSIGNMENT_SUBTRACT LSL_ASSIGNMENT_MULTIPLY LSL_ASSIGNMENT_MODULO LSL_ASSIGNMENT_DIVIDE LSL_ASSIGNMENT_PLAIN. 162%right LSL_ASSIGNMENT_CONCATENATE LSL_ASSIGNMENT_ADD LSL_ASSIGNMENT_SUBTRACT LSL_ASSIGNMENT_MULTIPLY LSL_ASSIGNMENT_MODULO LSL_ASSIGNMENT_DIVIDE LSL_ASSIGNMENT_PLAIN.
163// Yes, these can be expressions, and can happen in if statements and such. 163// Yes, these can be expressions, and can happen in if statements and such.
164expr(A) ::= identifier LSL_ASSIGNMENT_CONCATENATE expr(B). { A = B; } 164expr(A) ::= identifier(B) LSL_ASSIGNMENT_CONCATENATE(C) expr(D). { A = addOperation(compiler, B, C, D); }
165expr(A) ::= identifier LSL_ASSIGNMENT_ADD expr(B). { A = B; } 165expr(A) ::= identifier(B) LSL_ASSIGNMENT_ADD(C) expr(D). { A = addOperation(compiler, B, C, D); }
166expr(A) ::= identifier LSL_ASSIGNMENT_SUBTRACT expr(B) . { A = B; } 166expr(A) ::= identifier(B) LSL_ASSIGNMENT_SUBTRACT(C) expr(D) . { A = addOperation(compiler, B, C, D); }
167expr(A) ::= identifier LSL_ASSIGNMENT_MULTIPLY expr(B). { A = B; } 167expr(A) ::= identifier(B) LSL_ASSIGNMENT_MULTIPLY(C) expr(D). { A = addOperation(compiler, B, C, D); }
168expr(A) ::= identifier LSL_ASSIGNMENT_MODULO expr(B). { A = B; } 168expr(A) ::= identifier(B) LSL_ASSIGNMENT_MODULO(C) expr(D). { A = addOperation(compiler, B, C, D); }
169expr(A) ::= identifier LSL_ASSIGNMENT_DIVIDE expr(B). { A = B; } 169expr(A) ::= identifier(B) LSL_ASSIGNMENT_DIVIDE(C) expr(D). { A = addOperation(compiler, B, C, D); }
170expr(A) ::= identifier LSL_ASSIGNMENT_PLAIN expr(B). { A = B; } 170expr(A) ::= identifier(B) LSL_ASSIGNMENT_PLAIN(C) expr(D). { A = addOperation(compiler, B, C, D); }
171 171
172// 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. 172// 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.
173// Well, not in OpenSim at least, nor in SL. So we are safe. B-) 173// Well, not in OpenSim at least, nor in SL. So we are safe. B-)