aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_lemon_yaccer.y
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-02 12:59:47 +1000
committerDavid Walter Seikel2012-02-02 12:59:47 +1000
commit21bcc5ba96159d9b00d59e92ffc16078a0f4c4ed (patch)
treed124acf1b2b0ad32cda3a677316fd82df58b1269 /LuaSL/src/LuaSL_lemon_yaccer.y
parentGet the right type for identifier subs. (diff)
downloadSledjHamr-21bcc5ba96159d9b00d59e92ffc16078a0f4c4ed.zip
SledjHamr-21bcc5ba96159d9b00d59e92ffc16078a0f4c4ed.tar.gz
SledjHamr-21bcc5ba96159d9b00d59e92ffc16078a0f4c4ed.tar.bz2
SledjHamr-21bcc5ba96159d9b00d59e92ffc16078a0f4c4ed.tar.xz
Partially implement parsing/outputting rotations and vectors.
Diffstat (limited to 'LuaSL/src/LuaSL_lemon_yaccer.y')
-rw-r--r--LuaSL/src/LuaSL_lemon_yaccer.y15
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.
199expr(A) ::= LSL_FLOAT(B). { A = addNumby(B); } 199expr(A) ::= LSL_FLOAT(B). { A = addNumby(B); }
200%nonassoc LSL_INTEGER. 200%nonassoc LSL_INTEGER.
201expr(A) ::= LSL_INTEGER(B). { A = addNumby(B); } 201expr(A) ::= LSL_INTEGER(B). { A = addNumby(B); }
202%nonassoc LSL_KEY. 202%nonassoc LSL_KEY.
203expr(A) ::= LSL_KEY(B). { B->basicType = OT_key; A = B; } 203expr(A) ::= LSL_KEY(B). { B->basicType = OT_key; A = B; }
204%nonassoc LSL_LIST. 204%nonassoc LSL_LIST.
205expr(A) ::= LSL_BRACKET_OPEN(L) exprList(E) LSL_BRACKET_CLOSE(R). [LSL_BRACKET_OPEN] { A = addList(L, E, R); } 205expr(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.
208expr ::= LSL_LESS_THAN expr LSL_COMMA expr LSL_COMMA expr LSL_COMMA expr LSL_GREATER_THAN. [LSL_ANGLE_OPEN] 208expr(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.
210expr(A) ::= LSL_STRING(B). { B->basicType = OT_string; A = B; } 210expr(A) ::= LSL_STRING(B). { B->basicType = OT_string; A = B; }
211%nonassoc LSL_VECTOR.
212expr ::= LSL_VECTOR.
213expr ::= 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.