diff options
author | David Walter Seikel | 2012-02-02 12:59:47 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-02-02 12:59:47 +1000 |
commit | 21bcc5ba96159d9b00d59e92ffc16078a0f4c4ed (patch) | |
tree | d124acf1b2b0ad32cda3a677316fd82df58b1269 /LuaSL/src/LuaSL_lemon_yaccer.y | |
parent | Get the right type for identifier subs. (diff) | |
download | SledjHamr-21bcc5ba96159d9b00d59e92ffc16078a0f4c4ed.zip SledjHamr-21bcc5ba96159d9b00d59e92ffc16078a0f4c4ed.tar.gz SledjHamr-21bcc5ba96159d9b00d59e92ffc16078a0f4c4ed.tar.bz2 SledjHamr-21bcc5ba96159d9b00d59e92ffc16078a0f4c4ed.tar.xz |
Partially implement parsing/outputting rotations and vectors.
Diffstat (limited to '')
-rw-r--r-- | LuaSL/src/LuaSL_lemon_yaccer.y | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/LuaSL/src/LuaSL_lemon_yaccer.y b/LuaSL/src/LuaSL_lemon_yaccer.y index d2731d8..8b6c3d7 100644 --- a/LuaSL/src/LuaSL_lemon_yaccer.y +++ b/LuaSL/src/LuaSL_lemon_yaccer.y | |||
@@ -196,21 +196,18 @@ expr(A) ::= LSL_INCREMENT_PRE(C) identifier(B). { A = addCrement(compiler, | |||
196 | // Values. | 196 | // Values. |
197 | 197 | ||
198 | %nonassoc LSL_FLOAT. | 198 | %nonassoc LSL_FLOAT. |
199 | expr(A) ::= LSL_FLOAT(B). { A = addNumby(B); } | 199 | expr(A) ::= LSL_FLOAT(B). { A = addNumby(B); } |
200 | %nonassoc LSL_INTEGER. | 200 | %nonassoc LSL_INTEGER. |
201 | expr(A) ::= LSL_INTEGER(B). { A = addNumby(B); } | 201 | expr(A) ::= LSL_INTEGER(B). { A = addNumby(B); } |
202 | %nonassoc LSL_KEY. | 202 | %nonassoc LSL_KEY. |
203 | expr(A) ::= LSL_KEY(B). { B->basicType = OT_key; A = B; } | 203 | expr(A) ::= LSL_KEY(B). { B->basicType = OT_key; A = B; } |
204 | %nonassoc LSL_LIST. | 204 | %nonassoc LSL_LIST. |
205 | expr(A) ::= LSL_BRACKET_OPEN(L) exprList(E) LSL_BRACKET_CLOSE(R). [LSL_BRACKET_OPEN] { A = addList(L, E, R); } | 205 | expr(A) ::= LSL_BRACKET_OPEN(L) exprList(E) LSL_BRACKET_CLOSE(R). [LSL_BRACKET_OPEN] { A = addList(L, E, R); } |
206 | %nonassoc LSL_ROTATION. | 206 | %nonassoc LSL_ROTATION LSL_VECTOR. |
207 | // Uses the same symbol for less than, greater than, and the rotation / vector delimiters. | 207 | // Uses the same symbol for less than, greater than, and the rotation / vector delimiters. |
208 | expr ::= LSL_LESS_THAN expr LSL_COMMA expr LSL_COMMA expr LSL_COMMA expr LSL_GREATER_THAN. [LSL_ANGLE_OPEN] | 208 | expr(A) ::= LSL_LESS_THAN(L) exprList(E) LSL_GREATER_THAN(R). [LSL_ANGLE_OPEN] { A = addRotVec(L, E, R); } |
209 | %nonassoc LSL_STRING. | 209 | %nonassoc LSL_STRING. |
210 | expr(A) ::= LSL_STRING(B). { B->basicType = OT_string; A = B; } | 210 | expr(A) ::= LSL_STRING(B). { B->basicType = OT_string; A = B; } |
211 | %nonassoc LSL_VECTOR. | ||
212 | expr ::= LSL_VECTOR. | ||
213 | expr ::= LSL_LESS_THAN expr LSL_COMMA expr LSL_COMMA expr LSL_GREATER_THAN. [LSL_ANGLE_OPEN] | ||
214 | 211 | ||
215 | 212 | ||
216 | // Parser callbacks. | 213 | // Parser callbacks. |