diff options
author | David Walter Seikel | 2012-01-21 10:57:19 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-21 10:57:19 +1000 |
commit | f496ed1880d0140b171dd96642692a155fb85104 (patch) | |
tree | baa673455b920a50ac69b8c63621dec8c5732b3f /LuaSL/src | |
parent | Add LSL constants by simply compiling an LSL script with them all, and keepin... (diff) | |
download | SledjHamr-f496ed1880d0140b171dd96642692a155fb85104.zip SledjHamr-f496ed1880d0140b171dd96642692a155fb85104.tar.gz SledjHamr-f496ed1880d0140b171dd96642692a155fb85104.tar.bz2 SledjHamr-f496ed1880d0140b171dd96642692a155fb85104.tar.xz |
Make vectors and rotations parse.
Diffstat (limited to '')
-rw-r--r-- | LuaSL/src/LuaSL_lemon_yaccer.y | 5 | ||||
-rw-r--r-- | LuaSL/src/constants.lsl | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/LuaSL/src/LuaSL_lemon_yaccer.y b/LuaSL/src/LuaSL_lemon_yaccer.y index eafab12..54af56d 100644 --- a/LuaSL/src/LuaSL_lemon_yaccer.y +++ b/LuaSL/src/LuaSL_lemon_yaccer.y | |||
@@ -190,12 +190,13 @@ expr(A) ::= LSL_KEY(B). { B->basicType = OT_key; A = B; } | |||
190 | %nonassoc LSL_LIST. | 190 | %nonassoc LSL_LIST. |
191 | expr ::= LSL_BRACKET_OPEN exprList LSL_BRACKET_CLOSE. [LSL_BRACKET_OPEN] | 191 | expr ::= LSL_BRACKET_OPEN exprList LSL_BRACKET_CLOSE. [LSL_BRACKET_OPEN] |
192 | %nonassoc LSL_ROTATION. | 192 | %nonassoc LSL_ROTATION. |
193 | expr ::= LSL_ANGLE_OPEN expr LSL_COMMA expr LSL_COMMA expr LSL_COMMA expr LSL_ANGLE_CLOSE. [LSL_ANGLE_OPEN] | 193 | // Uses the same symbol for less than, greater than, and the rotation / vector delimiters. |
194 | expr ::= LSL_LESS_THAN expr LSL_COMMA expr LSL_COMMA expr LSL_COMMA expr LSL_GREATER_THAN. [LSL_ANGLE_OPEN] | ||
194 | %nonassoc LSL_STRING. | 195 | %nonassoc LSL_STRING. |
195 | expr(A) ::= LSL_STRING(B). { B->basicType = OT_string; A = B; } | 196 | expr(A) ::= LSL_STRING(B). { B->basicType = OT_string; A = B; } |
196 | %nonassoc LSL_VECTOR. | 197 | %nonassoc LSL_VECTOR. |
197 | expr ::= LSL_VECTOR. | 198 | expr ::= LSL_VECTOR. |
198 | expr ::= LSL_ANGLE_OPEN expr LSL_COMMA expr LSL_COMMA expr LSL_ANGLE_CLOSE. [LSL_ANGLE_OPEN] | 199 | expr ::= LSL_LESS_THAN expr LSL_COMMA expr LSL_COMMA expr LSL_GREATER_THAN. [LSL_ANGLE_OPEN] |
199 | 200 | ||
200 | 201 | ||
201 | // Parser callbacks. | 202 | // Parser callbacks. |
diff --git a/LuaSL/src/constants.lsl b/LuaSL/src/constants.lsl index 5caf962..3b2f5a8 100644 --- a/LuaSL/src/constants.lsl +++ b/LuaSL/src/constants.lsl | |||
@@ -18,6 +18,6 @@ integer FALSE = 0; | |||
18 | string NULL_KEY = "00000000-0000-0000-0000-000000000000"; | 18 | string NULL_KEY = "00000000-0000-0000-0000-000000000000"; |
19 | string EOF = "\n\n\n"; | 19 | string EOF = "\n\n\n"; |
20 | 20 | ||
21 | //rotation ZERO_ROTATION = <0.0, 0.0, 0.0, 1.0>; | 21 | rotation ZERO_ROTATION = <0.0, 0.0, 0.0, 1.0>; |
22 | //vector ZERO_VECTOR = <0.0, 0.0, 0.0>; | 22 | vector ZERO_VECTOR = <0.0, 0.0, 0.0>; |
23 | 23 | ||