aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-05 07:27:45 +1000
committerDavid Walter Seikel2012-01-05 07:27:45 +1000
commita386c57261b44a02f1d23b533f3220730d18e6ac (patch)
tree95d59f2dce9e428a8e759c0fc03458f812cf1478
parentMake the btyacc stuff a little more reentrant to match bison. (diff)
downloadSledjHamr-a386c57261b44a02f1d23b533f3220730d18e6ac.zip
SledjHamr-a386c57261b44a02f1d23b533f3220730d18e6ac.tar.gz
SledjHamr-a386c57261b44a02f1d23b533f3220730d18e6ac.tar.bz2
SledjHamr-a386c57261b44a02f1d23b533f3220730d18e6ac.tar.xz
Added the unadulterated flex and bison source files from the SL viewer.
Actually, from meta-impy, but originaly from one of the SL viewers. They actually produce C files, though some of it is C++. The resulting files wont compile without lots of C++ files from the viewer. Still, it's a step in the right direction. "btyacc: 88 reduce/reduce conflicts." might be a worry though.
-rw-r--r--LICENCES6
-rwxr-xr-xLuaSL/build.sh10
-rw-r--r--LuaSL/src/LuaSL_LSL_lexer.l943
-rw-r--r--LuaSL/src/LuaSL_LSL_yaccer.y1798
4 files changed, 2757 insertions, 0 deletions
diff --git a/LICENCES b/LICENCES
index 2c19ef3..02e4c04 100644
--- a/LICENCES
+++ b/LICENCES
@@ -61,3 +61,9 @@ the Wikipedia Terms of Use.
61 61
62-------------------------------------------------------------------------------- 62--------------------------------------------------------------------------------
63 63
64The flex and bison source files for the LSL parser are from the SL
65viewer under GPL 2 and copyright at some unknown date (due to missing
66copyright notice in those specific files) by Linden Research, Inc.
67
68--------------------------------------------------------------------------------
69
diff --git a/LuaSL/build.sh b/LuaSL/build.sh
index 9f2420b..bf82075 100755
--- a/LuaSL/build.sh
+++ b/LuaSL/build.sh
@@ -94,3 +94,13 @@ command="gcc $CFLAGS -o ../LuaSL_parser $objects $LDFLAGS $libs"
94echo $command 94echo $command
95$command 95$command
96 96
97
98command="flex --outfile=LuaSL_LSL_lexer.c --header-file=LuaSL_LSL_lexer.h LuaSL_LSL_lexer.l"
99echo $command
100$command
101
102command="btyacc -d -b LuaSL_LSL_yaccer -S btyacc-c.ske LuaSL_LSL_yaccer.y"
103echo $command
104$command
105
106
diff --git a/LuaSL/src/LuaSL_LSL_lexer.l b/LuaSL/src/LuaSL_LSL_lexer.l
new file mode 100644
index 0000000..584087e
--- /dev/null
+++ b/LuaSL/src/LuaSL_LSL_lexer.l
@@ -0,0 +1,943 @@
1
2N [0-9]
3L [a-zA-Z_]
4H [a-fA-F0-9]
5E [Ee][+-]?{N}+
6FS (f|F)
7%e 10000
8%n 4000
9%p 5000
10
11%{
12#include "linden_common.h"
13// Deal with the fact that lex/yacc generates unreachable code
14#ifdef LL_WINDOWS
15#pragma warning (disable : 4018) // warning C4018: signed/unsigned mismatch
16#pragma warning (disable : 4702) // warning C4702: unreachable code
17#endif // LL_WINDOWS
18#include "llmath.h"
19#include "lscript_tree.h"
20#include "lscript_typecheck.h"
21#include "lscript_resource.h"
22#include "indra.y.hpp"
23#include "lltimer.h"
24#include "indra_constants.h"
25#include "llagentconstants.h"
26#include "lllslconstants.h"
27#include "lluuid.h"
28#include "llassetstorage.h"
29#include "llpartdata.h"
30#include "llvehicleparams.h"
31#include "llpermissionsflags.h"
32#include "llfollowcamparams.h"
33#include "llparcelflags.h"
34#include "llregionflags.h"
35#include "lscript_http.h"
36#include "llclickaction.h"
37
38void count();
39void line_comment();
40void block_comment();
41void parse_string();
42
43#define YYLMAX 16384
44#define YY_NEVER_INTERACTIVE 1 /* stops flex from calling isatty() */
45#ifdef LL_WINDOWS
46#define isatty(x) 0 /* hack for bug in cygwin flex 2.5.35 */
47#endif
48
49#ifdef ECHO
50#undef ECHO
51#endif
52
53#define ECHO do { } while (0)
54
55#if defined(__cplusplus)
56extern "C" { int yylex( void ); }
57extern "C" { int yyparse( void ); }
58extern "C" { int yyerror(const char *fmt, ...); }
59#endif
60
61%}
62
63%%
64"//" { gInternalLine++; gInternalColumn = 0; line_comment(); }
65"/*" { block_comment(); }
66
67"integer" { count(); return(INTEGER); }
68"float" { count(); return(FLOAT_TYPE); }
69"string" { count(); return(STRING); }
70"key" { count(); return(LLKEY); }
71"vector" { count(); return(VECTOR); }
72"quaternion" { count(); return(QUATERNION); }
73"rotation" { count(); return(QUATERNION); }
74"list" { count(); return(LIST); }
75
76"default" { count(); yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(STATE_DEFAULT); }
77"state" { count(); return(STATE); }
78"event" { count(); return(EVENT); }
79"jump" { count(); return(JUMP); }
80"return" { count(); return(RETURN); }
81"if" { count(); return(IF); }
82"else" { count(); return(ELSE); }
83"for" { count(); return(FOR); }
84"do" { count(); return(DO); }
85"while" { count(); return(WHILE); }
86
87"state_entry" { count(); return(STATE_ENTRY); }
88"state_exit" { count(); return(STATE_EXIT); }
89"touch_start" { count(); return(TOUCH_START); }
90"touch" { count(); return(TOUCH); }
91"touch_end" { count(); return(TOUCH_END); }
92"collision_start" { count(); return(COLLISION_START); }
93"collision" { count(); return(COLLISION); }
94"collision_end" { count(); return(COLLISION_END); }
95"land_collision_start" { count(); return(LAND_COLLISION_START); }
96"land_collision" { count(); return(LAND_COLLISION); }
97"land_collision_end" { count(); return(LAND_COLLISION_END); }
98"timer" { count(); return(TIMER); }
99"listen" { count(); return(CHAT); }
100"sensor" { count(); return(SENSOR); }
101"no_sensor" { count(); return(NO_SENSOR); }
102"control" { count(); return(CONTROL); }
103"print" { count(); return(PRINT); }
104"at_target" { count(); return(AT_TARGET); }
105"not_at_target" { count(); return(NOT_AT_TARGET); }
106"at_rot_target" { count(); return(AT_ROT_TARGET); }
107"not_at_rot_target" { count(); return(NOT_AT_ROT_TARGET); }
108"money" { count(); return(MONEY); }
109"email" { count(); return(EMAIL); }
110"run_time_permissions" { count(); return(RUN_TIME_PERMISSIONS); }
111"changed" { count(); return(INVENTORY); }
112"attach" { count(); return(ATTACH); }
113"dataserver" { count(); return(DATASERVER); }
114"moving_start" { count(); return(MOVING_START); }
115"moving_end" { count(); return(MOVING_END); }
116"link_message" { count(); return(LINK_MESSAGE); }
117"on_rez" { count(); return(REZ); }
118"object_rez" { count(); return(OBJECT_REZ); }
119"remote_data" { count(); return(REMOTE_DATA); }
120"http_response" { count(); return(HTTP_RESPONSE); }
121"http_request" { count(); return(HTTP_REQUEST); }
122"." { count(); return(PERIOD); }
123
124
1250[xX]{H}+ { count(); yylval.ival = strtoul(yytext, NULL, 0); return(INTEGER_CONSTANT); }
126{N}+ { count(); yylval.ival = strtoul(yytext, NULL, 10); return(INTEGER_CONSTANT); }
127"TRUE" { count(); yylval.ival = 1; return(INTEGER_TRUE); }
128"FALSE" { count(); yylval.ival = 0; return(INTEGER_FALSE); }
129"STATUS_PHYSICS" { count(); yylval.ival = 0x1; return(INTEGER_CONSTANT); }
130"STATUS_ROTATE_X" { count(); yylval.ival = 0x2; return(INTEGER_CONSTANT); }
131"STATUS_ROTATE_Y" { count(); yylval.ival = 0x4; return(INTEGER_CONSTANT); }
132"STATUS_ROTATE_Z" { count(); yylval.ival = 0x8; return(INTEGER_CONSTANT); }
133"STATUS_PHANTOM" { count(); yylval.ival = 0x10; return(INTEGER_CONSTANT); }
134"STATUS_SANDBOX" { count(); yylval.ival = 0x20; return(INTEGER_CONSTANT); }
135"STATUS_BLOCK_GRAB" { count(); yylval.ival = 0x40; return(INTEGER_CONSTANT); }
136"STATUS_DIE_AT_EDGE" { count(); yylval.ival = 0x80; return(INTEGER_CONSTANT); }
137"STATUS_RETURN_AT_EDGE" { count(); yylval.ival = 0x100; return(INTEGER_CONSTANT); }
138"STATUS_CAST_SHADOWS" { count(); yylval.ival = 0x200; return(INTEGER_CONSTANT); }
139
140"AGENT_FLYING" { count(); yylval.ival = AGENT_FLYING; return(INTEGER_CONSTANT); }
141"AGENT_ATTACHMENTS" { count(); yylval.ival = AGENT_ATTACHMENTS; return(INTEGER_CONSTANT); }
142"AGENT_SCRIPTED" { count(); yylval.ival = AGENT_SCRIPTED; return(INTEGER_CONSTANT); }
143"AGENT_MOUSELOOK" { count(); yylval.ival = AGENT_MOUSELOOK; return(INTEGER_CONSTANT); }
144"AGENT_SITTING" { count(); yylval.ival = AGENT_SITTING; return(INTEGER_CONSTANT); }
145"AGENT_ON_OBJECT" { count(); yylval.ival = AGENT_ON_OBJECT; return(INTEGER_CONSTANT); }
146"AGENT_AWAY" { count(); yylval.ival = AGENT_AWAY; return(INTEGER_CONSTANT); }
147"AGENT_WALKING" { count(); yylval.ival = AGENT_WALKING; return(INTEGER_CONSTANT); }
148"AGENT_IN_AIR" { count(); yylval.ival = AGENT_IN_AIR; return(INTEGER_CONSTANT); }
149"AGENT_TYPING" { count(); yylval.ival = AGENT_TYPING; return(INTEGER_CONSTANT); }
150"AGENT_CROUCHING" { count(); yylval.ival = AGENT_CROUCHING; return(INTEGER_CONSTANT); }
151"AGENT_BUSY" { count(); yylval.ival = AGENT_BUSY; return(INTEGER_CONSTANT); }
152"AGENT_ALWAYS_RUN" { count(); yylval.ival = AGENT_ALWAYS_RUN; return(INTEGER_CONSTANT); }
153"AGENT_AUTOPILOT" { count(); yylval.ival = AGENT_AUTOPILOT; return(INTEGER_CONSTANT); }
154
155"CAMERA_PITCH" { count(); yylval.ival = FOLLOWCAM_PITCH; return(INTEGER_CONSTANT); }
156"CAMERA_FOCUS_OFFSET" { count(); yylval.ival = FOLLOWCAM_FOCUS_OFFSET; return (INTEGER_CONSTANT); }
157"CAMERA_POSITION_LAG" { count(); yylval.ival = FOLLOWCAM_POSITION_LAG; return (INTEGER_CONSTANT); }
158"CAMERA_FOCUS_LAG" { count(); yylval.ival = FOLLOWCAM_FOCUS_LAG; return (INTEGER_CONSTANT); }
159"CAMERA_DISTANCE" { count(); yylval.ival = FOLLOWCAM_DISTANCE; return (INTEGER_CONSTANT); }
160"CAMERA_BEHINDNESS_ANGLE" { count(); yylval.ival = FOLLOWCAM_BEHINDNESS_ANGLE; return (INTEGER_CONSTANT); }
161"CAMERA_BEHINDNESS_LAG" { count(); yylval.ival = FOLLOWCAM_BEHINDNESS_LAG; return (INTEGER_CONSTANT); }
162"CAMERA_POSITION_THRESHOLD" { count(); yylval.ival = FOLLOWCAM_POSITION_THRESHOLD; return (INTEGER_CONSTANT); }
163"CAMERA_FOCUS_THRESHOLD" { count(); yylval.ival = FOLLOWCAM_FOCUS_THRESHOLD; return (INTEGER_CONSTANT); }
164"CAMERA_ACTIVE" { count(); yylval.ival = FOLLOWCAM_ACTIVE; return (INTEGER_CONSTANT); }
165"CAMERA_POSITION" { count(); yylval.ival = FOLLOWCAM_POSITION; return (INTEGER_CONSTANT); }
166"CAMERA_FOCUS" { count(); yylval.ival = FOLLOWCAM_FOCUS; return (INTEGER_CONSTANT); }
167"CAMERA_POSITION_LOCKED" { count(); yylval.ival = FOLLOWCAM_POSITION_LOCKED; return (INTEGER_CONSTANT); }
168"CAMERA_FOCUS_LOCKED" { count(); yylval.ival = FOLLOWCAM_FOCUS_LOCKED; return (INTEGER_CONSTANT); }
169
170"ANIM_ON" { count(); yylval.ival = 0x1; return(INTEGER_CONSTANT); }
171"LOOP" { count(); yylval.ival = 0x2; return(INTEGER_CONSTANT); }
172"REVERSE" { count(); yylval.ival = 0x4; return(INTEGER_CONSTANT); }
173"PING_PONG" { count(); yylval.ival = 0x8; return(INTEGER_CONSTANT); }
174"SMOOTH" { count(); yylval.ival = 0x10; return(INTEGER_CONSTANT); }
175"ROTATE" { count(); yylval.ival = 0x20; return(INTEGER_CONSTANT); }
176"SCALE" { count(); yylval.ival = 0x40; return(INTEGER_CONSTANT); }
177
178"ALL_SIDES" { count(); yylval.ival = LSL_ALL_SIDES; return(INTEGER_CONSTANT); }
179"LINK_ROOT" { count(); yylval.ival = LSL_LINK_ROOT; return(INTEGER_CONSTANT); }
180"LINK_SET" { count(); yylval.ival = LSL_LINK_SET; return(INTEGER_CONSTANT); }
181"LINK_ALL_OTHERS" { count(); yylval.ival = LSL_LINK_ALL_OTHERS; return(INTEGER_CONSTANT); }
182"LINK_ALL_CHILDREN" { count(); yylval.ival = LSL_LINK_ALL_CHILDREN; return(INTEGER_CONSTANT); }
183"LINK_THIS" { count(); yylval.ival = LSL_LINK_THIS; return(INTEGER_CONSTANT); }
184
185"AGENT" { count(); yylval.ival = 0x1; return(INTEGER_CONSTANT); }
186"ACTIVE" { count(); yylval.ival = 0x2; return(INTEGER_CONSTANT); }
187"PASSIVE" { count(); yylval.ival = 0x4; return(INTEGER_CONSTANT); }
188"SCRIPTED" { count(); yylval.ival = 0x8; return(INTEGER_CONSTANT); }
189
190"CONTROL_FWD" { count(); yylval.ival = AGENT_CONTROL_AT_POS; return(INTEGER_CONSTANT); }
191"CONTROL_BACK" { count(); yylval.ival = AGENT_CONTROL_AT_NEG; return(INTEGER_CONSTANT); }
192"CONTROL_LEFT" { count(); yylval.ival = AGENT_CONTROL_LEFT_POS; return(INTEGER_CONSTANT); }
193"CONTROL_RIGHT" { count(); yylval.ival = AGENT_CONTROL_LEFT_NEG; return(INTEGER_CONSTANT); }
194"CONTROL_ROT_LEFT" { count(); yylval.ival = AGENT_CONTROL_YAW_POS; return(INTEGER_CONSTANT); }
195"CONTROL_ROT_RIGHT" { count(); yylval.ival = AGENT_CONTROL_YAW_NEG; return(INTEGER_CONSTANT); }
196"CONTROL_UP" { count(); yylval.ival = AGENT_CONTROL_UP_POS; return(INTEGER_CONSTANT); }
197"CONTROL_DOWN" { count(); yylval.ival = AGENT_CONTROL_UP_NEG; return(INTEGER_CONSTANT); }
198"CONTROL_LBUTTON" { count(); yylval.ival = AGENT_CONTROL_LBUTTON_DOWN; return(INTEGER_CONSTANT); }
199"CONTROL_ML_LBUTTON" { count(); yylval.ival = AGENT_CONTROL_ML_LBUTTON_DOWN; return(INTEGER_CONSTANT); }
200
201"PERMISSION_DEBIT" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_DEBIT]; return(INTEGER_CONSTANT); }
202"PERMISSION_TAKE_CONTROLS" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_TAKE_CONTROLS]; return(INTEGER_CONSTANT); }
203"PERMISSION_REMAP_CONTROLS" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_REMAP_CONTROLS]; return(INTEGER_CONSTANT); }
204"PERMISSION_TRIGGER_ANIMATION" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_TRIGGER_ANIMATION]; return(INTEGER_CONSTANT); }
205"PERMISSION_ATTACH" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_ATTACH]; return(INTEGER_CONSTANT); }
206"PERMISSION_RELEASE_OWNERSHIP" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_RELEASE_OWNERSHIP]; return(INTEGER_CONSTANT); }
207"PERMISSION_CHANGE_LINKS" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_CHANGE_LINKS]; return(INTEGER_CONSTANT); }
208"PERMISSION_CHANGE_JOINTS" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_CHANGE_JOINTS]; return(INTEGER_CONSTANT); }
209"PERMISSION_CHANGE_PERMISSIONS" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_CHANGE_PERMISSIONS]; return(INTEGER_CONSTANT); }
210"PERMISSION_TRACK_CAMERA" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_TRACK_CAMERA]; return(INTEGER_CONSTANT); }
211"PERMISSION_CONTROL_CAMERA" { count(); yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_CONTROL_CAMERA]; return(INTEGER_CONSTANT); }
212
213"INVENTORY_TEXTURE" { count(); yylval.ival = LLAssetType::AT_TEXTURE; return(INTEGER_CONSTANT); }
214"INVENTORY_SOUND" { count(); yylval.ival = LLAssetType::AT_SOUND; return(INTEGER_CONSTANT); }
215"INVENTORY_OBJECT" { count(); yylval.ival = LLAssetType::AT_OBJECT; return(INTEGER_CONSTANT); }
216"INVENTORY_SCRIPT" { count(); yylval.ival = LLAssetType::AT_LSL_TEXT; return(INTEGER_CONSTANT); }
217"INVENTORY_LANDMARK" { count(); yylval.ival = LLAssetType::AT_LANDMARK; return(INTEGER_CONSTANT); }
218"INVENTORY_CLOTHING" { count(); yylval.ival = LLAssetType::AT_CLOTHING; return(INTEGER_CONSTANT); }
219"INVENTORY_NOTECARD" { count(); yylval.ival = LLAssetType::AT_NOTECARD; return(INTEGER_CONSTANT); }
220"INVENTORY_BODYPART" { count(); yylval.ival = LLAssetType::AT_BODYPART; return(INTEGER_CONSTANT); }
221"INVENTORY_ANIMATION" { count(); yylval.ival = LLAssetType::AT_ANIMATION; return(INTEGER_CONSTANT); }
222"INVENTORY_GESTURE" { count(); yylval.ival = LLAssetType::AT_GESTURE; return(INTEGER_CONSTANT); }
223"INVENTORY_ALL" { count(); yylval.ival = LLAssetType::AT_NONE; return(INTEGER_CONSTANT); }
224"INVENTORY_NONE" { count(); yylval.ival = LLAssetType::AT_NONE; return(INTEGER_CONSTANT); }
225
226"CHANGED_INVENTORY" { count(); yylval.ival = CHANGED_INVENTORY; return(INTEGER_CONSTANT); }
227"CHANGED_COLOR" { count(); yylval.ival = CHANGED_COLOR; return(INTEGER_CONSTANT); }
228"CHANGED_SHAPE" { count(); yylval.ival = CHANGED_SHAPE; return(INTEGER_CONSTANT); }
229"CHANGED_SCALE" { count(); yylval.ival = CHANGED_SCALE; return(INTEGER_CONSTANT); }
230"CHANGED_TEXTURE" { count(); yylval.ival = CHANGED_TEXTURE; return(INTEGER_CONSTANT); }
231"CHANGED_LINK" { count(); yylval.ival = CHANGED_LINK; return(INTEGER_CONSTANT); }
232"CHANGED_ALLOWED_DROP" { count(); yylval.ival = CHANGED_ALLOWED_DROP; return(INTEGER_CONSTANT); }
233"CHANGED_OWNER" { count(); yylval.ival = CHANGED_OWNER; return(INTEGER_CONSTANT); }
234"CHANGED_REGION" { count(); yylval.ival = CHANGED_REGION; return(INTEGER_CONSTANT); }
235"CHANGED_TELEPORT" { count(); yylval.ival = CHANGED_TELEPORT; return(INTEGER_CONSTANT); }
236"CHANGED_REGION_START" { count(); yylval.ival = CHANGED_REGION_START; return(INTEGER_CONSTANT); }
237"CHANGED_MEDIA" { count(); yylval.ival = CHANGED_MEDIA; return(INTEGER_CONSTANT); }
238
239"OBJECT_UNKNOWN_DETAIL" { count(); yylval.ival = OBJECT_UNKNOWN_DETAIL; return(INTEGER_CONSTANT); }
240"OBJECT_NAME" { count(); yylval.ival = OBJECT_NAME; return(INTEGER_CONSTANT); }
241"OBJECT_DESC" { count(); yylval.ival = OBJECT_DESC; return(INTEGER_CONSTANT); }
242"OBJECT_POS" { count(); yylval.ival = OBJECT_POS; return(INTEGER_CONSTANT); }
243"OBJECT_ROT" { count(); yylval.ival = OBJECT_ROT; return(INTEGER_CONSTANT); }
244"OBJECT_VELOCITY" { count(); yylval.ival = OBJECT_VELOCITY; return(INTEGER_CONSTANT); }
245"OBJECT_OWNER" { count(); yylval.ival = OBJECT_OWNER; return(INTEGER_CONSTANT); }
246"OBJECT_GROUP" { count(); yylval.ival = OBJECT_GROUP; return(INTEGER_CONSTANT); }
247"OBJECT_CREATOR" { count(); yylval.ival = OBJECT_CREATOR; return(INTEGER_CONSTANT); }
248
249"TYPE_INTEGER" { count(); yylval.ival = LST_INTEGER; return(INTEGER_CONSTANT); }
250"TYPE_FLOAT" { count(); yylval.ival = LST_FLOATINGPOINT; return(INTEGER_CONSTANT); }
251"TYPE_STRING" { count(); yylval.ival = LST_STRING; return(INTEGER_CONSTANT); }
252"TYPE_KEY" { count(); yylval.ival = LST_KEY; return(INTEGER_CONSTANT); }
253"TYPE_VECTOR" { count(); yylval.ival = LST_VECTOR; return(INTEGER_CONSTANT); }
254"TYPE_ROTATION" { count(); yylval.ival = LST_QUATERNION; return(INTEGER_CONSTANT); }
255"TYPE_INVALID" { count(); yylval.ival = LST_NULL; return(INTEGER_CONSTANT); }
256
257"NULL_KEY" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "00000000-0000-0000-0000-000000000000"); return(STRING_CONSTANT); }
258"EOF" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "\n\n\n"); return(STRING_CONSTANT); }
259"URL_REQUEST_GRANTED" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, URL_REQUEST_GRANTED); return(STRING_CONSTANT); }
260"URL_REQUEST_DENIED" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, URL_REQUEST_DENIED); return(STRING_CONSTANT); }
261
262"PI" { count(); yylval.fval = F_PI; return(FP_CONSTANT); }
263"TWO_PI" { count(); yylval.fval = F_TWO_PI; return(FP_CONSTANT); }
264"PI_BY_TWO" { count(); yylval.fval = F_PI_BY_TWO; return(FP_CONSTANT); }
265"DEG_TO_RAD" { count(); yylval.fval = DEG_TO_RAD; return(FP_CONSTANT); }
266"RAD_TO_DEG" { count(); yylval.fval = RAD_TO_DEG; return(FP_CONSTANT); }
267"SQRT2" { count(); yylval.fval = F_SQRT2; return(FP_CONSTANT); }
268
269"DEBUG_CHANNEL" { count(); yylval.ival = CHAT_CHANNEL_DEBUG; return(INTEGER_CONSTANT); }
270"PUBLIC_CHANNEL" { count(); yylval.ival = 0; return(INTEGER_CONSTANT); }
271
272"ZERO_VECTOR" { count(); return(ZERO_VECTOR); }
273"ZERO_ROTATION" { count(); return(ZERO_ROTATION); }
274
275"ATTACH_CHEST" { count(); yylval.ival = 1; return(INTEGER_CONSTANT); }
276"ATTACH_HEAD" { count(); yylval.ival = 2; return(INTEGER_CONSTANT); }
277"ATTACH_LSHOULDER" { count(); yylval.ival = 3; return(INTEGER_CONSTANT); }
278"ATTACH_RSHOULDER" { count(); yylval.ival = 4; return(INTEGER_CONSTANT); }
279"ATTACH_LHAND" { count(); yylval.ival = 5; return(INTEGER_CONSTANT); }
280"ATTACH_RHAND" { count(); yylval.ival = 6; return(INTEGER_CONSTANT); }
281"ATTACH_LFOOT" { count(); yylval.ival = 7; return(INTEGER_CONSTANT); }
282"ATTACH_RFOOT" { count(); yylval.ival = 8; return(INTEGER_CONSTANT); }
283"ATTACH_BACK" { count(); yylval.ival = 9; return(INTEGER_CONSTANT); }
284"ATTACH_PELVIS" { count(); yylval.ival = 10; return(INTEGER_CONSTANT); }
285"ATTACH_MOUTH" { count(); yylval.ival = 11; return(INTEGER_CONSTANT); }
286"ATTACH_CHIN" { count(); yylval.ival = 12; return(INTEGER_CONSTANT); }
287"ATTACH_LEAR" { count(); yylval.ival = 13; return(INTEGER_CONSTANT); }
288"ATTACH_REAR" { count(); yylval.ival = 14; return(INTEGER_CONSTANT); }
289"ATTACH_LEYE" { count(); yylval.ival = 15; return(INTEGER_CONSTANT); }
290"ATTACH_REYE" { count(); yylval.ival = 16; return(INTEGER_CONSTANT); }
291"ATTACH_NOSE" { count(); yylval.ival = 17; return(INTEGER_CONSTANT); }
292"ATTACH_RUARM" { count(); yylval.ival = 18; return(INTEGER_CONSTANT); }
293"ATTACH_RLARM" { count(); yylval.ival = 19; return(INTEGER_CONSTANT); }
294"ATTACH_LUARM" { count(); yylval.ival = 20; return(INTEGER_CONSTANT); }
295"ATTACH_LLARM" { count(); yylval.ival = 21; return(INTEGER_CONSTANT); }
296"ATTACH_RHIP" { count(); yylval.ival = 22; return(INTEGER_CONSTANT); }
297"ATTACH_RULEG" { count(); yylval.ival = 23; return(INTEGER_CONSTANT); }
298"ATTACH_RLLEG" { count(); yylval.ival = 24; return(INTEGER_CONSTANT); }
299"ATTACH_LHIP" { count(); yylval.ival = 25; return(INTEGER_CONSTANT); }
300"ATTACH_LULEG" { count(); yylval.ival = 26; return(INTEGER_CONSTANT); }
301"ATTACH_LLLEG" { count(); yylval.ival = 27; return(INTEGER_CONSTANT); }
302"ATTACH_BELLY" { count(); yylval.ival = 28; return(INTEGER_CONSTANT); }
303"ATTACH_RPEC" { count(); yylval.ival = 29; return(INTEGER_CONSTANT); }
304"ATTACH_LPEC" { count(); yylval.ival = 30; return(INTEGER_CONSTANT); }
305"ATTACH_HUD_CENTER_2" { count(); yylval.ival = 31; return(INTEGER_CONSTANT); }
306"ATTACH_HUD_TOP_RIGHT" { count(); yylval.ival = 32; return(INTEGER_CONSTANT); }
307"ATTACH_HUD_TOP_CENTER" { count(); yylval.ival = 33; return(INTEGER_CONSTANT); }
308"ATTACH_HUD_TOP_LEFT" { count(); yylval.ival = 34; return(INTEGER_CONSTANT); }
309"ATTACH_HUD_CENTER_1" { count(); yylval.ival = 35; return(INTEGER_CONSTANT); }
310"ATTACH_HUD_BOTTOM_LEFT" { count(); yylval.ival = 36; return(INTEGER_CONSTANT); }
311"ATTACH_HUD_BOTTOM" { count(); yylval.ival = 37; return(INTEGER_CONSTANT); }
312"ATTACH_HUD_BOTTOM_RIGHT" { count(); yylval.ival = 38; return(INTEGER_CONSTANT); }
313
314"LAND_LEVEL" { count(); yylval.ival = E_LANDBRUSH_LEVEL; return(INTEGER_CONSTANT); }
315"LAND_RAISE" { count(); yylval.ival = E_LANDBRUSH_RAISE; return(INTEGER_CONSTANT); }
316"LAND_LOWER" { count(); yylval.ival = E_LANDBRUSH_LOWER; return(INTEGER_CONSTANT); }
317"LAND_SMOOTH" { count(); yylval.ival = E_LANDBRUSH_SMOOTH; return(INTEGER_CONSTANT); }
318"LAND_NOISE" { count(); yylval.ival = E_LANDBRUSH_NOISE; return(INTEGER_CONSTANT); }
319"LAND_REVERT" { count(); yylval.ival = E_LANDBRUSH_REVERT; return(INTEGER_CONSTANT); }
320
321"LAND_SMALL_BRUSH" { count(); yylval.ival = 1; return(INTEGER_CONSTANT); }
322"LAND_MEDIUM_BRUSH" { count(); yylval.ival = 2; return(INTEGER_CONSTANT); }
323"LAND_LARGE_BRUSH" { count(); yylval.ival = 3; return(INTEGER_CONSTANT); }
324
325"DATA_ONLINE" { count(); yylval.ival = 1; return(INTEGER_CONSTANT); }
326"DATA_NAME" { count(); yylval.ival = 2; return(INTEGER_CONSTANT); }
327"DATA_BORN" { count(); yylval.ival = 3; return(INTEGER_CONSTANT); }
328"DATA_RATING" { count(); yylval.ival = 4; return(INTEGER_CONSTANT); }
329"DATA_SIM_POS" { count(); yylval.ival = 5; return(INTEGER_CONSTANT); }
330"DATA_SIM_STATUS" { count(); yylval.ival = 6; return(INTEGER_CONSTANT); }
331"DATA_SIM_RATING" { count(); yylval.ival = 7; return(INTEGER_CONSTANT); }
332"DATA_PAYINFO" { count(); yylval.ival = 8; return(INTEGER_CONSTANT); }
333
334"PAYMENT_INFO_ON_FILE" { count(); yylval.ival = 1; return(INTEGER_CONSTANT); }
335"PAYMENT_INFO_USED" { count(); yylval.ival = 2; return(INTEGER_CONSTANT); }
336
337"REMOTE_DATA_CHANNEL" { count(); yylval.ival = LSL_REMOTE_DATA_CHANNEL; return(INTEGER_CONSTANT); }
338"REMOTE_DATA_REQUEST" { count(); yylval.ival = LSL_REMOTE_DATA_REQUEST; return(INTEGER_CONSTANT); }
339"REMOTE_DATA_REPLY" { count(); yylval.ival = LSL_REMOTE_DATA_REPLY; return(INTEGER_CONSTANT); }
340
341
342"PSYS_PART_FLAGS" { count(); yylval.ival = LLPS_PART_FLAGS; return(INTEGER_CONSTANT); }
343"PSYS_PART_START_COLOR" { count(); yylval.ival = LLPS_PART_START_COLOR; return (INTEGER_CONSTANT); }
344"PSYS_PART_START_ALPHA" { count(); yylval.ival = LLPS_PART_START_ALPHA; return (INTEGER_CONSTANT); }
345"PSYS_PART_START_SCALE" { count(); yylval.ival = LLPS_PART_START_SCALE; return (INTEGER_CONSTANT); }
346"PSYS_PART_END_COLOR" { count(); yylval.ival = LLPS_PART_END_COLOR; return (INTEGER_CONSTANT); }
347"PSYS_PART_END_ALPHA" { count(); yylval.ival = LLPS_PART_END_ALPHA; return (INTEGER_CONSTANT); }
348"PSYS_PART_END_SCALE" { count(); yylval.ival = LLPS_PART_END_SCALE; return (INTEGER_CONSTANT); }
349"PSYS_PART_MAX_AGE" { count(); yylval.ival = LLPS_PART_MAX_AGE; return (INTEGER_CONSTANT); }
350
351
352"PSYS_PART_WIND_MASK" { count(); yylval.ival = LLPartData::LL_PART_WIND_MASK; return(INTEGER_CONSTANT); }
353"PSYS_PART_INTERP_COLOR_MASK" { count(); yylval.ival = LLPartData::LL_PART_INTERP_COLOR_MASK; return(INTEGER_CONSTANT); }
354"PSYS_PART_INTERP_SCALE_MASK" { count(); yylval.ival = LLPartData::LL_PART_INTERP_SCALE_MASK; return(INTEGER_CONSTANT); }
355"PSYS_PART_BOUNCE_MASK" { count(); yylval.ival = LLPartData::LL_PART_BOUNCE_MASK; return(INTEGER_CONSTANT); }
356"PSYS_PART_FOLLOW_SRC_MASK" { count(); yylval.ival = LLPartData::LL_PART_FOLLOW_SRC_MASK; return(INTEGER_CONSTANT); }
357"PSYS_PART_FOLLOW_VELOCITY_MASK" { count(); yylval.ival = LLPartData::LL_PART_FOLLOW_VELOCITY_MASK; return(INTEGER_CONSTANT); }
358"PSYS_PART_TARGET_POS_MASK" { count(); yylval.ival = LLPartData::LL_PART_TARGET_POS_MASK; return(INTEGER_CONSTANT); }
359"PSYS_PART_EMISSIVE_MASK" { count(); yylval.ival = LLPartData::LL_PART_EMISSIVE_MASK; return(INTEGER_CONSTANT); }
360"PSYS_PART_TARGET_LINEAR_MASK" { count(); yylval.ival = LLPartData::LL_PART_TARGET_LINEAR_MASK; return(INTEGER_CONSTANT); }
361
362
363"PSYS_SRC_MAX_AGE" { count(); yylval.ival = LLPS_SRC_MAX_AGE; return(INTEGER_CONSTANT); }
364"PSYS_SRC_PATTERN" { count(); yylval.ival = LLPS_SRC_PATTERN; return(INTEGER_CONSTANT); }
365"PSYS_SRC_INNERANGLE" { count(); yylval.ival = LLPS_SRC_INNERANGLE; return(INTEGER_CONSTANT); }
366"PSYS_SRC_OUTERANGLE" { count(); yylval.ival = LLPS_SRC_OUTERANGLE; return(INTEGER_CONSTANT); }
367"PSYS_SRC_ANGLE_BEGIN" { count(); yylval.ival = LLPS_SRC_ANGLE_BEGIN; return(INTEGER_CONSTANT); }
368"PSYS_SRC_ANGLE_END" { count(); yylval.ival = LLPS_SRC_ANGLE_END; return(INTEGER_CONSTANT); }
369"PSYS_SRC_BURST_RATE" { count(); yylval.ival = LLPS_SRC_BURST_RATE; return(INTEGER_CONSTANT); }
370"PSYS_SRC_BURST_PART_COUNT" { count(); yylval.ival = LLPS_SRC_BURST_PART_COUNT; return(INTEGER_CONSTANT); }
371"PSYS_SRC_BURST_RADIUS" { count(); yylval.ival = LLPS_SRC_BURST_RADIUS; return(INTEGER_CONSTANT); }
372"PSYS_SRC_BURST_SPEED_MIN" { count(); yylval.ival = LLPS_SRC_BURST_SPEED_MIN; return(INTEGER_CONSTANT); }
373"PSYS_SRC_BURST_SPEED_MAX" { count(); yylval.ival = LLPS_SRC_BURST_SPEED_MAX; return(INTEGER_CONSTANT); }
374"PSYS_SRC_ACCEL" { count(); yylval.ival = LLPS_SRC_ACCEL; return(INTEGER_CONSTANT); }
375"PSYS_SRC_TEXTURE" { count(); yylval.ival = LLPS_SRC_TEXTURE; return(INTEGER_CONSTANT); }
376"PSYS_SRC_TARGET_KEY" { count(); yylval.ival = LLPS_SRC_TARGET_UUID; return(INTEGER_CONSTANT); }
377"PSYS_SRC_OMEGA" { count(); yylval.ival = LLPS_SRC_OMEGA; return(INTEGER_CONSTANT); }
378
379"PSYS_SRC_OBJ_REL_MASK" { count(); yylval.ival = LLPartSysData::LL_PART_SRC_OBJ_REL_MASK; return(INTEGER_CONSTANT); }
380
381"PSYS_SRC_PATTERN_DROP" { count(); yylval.ival = LLPartSysData::LL_PART_SRC_PATTERN_DROP; return(INTEGER_CONSTANT); }
382"PSYS_SRC_PATTERN_EXPLODE" { count(); yylval.ival = LLPartSysData::LL_PART_SRC_PATTERN_EXPLODE; return(INTEGER_CONSTANT); }
383"PSYS_SRC_PATTERN_ANGLE" { count(); yylval.ival = LLPartSysData::LL_PART_SRC_PATTERN_ANGLE; return(INTEGER_CONSTANT); }
384"PSYS_SRC_PATTERN_ANGLE_CONE" { count(); yylval.ival = LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE; return(INTEGER_CONSTANT); }
385"PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY" { count(); yylval.ival = LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE_EMPTY; return(INTEGER_CONSTANT); }
386
387
388"VEHICLE_TYPE_NONE" { count(); yylval.ival = VEHICLE_TYPE_NONE; return(INTEGER_CONSTANT); }
389"VEHICLE_TYPE_SLED" { count(); yylval.ival = VEHICLE_TYPE_SLED; return(INTEGER_CONSTANT); }
390"VEHICLE_TYPE_CAR" { count(); yylval.ival = VEHICLE_TYPE_CAR; return(INTEGER_CONSTANT); }
391"VEHICLE_TYPE_BOAT" { count(); yylval.ival = VEHICLE_TYPE_BOAT; return(INTEGER_CONSTANT); }
392"VEHICLE_TYPE_AIRPLANE" { count(); yylval.ival = VEHICLE_TYPE_AIRPLANE; return(INTEGER_CONSTANT); }
393"VEHICLE_TYPE_BALLOON" { count(); yylval.ival = VEHICLE_TYPE_BALLOON; return(INTEGER_CONSTANT); }
394
395"VEHICLE_REFERENCE_FRAME" { count(); yylval.ival = VEHICLE_REFERENCE_FRAME; return(INTEGER_CONSTANT); }
396"VEHICLE_LINEAR_FRICTION_TIMESCALE" { count(); yylval.ival = VEHICLE_LINEAR_FRICTION_TIMESCALE; return(INTEGER_CONSTANT); }
397"VEHICLE_ANGULAR_FRICTION_TIMESCALE" { count(); yylval.ival = VEHICLE_ANGULAR_FRICTION_TIMESCALE; return(INTEGER_CONSTANT); }
398"VEHICLE_LINEAR_MOTOR_DIRECTION" { count(); yylval.ival = VEHICLE_LINEAR_MOTOR_DIRECTION; return(INTEGER_CONSTANT); }
399"VEHICLE_ANGULAR_MOTOR_DIRECTION" { count(); yylval.ival = VEHICLE_ANGULAR_MOTOR_DIRECTION; return(INTEGER_CONSTANT); }
400"VEHICLE_LINEAR_MOTOR_OFFSET" { count(); yylval.ival = VEHICLE_LINEAR_MOTOR_OFFSET; return(INTEGER_CONSTANT); }
401
402
403
404"VEHICLE_HOVER_HEIGHT" { count(); yylval.ival = VEHICLE_HOVER_HEIGHT; return(INTEGER_CONSTANT); }
405"VEHICLE_HOVER_EFFICIENCY" { count(); yylval.ival = VEHICLE_HOVER_EFFICIENCY; return(INTEGER_CONSTANT); }
406"VEHICLE_HOVER_TIMESCALE" { count(); yylval.ival = VEHICLE_HOVER_TIMESCALE; return(INTEGER_CONSTANT); }
407"VEHICLE_BUOYANCY" { count(); yylval.ival = VEHICLE_BUOYANCY; return(INTEGER_CONSTANT); }
408
409"VEHICLE_LINEAR_DEFLECTION_EFFICIENCY" { count(); yylval.ival = VEHICLE_LINEAR_DEFLECTION_EFFICIENCY; return(INTEGER_CONSTANT); }
410"VEHICLE_LINEAR_DEFLECTION_TIMESCALE" { count(); yylval.ival = VEHICLE_LINEAR_DEFLECTION_TIMESCALE; return(INTEGER_CONSTANT); }
411"VEHICLE_LINEAR_MOTOR_TIMESCALE" { count(); yylval.ival = VEHICLE_LINEAR_MOTOR_TIMESCALE; return(INTEGER_CONSTANT); }
412"VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE" { count(); yylval.ival = VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE; return(INTEGER_CONSTANT); }
413
414"VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY" { count(); yylval.ival = VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY; return(INTEGER_CONSTANT); }
415"VEHICLE_ANGULAR_DEFLECTION_TIMESCALE" { count(); yylval.ival = VEHICLE_ANGULAR_DEFLECTION_TIMESCALE; return(INTEGER_CONSTANT); }
416"VEHICLE_ANGULAR_MOTOR_TIMESCALE" { count(); yylval.ival = VEHICLE_ANGULAR_MOTOR_TIMESCALE; return(INTEGER_CONSTANT); }
417"VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE" { count(); yylval.ival = VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE; return(INTEGER_CONSTANT); }
418
419"VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY" { count(); yylval.ival = VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY; return(INTEGER_CONSTANT); }
420"VEHICLE_VERTICAL_ATTRACTION_TIMESCALE" { count(); yylval.ival = VEHICLE_VERTICAL_ATTRACTION_TIMESCALE; return(INTEGER_CONSTANT); }
421
422"VEHICLE_BANKING_EFFICIENCY" { count(); yylval.ival = VEHICLE_BANKING_EFFICIENCY; return(INTEGER_CONSTANT); }
423"VEHICLE_BANKING_MIX" { count(); yylval.ival = VEHICLE_BANKING_MIX; return(INTEGER_CONSTANT); }
424"VEHICLE_BANKING_TIMESCALE" { count(); yylval.ival = VEHICLE_BANKING_TIMESCALE; return(INTEGER_CONSTANT); }
425
426"VEHICLE_FLAG_NO_FLY_UP" { count(); yylval.ival = VEHICLE_FLAG_NO_DEFLECTION_UP; return(INTEGER_CONSTANT); }
427"VEHICLE_FLAG_NO_DEFLECTION_UP" { count(); yylval.ival = VEHICLE_FLAG_NO_DEFLECTION_UP; return(INTEGER_CONSTANT); }
428"VEHICLE_FLAG_LIMIT_ROLL_ONLY" { count(); yylval.ival = VEHICLE_FLAG_LIMIT_ROLL_ONLY; return(INTEGER_CONSTANT); }
429"VEHICLE_FLAG_HOVER_WATER_ONLY" { count(); yylval.ival = VEHICLE_FLAG_HOVER_WATER_ONLY; return(INTEGER_CONSTANT); }
430"VEHICLE_FLAG_HOVER_TERRAIN_ONLY" { count(); yylval.ival = VEHICLE_FLAG_HOVER_TERRAIN_ONLY; return(INTEGER_CONSTANT); }
431"VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT" { count(); yylval.ival = VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT; return(INTEGER_CONSTANT); }
432"VEHICLE_FLAG_HOVER_UP_ONLY" { count(); yylval.ival = VEHICLE_FLAG_HOVER_UP_ONLY; return(INTEGER_CONSTANT); }
433"VEHICLE_FLAG_LIMIT_MOTOR_UP" { count(); yylval.ival = VEHICLE_FLAG_LIMIT_MOTOR_UP; return(INTEGER_CONSTANT); }
434"VEHICLE_FLAG_MOUSELOOK_STEER" { count(); yylval.ival = VEHICLE_FLAG_MOUSELOOK_STEER; return(INTEGER_CONSTANT); }
435"VEHICLE_FLAG_MOUSELOOK_BANK" { count(); yylval.ival = VEHICLE_FLAG_MOUSELOOK_BANK; return(INTEGER_CONSTANT); }
436"VEHICLE_FLAG_CAMERA_DECOUPLED" { count(); yylval.ival = VEHICLE_FLAG_CAMERA_DECOUPLED; return(INTEGER_CONSTANT); }
437
438
439
440"PRIM_TYPE" { count(); yylval.ival = LSL_PRIM_TYPE; return(INTEGER_CONSTANT); }
441"PRIM_MATERIAL" { count(); yylval.ival = LSL_PRIM_MATERIAL; return(INTEGER_CONSTANT); }
442"PRIM_PHYSICS" { count(); yylval.ival = LSL_PRIM_PHYSICS; return(INTEGER_CONSTANT); }
443"PRIM_FLEXIBLE" { count(); yylval.ival = LSL_PRIM_FLEXIBLE; return(INTEGER_CONSTANT); }
444"PRIM_POINT_LIGHT" { count(); yylval.ival = LSL_PRIM_POINT_LIGHT; return(INTEGER_CONSTANT); }
445"PRIM_TEMP_ON_REZ" { count(); yylval.ival = LSL_PRIM_TEMP_ON_REZ; return(INTEGER_CONSTANT); }
446"PRIM_PHANTOM" { count(); yylval.ival = LSL_PRIM_PHANTOM; return(INTEGER_CONSTANT); }
447"PRIM_CAST_SHADOWS" { count(); yylval.ival = LSL_PRIM_CAST_SHADOWS; return(INTEGER_CONSTANT); }
448"PRIM_POSITION" { count(); yylval.ival = LSL_PRIM_POSITION; return(INTEGER_CONSTANT); }
449"PRIM_SIZE" { count(); yylval.ival = LSL_PRIM_SIZE; return(INTEGER_CONSTANT); }
450"PRIM_ROTATION" { count(); yylval.ival = LSL_PRIM_ROTATION; return(INTEGER_CONSTANT); }
451"PRIM_TEXTURE" { count(); yylval.ival = LSL_PRIM_TEXTURE; return(INTEGER_CONSTANT); }
452"PRIM_COLOR" { count(); yylval.ival = LSL_PRIM_COLOR; return(INTEGER_CONSTANT); }
453"PRIM_BUMP_SHINY" { count(); yylval.ival = LSL_PRIM_BUMP_SHINY; return(INTEGER_CONSTANT); }
454"PRIM_FULLBRIGHT" { count(); yylval.ival = LSL_PRIM_FULLBRIGHT; return(INTEGER_CONSTANT); }
455"PRIM_TEXGEN" { count(); yylval.ival = LSL_PRIM_TEXGEN; return(INTEGER_CONSTANT); }
456"PRIM_GLOW" { count(); yylval.ival = LSL_PRIM_GLOW; return(INTEGER_CONSTANT); }
457"PRIM_TEXT" { count(); yylval.ival = LSL_PRIM_TEXT; return(INTEGER_CONSTANT); }
458"PRIM_NAME" { count(); yylval.ival = LSL_PRIM_NAME; return(INTEGER_CONSTANT); }
459"PRIM_DESC" { count(); yylval.ival = LSL_PRIM_DESC; return(INTEGER_CONSTANT); }
460
461"PRIM_TYPE_BOX" { count(); yylval.ival = LSL_PRIM_TYPE_BOX; return(INTEGER_CONSTANT); }
462"PRIM_TYPE_CYLINDER" { count(); yylval.ival = LSL_PRIM_TYPE_CYLINDER; return(INTEGER_CONSTANT); }
463"PRIM_TYPE_PRISM" { count(); yylval.ival = LSL_PRIM_TYPE_PRISM; return(INTEGER_CONSTANT); }
464"PRIM_TYPE_SPHERE" { count(); yylval.ival = LSL_PRIM_TYPE_SPHERE; return(INTEGER_CONSTANT); }
465"PRIM_TYPE_TORUS" { count(); yylval.ival = LSL_PRIM_TYPE_TORUS; return(INTEGER_CONSTANT); }
466"PRIM_TYPE_TUBE" { count(); yylval.ival = LSL_PRIM_TYPE_TUBE; return(INTEGER_CONSTANT); }
467"PRIM_TYPE_RING" { count(); yylval.ival = LSL_PRIM_TYPE_RING; return(INTEGER_CONSTANT); }
468"PRIM_TYPE_SCULPT" { count(); yylval.ival = LSL_PRIM_TYPE_SCULPT; return(INTEGER_CONSTANT); }
469
470"PRIM_HOLE_DEFAULT" { count(); yylval.ival = LSL_PRIM_HOLE_DEFAULT; return(INTEGER_CONSTANT); }
471"PRIM_HOLE_CIRCLE" { count(); yylval.ival = LSL_PRIM_HOLE_CIRCLE; return(INTEGER_CONSTANT); }
472"PRIM_HOLE_SQUARE" { count(); yylval.ival = LSL_PRIM_HOLE_SQUARE; return(INTEGER_CONSTANT); }
473"PRIM_HOLE_TRIANGLE" { count(); yylval.ival = LSL_PRIM_HOLE_TRIANGLE; return(INTEGER_CONSTANT); }
474
475"PRIM_MATERIAL_STONE" { count(); yylval.ival = LSL_PRIM_MATERIAL_STONE; return(INTEGER_CONSTANT); }
476"PRIM_MATERIAL_METAL" { count(); yylval.ival = LSL_PRIM_MATERIAL_METAL; return(INTEGER_CONSTANT); }
477"PRIM_MATERIAL_GLASS" { count(); yylval.ival = LSL_PRIM_MATERIAL_GLASS; return(INTEGER_CONSTANT); }
478"PRIM_MATERIAL_WOOD" { count(); yylval.ival = LSL_PRIM_MATERIAL_WOOD; return(INTEGER_CONSTANT); }
479"PRIM_MATERIAL_FLESH" { count(); yylval.ival = LSL_PRIM_MATERIAL_FLESH; return(INTEGER_CONSTANT); }
480"PRIM_MATERIAL_PLASTIC" { count(); yylval.ival = LSL_PRIM_MATERIAL_PLASTIC; return(INTEGER_CONSTANT); }
481"PRIM_MATERIAL_RUBBER" { count(); yylval.ival = LSL_PRIM_MATERIAL_RUBBER; return(INTEGER_CONSTANT); }
482"PRIM_MATERIAL_LIGHT" { count(); yylval.ival = LSL_PRIM_MATERIAL_LIGHT; return(INTEGER_CONSTANT); }
483
484"PRIM_SHINY_NONE" { count(); yylval.ival = LSL_PRIM_SHINY_NONE; return(INTEGER_CONSTANT); }
485"PRIM_SHINY_LOW" { count(); yylval.ival = LSL_PRIM_SHINY_LOW; return(INTEGER_CONSTANT); }
486"PRIM_SHINY_MEDIUM" { count(); yylval.ival = LSL_PRIM_SHINY_MEDIUM; return(INTEGER_CONSTANT); }
487"PRIM_SHINY_HIGH" { count(); yylval.ival = LSL_PRIM_SHINY_HIGH; return(INTEGER_CONSTANT); }
488
489"PRIM_BUMP_NONE" { count(); yylval.ival = LSL_PRIM_BUMP_NONE; return(INTEGER_CONSTANT); }
490"PRIM_BUMP_BRIGHT" { count(); yylval.ival = LSL_PRIM_BUMP_BRIGHT; return(INTEGER_CONSTANT); }
491"PRIM_BUMP_DARK" { count(); yylval.ival = LSL_PRIM_BUMP_DARK; return(INTEGER_CONSTANT); }
492"PRIM_BUMP_WOOD" { count(); yylval.ival = LSL_PRIM_BUMP_WOOD; return(INTEGER_CONSTANT); }
493"PRIM_BUMP_BARK" { count(); yylval.ival = LSL_PRIM_BUMP_BARK; return(INTEGER_CONSTANT); }
494"PRIM_BUMP_BRICKS" { count(); yylval.ival = LSL_PRIM_BUMP_BRICKS; return(INTEGER_CONSTANT); }
495"PRIM_BUMP_CHECKER" { count(); yylval.ival = LSL_PRIM_BUMP_CHECKER; return(INTEGER_CONSTANT); }
496"PRIM_BUMP_CONCRETE" { count(); yylval.ival = LSL_PRIM_BUMP_CONCRETE; return(INTEGER_CONSTANT); }
497"PRIM_BUMP_TILE" { count(); yylval.ival = LSL_PRIM_BUMP_TILE; return(INTEGER_CONSTANT); }
498"PRIM_BUMP_STONE" { count(); yylval.ival = LSL_PRIM_BUMP_STONE; return(INTEGER_CONSTANT); }
499"PRIM_BUMP_DISKS" { count(); yylval.ival = LSL_PRIM_BUMP_DISKS; return(INTEGER_CONSTANT); }
500"PRIM_BUMP_GRAVEL" { count(); yylval.ival = LSL_PRIM_BUMP_GRAVEL; return(INTEGER_CONSTANT); }
501"PRIM_BUMP_BLOBS" { count(); yylval.ival = LSL_PRIM_BUMP_BLOBS; return(INTEGER_CONSTANT); }
502"PRIM_BUMP_SIDING" { count(); yylval.ival = LSL_PRIM_BUMP_SIDING; return(INTEGER_CONSTANT); }
503"PRIM_BUMP_LARGETILE" { count(); yylval.ival = LSL_PRIM_BUMP_LARGETILE; return(INTEGER_CONSTANT); }
504"PRIM_BUMP_STUCCO" { count(); yylval.ival = LSL_PRIM_BUMP_STUCCO; return(INTEGER_CONSTANT); }
505"PRIM_BUMP_SUCTION" { count(); yylval.ival = LSL_PRIM_BUMP_SUCTION; return(INTEGER_CONSTANT); }
506"PRIM_BUMP_WEAVE" { count(); yylval.ival = LSL_PRIM_BUMP_WEAVE; return(INTEGER_CONSTANT); }
507
508"PRIM_TEXGEN_DEFAULT" { count(); yylval.ival = LSL_PRIM_TEXGEN_DEFAULT; return(INTEGER_CONSTANT); }
509"PRIM_TEXGEN_PLANAR" { count(); yylval.ival = LSL_PRIM_TEXGEN_PLANAR; return(INTEGER_CONSTANT); }
510
511"PRIM_SCULPT_TYPE_SPHERE" { count(); yylval.ival = LSL_PRIM_SCULPT_TYPE_SPHERE; return(INTEGER_CONSTANT); }
512"PRIM_SCULPT_TYPE_TORUS" { count(); yylval.ival = LSL_PRIM_SCULPT_TYPE_TORUS; return(INTEGER_CONSTANT); }
513"PRIM_SCULPT_TYPE_PLANE" { count(); yylval.ival = LSL_PRIM_SCULPT_TYPE_PLANE; return(INTEGER_CONSTANT); }
514"PRIM_SCULPT_TYPE_CYLINDER" { count(); yylval.ival = LSL_PRIM_SCULPT_TYPE_CYLINDER; return(INTEGER_CONSTANT); }
515"PRIM_SCULPT_TYPE_MASK" { count(); yylval.ival = LSL_PRIM_SCULPT_TYPE_MASK; return(INTEGER_CONSTANT); }
516"PRIM_SCULPT_FLAG_MIRROR" { count(); yylval.ival = LSL_PRIM_SCULPT_FLAG_MIRROR; return(INTEGER_CONSTANT); }
517"PRIM_SCULPT_FLAG_INVERT" { count(); yylval.ival = LSL_PRIM_SCULPT_FLAG_INVERT; return(INTEGER_CONSTANT); }
518
519"MASK_BASE" { count(); yylval.ival = 0; return(INTEGER_CONSTANT); }
520"MASK_OWNER" { count(); yylval.ival = 1; return(INTEGER_CONSTANT); }
521"MASK_GROUP" { count(); yylval.ival = 2; return(INTEGER_CONSTANT); }
522"MASK_EVERYONE" { count(); yylval.ival = 3; return(INTEGER_CONSTANT); }
523"MASK_NEXT" { count(); yylval.ival = 4; return(INTEGER_CONSTANT); }
524
525"PERM_TRANSFER" { count(); yylval.ival = PERM_TRANSFER; return(INTEGER_CONSTANT); }
526"PERM_MODIFY" { count(); yylval.ival = PERM_MODIFY; return(INTEGER_CONSTANT); }
527"PERM_COPY" { count(); yylval.ival = PERM_COPY; return(INTEGER_CONSTANT); }
528"PERM_MOVE" { count(); yylval.ival = PERM_MOVE; return(INTEGER_CONSTANT); }
529"PERM_ALL" { count(); yylval.ival = PERM_ALL; return(INTEGER_CONSTANT); }
530
531"PARCEL_MEDIA_COMMAND_STOP" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_STOP; return(INTEGER_CONSTANT); }
532"PARCEL_MEDIA_COMMAND_PAUSE" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_PAUSE; return(INTEGER_CONSTANT); }
533"PARCEL_MEDIA_COMMAND_PLAY" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_PLAY; return(INTEGER_CONSTANT); }
534"PARCEL_MEDIA_COMMAND_LOOP" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_LOOP; return(INTEGER_CONSTANT); }
535"PARCEL_MEDIA_COMMAND_TEXTURE" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_TEXTURE; return(INTEGER_CONSTANT); }
536"PARCEL_MEDIA_COMMAND_URL" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_URL; return(INTEGER_CONSTANT); }
537"PARCEL_MEDIA_COMMAND_TIME" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_TIME; return(INTEGER_CONSTANT); }
538"PARCEL_MEDIA_COMMAND_AGENT" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_AGENT; return(INTEGER_CONSTANT); }
539"PARCEL_MEDIA_COMMAND_UNLOAD" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_UNLOAD; return(INTEGER_CONSTANT); }
540"PARCEL_MEDIA_COMMAND_AUTO_ALIGN" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_AUTO_ALIGN; return(INTEGER_CONSTANT); }
541"PARCEL_MEDIA_COMMAND_TYPE" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_TYPE; return(INTEGER_CONSTANT); }
542"PARCEL_MEDIA_COMMAND_SIZE" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_SIZE; return(INTEGER_CONSTANT); }
543"PARCEL_MEDIA_COMMAND_DESC" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_DESC; return(INTEGER_CONSTANT); }
544"PARCEL_MEDIA_COMMAND_LOOP_SET" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_LOOP_SET; return(INTEGER_CONSTANT); }
545
546"LIST_STAT_MAX" { count(); yylval.ival = LIST_STAT_MAX; return(INTEGER_CONSTANT); }
547"LIST_STAT_MIN" { count(); yylval.ival = LIST_STAT_MIN; return(INTEGER_CONSTANT); }
548"LIST_STAT_MEAN" { count(); yylval.ival = LIST_STAT_MEAN; return(INTEGER_CONSTANT); }
549"LIST_STAT_MEDIAN" { count(); yylval.ival = LIST_STAT_MEDIAN; return(INTEGER_CONSTANT); }
550"LIST_STAT_STD_DEV" { count(); yylval.ival = LIST_STAT_STD_DEV; return(INTEGER_CONSTANT); }
551"LIST_STAT_SUM" { count(); yylval.ival = LIST_STAT_SUM; return(INTEGER_CONSTANT); }
552"LIST_STAT_SUM_SQUARES" { count(); yylval.ival = LIST_STAT_SUM_SQUARES; return(INTEGER_CONSTANT); }
553"LIST_STAT_NUM_COUNT" { count(); yylval.ival = LIST_STAT_NUM_COUNT; return(INTEGER_CONSTANT); }
554"LIST_STAT_GEOMETRIC_MEAN" { count(); yylval.ival = LIST_STAT_GEO_MEAN; return(INTEGER_CONSTANT); }
555"LIST_STAT_RANGE" { count(); yylval.ival = LIST_STAT_RANGE; return(INTEGER_CONSTANT); }
556
557"PAY_HIDE" { count(); yylval.ival = PAY_PRICE_HIDE; return(INTEGER_CONSTANT); }
558"PAY_DEFAULT" { count(); yylval.ival = PAY_PRICE_DEFAULT; return(INTEGER_CONSTANT); }
559
560"PARCEL_FLAG_ALLOW_FLY" { count(); yylval.ival = PF_ALLOW_FLY; return(INTEGER_CONSTANT); }
561"PARCEL_FLAG_ALLOW_GROUP_SCRIPTS" { count(); yylval.ival = PF_ALLOW_GROUP_SCRIPTS; return(INTEGER_CONSTANT); }
562"PARCEL_FLAG_ALLOW_SCRIPTS" { count(); yylval.ival = PF_ALLOW_OTHER_SCRIPTS; return(INTEGER_CONSTANT); }
563"PARCEL_FLAG_ALLOW_LANDMARK" { count(); yylval.ival = PF_ALLOW_LANDMARK; return(INTEGER_CONSTANT); }
564"PARCEL_FLAG_ALLOW_TERRAFORM" { count(); yylval.ival = PF_ALLOW_TERRAFORM; return(INTEGER_CONSTANT); }
565"PARCEL_FLAG_ALLOW_DAMAGE" { count(); yylval.ival = PF_ALLOW_DAMAGE; return(INTEGER_CONSTANT); }
566"PARCEL_FLAG_ALLOW_CREATE_OBJECTS" { count(); yylval.ival = PF_CREATE_OBJECTS; return(INTEGER_CONSTANT); }
567"PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS" { count(); yylval.ival = PF_CREATE_GROUP_OBJECTS; return(INTEGER_CONSTANT); }
568"PARCEL_FLAG_USE_ACCESS_GROUP" { count(); yylval.ival = PF_USE_ACCESS_GROUP; return(INTEGER_CONSTANT); }
569"PARCEL_FLAG_USE_ACCESS_LIST" { count(); yylval.ival = PF_USE_ACCESS_LIST; return(INTEGER_CONSTANT); }
570"PARCEL_FLAG_USE_BAN_LIST" { count(); yylval.ival = PF_USE_BAN_LIST; return(INTEGER_CONSTANT); }
571"PARCEL_FLAG_USE_LAND_PASS_LIST" { count(); yylval.ival = PF_USE_PASS_LIST; return(INTEGER_CONSTANT); }
572"PARCEL_FLAG_LOCAL_SOUND_ONLY" { count(); yylval.ival = PF_SOUND_LOCAL; return(INTEGER_CONSTANT); }
573"PARCEL_FLAG_RESTRICT_PUSHOBJECT" { count(); yylval.ival = PF_RESTRICT_PUSHOBJECT; return(INTEGER_CONSTANT); }
574"PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY" { count(); yylval.ival = PF_ALLOW_GROUP_OBJECT_ENTRY; return(INTEGER_CONSTANT); }
575"PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY" { count(); yylval.ival = PF_ALLOW_ALL_OBJECT_ENTRY; return(INTEGER_CONSTANT); }
576
577"REGION_FLAG_ALLOW_DAMAGE" { count(); yylval.ival = REGION_FLAGS_ALLOW_DAMAGE; return(INTEGER_CONSTANT); }
578"REGION_FLAG_FIXED_SUN" { count(); yylval.ival = REGION_FLAGS_SUN_FIXED; return(INTEGER_CONSTANT); }
579"REGION_FLAG_BLOCK_TERRAFORM" { count(); yylval.ival = REGION_FLAGS_BLOCK_TERRAFORM; return(INTEGER_CONSTANT); }
580"REGION_FLAG_SANDBOX" { count(); yylval.ival = REGION_FLAGS_SANDBOX; return(INTEGER_CONSTANT); }
581"REGION_FLAG_DISABLE_COLLISIONS" { count(); yylval.ival = REGION_FLAGS_SKIP_COLLISIONS; return(INTEGER_CONSTANT); }
582"REGION_FLAG_DISABLE_PHYSICS" { count(); yylval.ival = REGION_FLAGS_SKIP_PHYSICS; return(INTEGER_CONSTANT); }
583"REGION_FLAG_BLOCK_FLY" { count(); yylval.ival = REGION_FLAGS_BLOCK_FLY; return(INTEGER_CONSTANT); }
584"REGION_FLAG_ALLOW_DIRECT_TELEPORT" { count(); yylval.ival = REGION_FLAGS_ALLOW_DIRECT_TELEPORT; return(INTEGER_CONSTANT); }
585"REGION_FLAG_RESTRICT_PUSHOBJECT" { count(); yylval.ival = REGION_FLAGS_RESTRICT_PUSHOBJECT; return(INTEGER_CONSTANT); }
586
587"HTTP_METHOD" { count(); yylval.ival = HTTP_METHOD; return(INTEGER_CONSTANT); }
588"HTTP_MIMETYPE" { count(); yylval.ival = HTTP_MIMETYPE; return(INTEGER_CONSTANT); }
589"HTTP_BODY_MAXLENGTH" { count(); yylval.ival = HTTP_BODY_MAXLENGTH; return(INTEGER_CONSTANT); }
590"HTTP_BODY_TRUNCATED" { count(); yylval.ival = HTTP_BODY_TRUNCATED; return(INTEGER_CONSTANT); }
591"HTTP_VERIFY_CERT" { count(); yylval.ival = HTTP_VERIFY_CERT; return(INTEGER_CONSTANT); }
592
593"PARCEL_COUNT_TOTAL" { count(); yylval.ival = OC_TOTAL; return(INTEGER_CONSTANT); }
594"PARCEL_COUNT_OWNER" { count(); yylval.ival = OC_OWNER; return(INTEGER_CONSTANT); }
595"PARCEL_COUNT_GROUP" { count(); yylval.ival = OC_GROUP; return(INTEGER_CONSTANT); }
596"PARCEL_COUNT_OTHER" { count(); yylval.ival = OC_OTHER; return(INTEGER_CONSTANT); }
597"PARCEL_COUNT_SELECTED" { count(); yylval.ival = OC_SELECTED; return(INTEGER_CONSTANT); }
598"PARCEL_COUNT_TEMP" { count(); yylval.ival = OC_TEMP; return(INTEGER_CONSTANT); }
599
600"PARCEL_DETAILS_NAME" { count(); yylval.ival = PARCEL_DETAILS_NAME; return(INTEGER_CONSTANT); }
601"PARCEL_DETAILS_DESC" { count(); yylval.ival = PARCEL_DETAILS_DESC; return(INTEGER_CONSTANT); }
602"PARCEL_DETAILS_OWNER" { count(); yylval.ival = PARCEL_DETAILS_OWNER; return(INTEGER_CONSTANT); }
603"PARCEL_DETAILS_GROUP" { count(); yylval.ival = PARCEL_DETAILS_GROUP; return(INTEGER_CONSTANT); }
604"PARCEL_DETAILS_AREA" { count(); yylval.ival = PARCEL_DETAILS_AREA; return(INTEGER_CONSTANT); }
605
606"STRING_TRIM_HEAD" { count(); yylval.ival = STRING_TRIM_HEAD; return(INTEGER_CONSTANT); }
607"STRING_TRIM_TAIL" { count(); yylval.ival = STRING_TRIM_TAIL; return(INTEGER_CONSTANT); }
608"STRING_TRIM" { count(); yylval.ival = STRING_TRIM; return(INTEGER_CONSTANT); }
609
610"CLICK_ACTION_NONE" { count(); yylval.ival = CLICK_ACTION_NONE; return(INTEGER_CONSTANT); }
611"CLICK_ACTION_TOUCH" { count(); yylval.ival = CLICK_ACTION_TOUCH; return(INTEGER_CONSTANT); }
612"CLICK_ACTION_SIT" { count(); yylval.ival = CLICK_ACTION_SIT; return(INTEGER_CONSTANT); }
613"CLICK_ACTION_BUY" { count(); yylval.ival = CLICK_ACTION_BUY; return(INTEGER_CONSTANT); }
614"CLICK_ACTION_PAY" { count(); yylval.ival = CLICK_ACTION_PAY; return(INTEGER_CONSTANT); }
615"CLICK_ACTION_OPEN" { count(); yylval.ival = CLICK_ACTION_OPEN; return(INTEGER_CONSTANT); }
616"CLICK_ACTION_PLAY" { count(); yylval.ival = CLICK_ACTION_PLAY; return(INTEGER_CONSTANT); }
617"CLICK_ACTION_OPEN_MEDIA" { count(); yylval.ival = CLICK_ACTION_OPEN_MEDIA; return(INTEGER_CONSTANT); }
618"CLICK_ACTION_ZOOM" { count(); yylval.ival = CLICK_ACTION_ZOOM; return(INTEGER_CONSTANT); }
619
620"TEXTURE_BLANK" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "5748decc-f629-461c-9a36-a35a221fe21f"); return(STRING_CONSTANT); }
621"TEXTURE_DEFAULT" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "89556747-24cb-43ed-920b-47caed15465f"); return(STRING_CONSTANT); }
622"TEXTURE_MEDIA" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361"); return(STRING_CONSTANT); }
623"TEXTURE_PLYWOOD" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "89556747-24cb-43ed-920b-47caed15465f"); return(STRING_CONSTANT); }
624"TEXTURE_TRANSPARENT" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); return(STRING_CONSTANT); }
625
626"TOUCH_INVALID_FACE" { count(); yylval.ival = -1; return(INTEGER_CONSTANT); }
627"TOUCH_INVALID_VECTOR" { count(); return(TOUCH_INVALID_VECTOR); }
628"TOUCH_INVALID_TEXCOORD" { count(); return(TOUCH_INVALID_TEXCOORD); }
629
630"PRIM_MEDIA_ALT_IMAGE_ENABLE" { count(); yylval.ival = 0; return(INTEGER_CONSTANT); }
631"PRIM_MEDIA_CONTROLS" { count(); yylval.ival = 1; return(INTEGER_CONSTANT); }
632"PRIM_MEDIA_CURRENT_URL" { count(); yylval.ival = 2; return(INTEGER_CONSTANT); }
633"PRIM_MEDIA_HOME_URL" { count(); yylval.ival = 3; return(INTEGER_CONSTANT); }
634"PRIM_MEDIA_AUTO_LOOP" { count(); yylval.ival = 4; return(INTEGER_CONSTANT); }
635"PRIM_MEDIA_AUTO_PLAY" { count(); yylval.ival = 5; return(INTEGER_CONSTANT); }
636"PRIM_MEDIA_AUTO_SCALE" { count(); yylval.ival = 6; return(INTEGER_CONSTANT); }
637"PRIM_MEDIA_AUTO_ZOOM" { count(); yylval.ival = 7; return(INTEGER_CONSTANT); }
638"PRIM_MEDIA_FIRST_CLICK_INTERACT" { count(); yylval.ival = 8; return(INTEGER_CONSTANT); }
639"PRIM_MEDIA_WIDTH_PIXELS" { count(); yylval.ival = 9; return(INTEGER_CONSTANT); }
640"PRIM_MEDIA_HEIGHT_PIXELS" { count(); yylval.ival = 10; return(INTEGER_CONSTANT); }
641"PRIM_MEDIA_WHITELIST_ENABLE" { count(); yylval.ival = 11; return(INTEGER_CONSTANT); }
642"PRIM_MEDIA_WHITELIST" { count(); yylval.ival = 12; return(INTEGER_CONSTANT); }
643"PRIM_MEDIA_PERMS_INTERACT" { count(); yylval.ival = 13; return(INTEGER_CONSTANT); }
644"PRIM_MEDIA_PERMS_CONTROL" { count(); yylval.ival = 14; return(INTEGER_CONSTANT); }
645"PRIM_MEDIA_PARAM_MAX" { count(); yylval.ival = 14; return(INTEGER_CONSTANT); }
646
647"PRIM_MEDIA_CONTROLS_STANDARD" { count(); yylval.ival = 0; return(INTEGER_CONSTANT); }
648"PRIM_MEDIA_CONTROLS_MINI" { count(); yylval.ival = 1; return(INTEGER_CONSTANT); }
649
650"PRIM_MEDIA_PERM_NONE" { count(); yylval.ival = 0x0; return(INTEGER_CONSTANT); }
651"PRIM_MEDIA_PERM_OWNER" { count(); yylval.ival = 0x1; return(INTEGER_CONSTANT); }
652"PRIM_MEDIA_PERM_GROUP" { count(); yylval.ival = 0x3; return(INTEGER_CONSTANT); }
653"PRIM_MEDIA_PERM_ANYONE" { count(); yylval.ival = 0x4; return(INTEGER_CONSTANT); }
654
655"PRIM_MEDIA_MAX_URL_LENGTH" { count(); yylval.ival = 1024; return(INTEGER_CONSTANT); }
656"PRIM_MEDIA_MAX_WHITELIST_SIZE" { count(); yylval.ival = 1024; return(INTEGER_CONSTANT); }
657"PRIM_MEDIA_MAX_WHITELIST_COUNT" { count(); yylval.ival = 64; return(INTEGER_CONSTANT); }
658"PRIM_MEDIA_MAX_WIDTH_PIXELS" { count(); yylval.ival = 2048; return(INTEGER_CONSTANT); }
659"PRIM_MEDIA_MAX_HEIGHT_PIXELS" { count(); yylval.ival = 2048; return(INTEGER_CONSTANT); }
660
661"STATUS_OK" { count(); yylval.ival = LSL_STATUS_OK; return(INTEGER_CONSTANT); }
662"STATUS_MALFORMED_PARAMS" { count(); yylval.ival = LSL_STATUS_MALFORMED_PARAMS; return(INTEGER_CONSTANT); }
663"STATUS_TYPE_MISMATCH" { count(); yylval.ival = LSL_STATUS_TYPE_MISMATCH; return(INTEGER_CONSTANT); }
664"STATUS_BOUNDS_ERROR" { count(); yylval.ival = LSL_STATUS_BOUNDS_ERROR; return(INTEGER_CONSTANT); }
665"STATUS_NOT_FOUND" { count(); yylval.ival = LSL_STATUS_NOT_FOUND; return(INTEGER_CONSTANT); }
666"STATUS_NOT_SUPPORTED" { count(); yylval.ival = LSL_STATUS_NOT_SUPPORTED; return(INTEGER_CONSTANT); }
667"STATUS_INTERNAL_ERROR" { count(); yylval.ival = LSL_STATUS_INTERNAL_ERROR; return(INTEGER_CONSTANT); }
668"STATUS_WHITELIST_FAILED" { count(); yylval.ival = LSL_STATUS_WHITELIST_FAILED; return(INTEGER_CONSTANT); }
669
670{L}({L}|{N})* { count(); yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(IDENTIFIER); }
671
672{N}+{E} { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); }
673{N}*"."{N}+({E})?{FS}? { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); }
674{N}+"."{N}*({E})?{FS}? { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); }
675
676L?\"(\\.|[^\\"])*\" { parse_string(); count(); return(STRING_CONSTANT); }
677
678"++" { count(); return(INC_OP); }
679"--" { count(); return(DEC_OP); }
680"+=" { count(); return(ADD_ASSIGN); }
681"-=" { count(); return(SUB_ASSIGN); }
682"*=" { count(); return(MUL_ASSIGN); }
683"/=" { count(); return(DIV_ASSIGN); }
684"%=" { count(); return(MOD_ASSIGN); }
685";" { count(); return(';'); }
686"{" { count(); return('{'); }
687"}" { count(); return('}'); }
688"," { count(); return(','); }
689"=" { count(); return('='); }
690"(" { count(); return('('); }
691")" { count(); return(')'); }
692"-" { count(); return('-'); }
693"+" { count(); return('+'); }
694"*" { count(); return('*'); }
695"/" { count(); return('/'); }
696"%" { count(); return('%'); }
697"@" { count(); return('@'); }
698":" { count(); return(':'); }
699">" { count(); return('>'); }
700"<" { count(); return('<'); }
701"]" { count(); return(']'); }
702"[" { count(); return('['); }
703"==" { count(); return(EQ); }
704"!=" { count(); return(NEQ); }
705">=" { count(); return(GEQ); }
706"<=" { count(); return(LEQ); }
707"&" { count(); return('&'); }
708"|" { count(); return('|'); }
709"^" { count(); return('^'); }
710"~" { count(); return('~'); }
711"!" { count(); return('!'); }
712"&&" { count(); return(BOOLEAN_AND); }
713"||" { count(); return(BOOLEAN_OR); }
714"<<" { count(); return(SHIFT_LEFT); }
715">>" { count(); return(SHIFT_RIGHT); }
716
717[ \t\v\n\f] { count(); }
718. { /* ignore bad characters */ }
719
720%%
721
722LLScriptAllocationManager *gAllocationManager;
723LLScriptScript *gScriptp;
724
725// Prototype for the yacc parser entry point
726int yyparse(void);
727
728int yyerror(const char *fmt, ...)
729{
730 gErrorToText.writeError(yyout, gLine, gColumn, LSERROR_SYNTAX_ERROR);
731 return 0;
732}
733
734//#define EMERGENCY_DEBUG_PRINTOUTS
735//#define EMIT_CIL_ASSEMBLER
736
737BOOL lscript_compile(const char* src_filename, const char* dst_filename,
738 const char* err_filename, BOOL compile_to_mono, const char* class_name, BOOL is_god_like)
739{
740 BOOL b_parse_ok = FALSE;
741 BOOL b_dummy = FALSE;
742 U64 b_dummy_count = FALSE;
743 LSCRIPTType type = LST_NULL;
744
745 gInternalColumn = 0;
746 gInternalLine = 0;
747 gScriptp = NULL;
748
749 gErrorToText.init();
750 init_supported_expressions();
751 init_temp_jumps();
752 gAllocationManager = new LLScriptAllocationManager();
753
754 yyin = LLFile::fopen(std::string(src_filename), "r");
755 if (yyin)
756 {
757 yyout = LLFile::fopen(std::string(err_filename), "w");
758
759 // Reset the lexer's internal buffering.
760
761 yyrestart(yyin);
762
763 b_parse_ok = !yyparse();
764
765 if (b_parse_ok)
766 {
767#ifdef EMERGENCY_DEBUG_PRINTOUTS
768 char compiled[256];
769 sprintf(compiled, "%s.o", src_filename);
770 LLFILE* compfile;
771 compfile = LLFile::fopen(compiled, "w");
772#endif
773
774 if(dst_filename)
775 {
776 gScriptp->setBytecodeDest(dst_filename);
777 }
778
779 gScriptp->mGodLike = is_god_like;
780
781 gScriptp->setClassName(class_name);
782
783 gScopeStringTable = new LLStringTable(16384);
784#ifdef EMERGENCY_DEBUG_PRINTOUTS
785 gScriptp->recurse(compfile, 0, 4, LSCP_PRETTY_PRINT, LSPRUNE_INVALID, b_dummy, NULL, type, type, b_dummy_count, NULL, NULL, 0, NULL, 0, NULL);
786#endif
787 gScriptp->recurse(yyout, 0, 0, LSCP_PRUNE, LSPRUNE_INVALID, b_dummy, NULL, type, type, b_dummy_count, NULL, NULL, 0, NULL, 0, NULL);
788 gScriptp->recurse(yyout, 0, 0, LSCP_SCOPE_PASS1, LSPRUNE_INVALID, b_dummy, NULL, type, type, b_dummy_count, NULL, NULL, 0, NULL, 0, NULL);
789 gScriptp->recurse(yyout, 0, 0, LSCP_SCOPE_PASS2, LSPRUNE_INVALID, b_dummy, NULL, type, type, b_dummy_count, NULL, NULL, 0, NULL, 0, NULL);
790 gScriptp->recurse(yyout, 0, 0, LSCP_TYPE, LSPRUNE_INVALID, b_dummy, NULL, type, type, b_dummy_count, NULL, NULL, 0, NULL, 0, NULL);
791 if (!gErrorToText.getErrors())
792 {
793 gScriptp->recurse(yyout, 0, 0, LSCP_RESOURCE, LSPRUNE_INVALID, b_dummy, NULL, type, type, b_dummy_count, NULL, NULL, 0, NULL, 0, NULL);
794#ifdef EMERGENCY_DEBUG_PRINTOUTS
795 gScriptp->recurse(yyout, 0, 0, LSCP_EMIT_ASSEMBLY, LSPRUNE_INVALID, b_dummy, NULL, type, type, b_dummy_count, NULL, NULL, 0, NULL, 0, NULL);
796#endif
797 if(TRUE == compile_to_mono)
798 {
799 gScriptp->recurse(yyout, 0, 0, LSCP_EMIT_CIL_ASSEMBLY, LSPRUNE_INVALID, b_dummy, NULL, type, type, b_dummy_count, NULL, NULL, 0, NULL, 0, NULL);
800 }
801 else
802 {
803 gScriptp->recurse(yyout, 0, 0, LSCP_EMIT_BYTE_CODE, LSPRUNE_INVALID, b_dummy, NULL, type, type, b_dummy_count, NULL, NULL, 0, NULL, 0, NULL);
804 }
805 }
806 delete gScopeStringTable;
807 gScopeStringTable = NULL;
808#ifdef EMERGENCY_DEBUG_PRINTOUTS
809 fclose(compfile);
810#endif
811 }
812 fclose(yyout);
813 fclose(yyin);
814 }
815
816 delete gAllocationManager;
817 delete gScopeStringTable;
818
819 return b_parse_ok && !gErrorToText.getErrors();
820}
821
822
823BOOL lscript_compile(char *filename, BOOL compile_to_mono, BOOL is_god_like = FALSE)
824{
825 char src_filename[MAX_STRING];
826 sprintf(src_filename, "%s.lsl", filename);
827 char err_filename[MAX_STRING];
828 sprintf(err_filename, "%s.out", filename);
829 char class_name[MAX_STRING];
830 sprintf(class_name, "%s", filename);
831 return lscript_compile(src_filename, NULL, err_filename, compile_to_mono, class_name, is_god_like);
832}
833
834
835S32 yywrap()
836{
837#if defined(FLEX_SCANNER) && !defined(LL_WINDOWS)
838 // get gcc to stop complaining about lack of use of yyunput
839 (void) yyunput;
840#endif
841 return(1);
842}
843
844void line_comment()
845{
846 char c;
847
848 while ((c = yyinput()) != '\n' && c != 0 && c != EOF)
849 ;
850}
851
852void block_comment()
853{
854 char c1 = 0;
855 char c2 = yyinput();
856 while (c2 != 0 && c2 != EOF && !(c1 == '*' && c2 == '/')) {
857 if (c2 == '\n')
858 {
859 gInternalLine++;
860 gInternalColumn = 0;
861 }
862 else if (c2 == '\t')
863 gInternalColumn += 4 - (gInternalColumn % 8);
864 else
865 gInternalColumn++;
866 c1 = c2;
867 c2 = yyinput();
868 }
869}
870
871void count()
872{
873 S32 i;
874
875 gColumn = gInternalColumn;
876 gLine = gInternalLine;
877
878 for (i = 0; yytext[i] != '\0'; i++)
879 if (yytext[i] == '\n')
880 {
881 gInternalLine++;
882 gInternalColumn = 0;
883 }
884 else if (yytext[i] == '\t')
885 gInternalColumn += 4 - (gInternalColumn % 8);
886 else
887 gInternalColumn++;
888}
889
890void parse_string()
891{
892 S32 length = (S32)strlen(yytext);
893 length = length - 2;
894 char *temp = yytext + 1;
895
896 S32 i;
897 S32 escapes = 0;
898 S32 tabs = 0;
899 for (i = 0; i < length; i++)
900 {
901 if (temp[i] == '\\')
902 {
903 escapes++;
904 i++;
905 if (temp[i] == 't')
906 tabs++;
907 }
908 }
909
910 S32 newlength = length - escapes + tabs*3;
911 yylval.sval = new char[newlength + 1];
912
913 char *dest = yylval.sval;
914
915 for (i = 0; i < length; i++)
916 {
917 if (temp[i] == '\\')
918 {
919 i++;
920 // linefeed
921 if (temp[i] == 'n')
922 {
923 *dest++ = 10;
924 }
925 else if (temp[i] == 't')
926 {
927 *dest++ = ' ';
928 *dest++ = ' ';
929 *dest++ = ' ';
930 *dest++ = ' ';
931 }
932 else
933 {
934 *dest++ = temp[i];
935 }
936 }
937 else
938 {
939 *dest++ = temp[i];
940 }
941 }
942 yylval.sval[newlength] = 0;
943}
diff --git a/LuaSL/src/LuaSL_LSL_yaccer.y b/LuaSL/src/LuaSL_LSL_yaccer.y
new file mode 100644
index 0000000..e4b10ff
--- /dev/null
+++ b/LuaSL/src/LuaSL_LSL_yaccer.y
@@ -0,0 +1,1798 @@
1%{
2 #include "linden_common.h"
3 #include "lscript_tree.h"
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 int yylex(void);
10 int yyparse( void );
11 int yyerror(const char *fmt, ...);
12
13 #if LL_LINUX
14 // broken yacc codegen... --ryan.
15 #define getenv getenv_workaround
16 #endif
17
18 #ifdef LL_WINDOWS
19 #pragma warning (disable : 4702) // warning C4702: unreachable code
20 #pragma warning( disable : 4065 ) // warning: switch statement contains 'default' but no 'case' labels
21 #endif
22
23 #ifdef __cplusplus
24 }
25 #endif
26%}
27
28%union
29{
30 S32 ival;
31 F32 fval;
32 char *sval;
33 class LLScriptType *type;
34 class LLScriptConstant *constant;
35 class LLScriptIdentifier *identifier;
36 class LLScriptSimpleAssignable *assignable;
37 class LLScriptGlobalVariable *global;
38 class LLScriptEvent *event;
39 class LLScriptEventHandler *handler;
40 class LLScriptExpression *expression;
41 class LLScriptStatement *statement;
42 class LLScriptGlobalFunctions *global_funcs;
43 class LLScriptFunctionDec *global_decl;
44 class LLScriptState *state;
45 class LLScritpGlobalStorage *global_store;
46 class LLScriptScript *script;
47};
48
49%token INTEGER
50%token FLOAT_TYPE
51%token STRING
52%token LLKEY
53%token VECTOR
54%token QUATERNION
55%token LIST
56
57%token STATE
58%token EVENT
59%token JUMP
60%token RETURN
61
62%token STATE_ENTRY
63%token STATE_EXIT
64%token TOUCH_START
65%token TOUCH
66%token TOUCH_END
67%token COLLISION_START
68%token COLLISION
69%token COLLISION_END
70%token LAND_COLLISION_START
71%token LAND_COLLISION
72%token LAND_COLLISION_END
73%token TIMER
74%token CHAT
75%token SENSOR
76%token NO_SENSOR
77%token CONTROL
78%token AT_TARGET
79%token NOT_AT_TARGET
80%token AT_ROT_TARGET
81%token NOT_AT_ROT_TARGET
82%token MONEY
83%token EMAIL
84%token RUN_TIME_PERMISSIONS
85%token INVENTORY
86%token ATTACH
87%token DATASERVER
88%token MOVING_START
89%token MOVING_END
90%token REZ
91%token OBJECT_REZ
92%token LINK_MESSAGE
93%token REMOTE_DATA
94%token HTTP_RESPONSE
95%token HTTP_REQUEST
96
97%token <sval> IDENTIFIER
98%token <sval> STATE_DEFAULT
99
100%token <ival> INTEGER_CONSTANT
101%token <ival> INTEGER_TRUE
102%token <ival> INTEGER_FALSE
103
104%token <fval> FP_CONSTANT
105
106%token <sval> STRING_CONSTANT
107
108%token INC_OP
109%token DEC_OP
110%token ADD_ASSIGN
111%token SUB_ASSIGN
112%token MUL_ASSIGN
113%token DIV_ASSIGN
114%token MOD_ASSIGN
115
116%token EQ
117%token NEQ
118%token GEQ
119%token LEQ
120
121%token BOOLEAN_AND
122%token BOOLEAN_OR
123
124%token SHIFT_LEFT
125%token SHIFT_RIGHT
126
127%token IF
128%token ELSE
129%token FOR
130%token DO
131%token WHILE
132
133%token PRINT
134
135%token PERIOD
136
137%token ZERO_VECTOR
138%token ZERO_ROTATION
139
140%token TOUCH_INVALID_VECTOR
141%token TOUCH_INVALID_TEXCOORD
142
143%nonassoc LOWER_THAN_ELSE
144%nonassoc ELSE
145
146
147%type <script> lscript_program
148%type <global_store> globals
149%type <global_store> global
150%type <global> global_variable
151%type <assignable> simple_assignable
152%type <assignable> simple_assignable_no_list
153%type <constant> constant
154%type <ival> integer_constant
155%type <fval> fp_constant
156%type <assignable> special_constant
157%type <assignable> vector_constant
158%type <assignable> quaternion_constant
159%type <assignable> list_constant
160%type <assignable> list_entries
161%type <assignable> list_entry
162%type <type> typename
163%type <global_funcs> global_function
164%type <global_decl> function_parameters
165%type <global_decl> function_parameter
166%type <state> states
167%type <state> other_states
168%type <state> default
169%type <state> state
170%type <handler> state_body
171%type <handler> event
172%type <event> state_entry
173%type <event> state_exit
174%type <event> touch_start
175%type <event> touch
176%type <event> touch_end
177%type <event> collision_start
178%type <event> collision
179%type <event> collision_end
180%type <event> land_collision_start
181%type <event> land_collision
182%type <event> land_collision_end
183%type <event> at_target
184%type <event> not_at_target
185%type <event> at_rot_target
186%type <event> not_at_rot_target
187%type <event> money
188%type <event> email
189%type <event> run_time_permissions
190%type <event> inventory
191%type <event> attach
192%type <event> dataserver
193%type <event> moving_start
194%type <event> moving_end
195%type <event> rez
196%type <event> object_rez
197%type <event> remote_data
198%type <event> http_response
199%type <event> http_request
200%type <event> link_message
201%type <event> timer
202%type <event> chat
203%type <event> sensor
204%type <event> no_sensor
205%type <event> control
206%type <statement> compound_statement
207%type <statement> statement
208%type <statement> statements
209%type <statement> declaration
210%type <statement> ';'
211%type <statement> '@'
212%type <expression> nextforexpressionlist
213%type <expression> forexpressionlist
214%type <expression> nextfuncexpressionlist
215%type <expression> funcexpressionlist
216%type <expression> nextlistexpressionlist
217%type <expression> listexpressionlist
218%type <expression> unarypostfixexpression
219%type <expression> vector_initializer
220%type <expression> quaternion_initializer
221%type <expression> list_initializer
222%type <expression> lvalue
223%type <expression> '-'
224%type <expression> '!'
225%type <expression> '~'
226%type <expression> '='
227%type <expression> '<'
228%type <expression> '>'
229%type <expression> '+'
230%type <expression> '*'
231%type <expression> '/'
232%type <expression> '%'
233%type <expression> '&'
234%type <expression> '|'
235%type <expression> '^'
236%type <expression> ADD_ASSIGN
237%type <expression> SUB_ASSIGN
238%type <expression> MUL_ASSIGN
239%type <expression> DIV_ASSIGN
240%type <expression> MOD_ASSIGN
241%type <expression> EQ
242%type <expression> NEQ
243%type <expression> LEQ
244%type <expression> GEQ
245%type <expression> BOOLEAN_AND
246%type <expression> BOOLEAN_OR
247%type <expression> SHIFT_LEFT
248%type <expression> SHIFT_RIGHT
249%type <expression> INC_OP
250%type <expression> DEC_OP
251%type <expression> '('
252%type <expression> ')'
253%type <expression> PRINT
254%type <identifier> name_type
255%type <expression> expression
256%type <expression> unaryexpression
257%type <expression> typecast
258
259%right '=' MUL_ASSIGN DIV_ASSIGN MOD_ASSIGN ADD_ASSIGN SUB_ASSIGN
260%left BOOLEAN_AND BOOLEAN_OR
261%left '|'
262%left '^'
263%left '&'
264%left EQ NEQ
265%left '<' LEQ '>' GEQ
266%left SHIFT_LEFT SHIFT_RIGHT
267%left '+' '-'
268%left '*' '/' '%'
269%right '!' '~' INC_OP DEC_OP
270%nonassoc INITIALIZER
271
272%%
273
274lscript_program
275 : globals states
276 {
277 $$ = new LLScriptScript($1, $2);
278 gAllocationManager->addAllocation($$);
279 gScriptp = $$;
280 }
281 | states
282 {
283 $$ = new LLScriptScript(NULL, $1);
284 gAllocationManager->addAllocation($$);
285 gScriptp = $$;
286 }
287 ;
288
289globals
290 : global
291 {
292 $$ = $1;
293 }
294 | global globals
295 {
296 $$ = $1;
297 $1->addGlobal($2);
298 }
299 ;
300
301global
302 : global_variable
303 {
304 $$ = new LLScritpGlobalStorage($1);
305 gAllocationManager->addAllocation($$);
306 }
307 | global_function
308 {
309 $$ = new LLScritpGlobalStorage($1);
310 gAllocationManager->addAllocation($$);
311 }
312 ;
313
314name_type
315 : typename IDENTIFIER
316 {
317 $$ = new LLScriptIdentifier(gLine, gColumn, $2, $1);
318 gAllocationManager->addAllocation($$);
319 }
320 ;
321
322global_variable
323 : name_type ';'
324 {
325 $$ = new LLScriptGlobalVariable(gLine, gColumn, $1->mType, $1, NULL);
326 gAllocationManager->addAllocation($$);
327 }
328 | name_type '=' simple_assignable ';'
329 {
330 $$ = new LLScriptGlobalVariable(gLine, gColumn, $1->mType, $1, $3);
331 gAllocationManager->addAllocation($$);
332 }
333 ;
334
335simple_assignable
336 : simple_assignable_no_list
337 {
338 $$ = $1;
339 }
340 | list_constant
341 {
342 $$ = $1;
343 }
344 ;
345
346simple_assignable_no_list
347 : IDENTIFIER
348 {
349 LLScriptIdentifier *id = new LLScriptIdentifier(gLine, gColumn, $1);
350 gAllocationManager->addAllocation(id);
351 $$ = new LLScriptSAIdentifier(gLine, gColumn, id);
352 gAllocationManager->addAllocation($$);
353 }
354 | constant
355 {
356 $$ = new LLScriptSAConstant(gLine, gColumn, $1);
357 gAllocationManager->addAllocation($$);
358 }
359 | special_constant
360 {
361 $$ = $1;
362 }
363 ;
364
365constant
366 : integer_constant
367 {
368 $$ = new LLScriptConstantInteger(gLine, gColumn, $1);
369 gAllocationManager->addAllocation($$);
370 }
371 | fp_constant
372 {
373 $$ = new LLScriptConstantFloat(gLine, gColumn, $1);
374 gAllocationManager->addAllocation($$);
375 }
376 | STRING_CONSTANT
377 {
378 $$ = new LLScriptConstantString(gLine, gColumn, $1);
379 gAllocationManager->addAllocation($$);
380 }
381 ;
382
383fp_constant
384 : FP_CONSTANT
385 {
386 $$ = $1;
387 }
388 | '-' FP_CONSTANT
389 {
390 $$ = -$2;
391 }
392 ;
393
394integer_constant
395 : INTEGER_CONSTANT
396 {
397 $$ = $1;
398 }
399 | INTEGER_TRUE
400 {
401 $$ = $1;
402 }
403 | INTEGER_FALSE
404 {
405 $$ = $1;
406 }
407 | '-' INTEGER_CONSTANT
408 {
409 $$ = -$2;
410 }
411 ;
412
413special_constant
414 : vector_constant
415 {
416 $$ = $1;
417 }
418 | quaternion_constant
419 {
420 $$ = $1;
421 }
422 ;
423
424vector_constant
425 : '<' simple_assignable ',' simple_assignable ',' simple_assignable '>'
426 {
427 $$ = new LLScriptSAVector(gLine, gColumn, $2, $4, $6);
428 gAllocationManager->addAllocation($$);
429 }
430 | ZERO_VECTOR
431 {
432 LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
433 gAllocationManager->addAllocation(cf0);
434 LLScriptSAConstant *sa0 = new LLScriptSAConstant(gLine, gColumn, cf0);
435 gAllocationManager->addAllocation(sa0);
436 LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
437 gAllocationManager->addAllocation(cf1);
438 LLScriptSAConstant *sa1 = new LLScriptSAConstant(gLine, gColumn, cf1);
439 gAllocationManager->addAllocation(sa1);
440 LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
441 gAllocationManager->addAllocation(cf2);
442 LLScriptSAConstant *sa2 = new LLScriptSAConstant(gLine, gColumn, cf2);
443 gAllocationManager->addAllocation(sa2);
444 $$ = new LLScriptSAVector(gLine, gColumn, sa0, sa1, sa2);
445 gAllocationManager->addAllocation($$);
446 }
447 | TOUCH_INVALID_VECTOR
448 {
449 LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
450 gAllocationManager->addAllocation(cf0);
451 LLScriptSAConstant *sa0 = new LLScriptSAConstant(gLine, gColumn, cf0);
452 gAllocationManager->addAllocation(sa0);
453 LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
454 gAllocationManager->addAllocation(cf1);
455 LLScriptSAConstant *sa1 = new LLScriptSAConstant(gLine, gColumn, cf1);
456 gAllocationManager->addAllocation(sa1);
457 LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
458 gAllocationManager->addAllocation(cf2);
459 LLScriptSAConstant *sa2 = new LLScriptSAConstant(gLine, gColumn, cf2);
460 gAllocationManager->addAllocation(sa2);
461 $$ = new LLScriptSAVector(gLine, gColumn, sa0, sa1, sa2);
462 gAllocationManager->addAllocation($$);
463 }
464 | TOUCH_INVALID_TEXCOORD
465 {
466 LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, -1.f);
467 gAllocationManager->addAllocation(cf0);
468 LLScriptSAConstant *sa0 = new LLScriptSAConstant(gLine, gColumn, cf0);
469 gAllocationManager->addAllocation(sa0);
470 LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, -1.f);
471 gAllocationManager->addAllocation(cf1);
472 LLScriptSAConstant *sa1 = new LLScriptSAConstant(gLine, gColumn, cf1);
473 gAllocationManager->addAllocation(sa1);
474 LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
475 gAllocationManager->addAllocation(cf2);
476 LLScriptSAConstant *sa2 = new LLScriptSAConstant(gLine, gColumn, cf2);
477 gAllocationManager->addAllocation(sa2);
478 $$ = new LLScriptSAVector(gLine, gColumn, sa0, sa1, sa2);
479 gAllocationManager->addAllocation($$);
480 }
481 ;
482
483quaternion_constant
484 : '<' simple_assignable ',' simple_assignable ',' simple_assignable ',' simple_assignable '>'
485 {
486 $$ = new LLScriptSAQuaternion(gLine, gColumn, $2, $4, $6, $8);
487 gAllocationManager->addAllocation($$);
488 }
489 | ZERO_ROTATION
490 {
491 LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
492 gAllocationManager->addAllocation(cf0);
493 LLScriptSAConstant *sa0 = new LLScriptSAConstant(gLine, gColumn, cf0);
494 gAllocationManager->addAllocation(sa0);
495 LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
496 gAllocationManager->addAllocation(cf1);
497 LLScriptSAConstant *sa1 = new LLScriptSAConstant(gLine, gColumn, cf1);
498 gAllocationManager->addAllocation(sa1);
499 LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
500 gAllocationManager->addAllocation(cf2);
501 LLScriptSAConstant *sa2 = new LLScriptSAConstant(gLine, gColumn, cf2);
502 gAllocationManager->addAllocation(sa2);
503 LLScriptConstantFloat *cf3 = new LLScriptConstantFloat(gLine, gColumn, 1.f);
504 gAllocationManager->addAllocation(cf3);
505 LLScriptSAConstant *sa3 = new LLScriptSAConstant(gLine, gColumn, cf3);
506 gAllocationManager->addAllocation(sa3);
507 $$ = new LLScriptSAQuaternion(gLine, gColumn, sa0, sa1, sa2, sa3);
508 gAllocationManager->addAllocation($$);
509 }
510 ;
511
512list_constant
513 : '[' list_entries ']'
514 {
515 $$ = new LLScriptSAList(gLine, gColumn, $2);
516 gAllocationManager->addAllocation($$);
517 }
518 | '[' ']'
519 {
520 $$ = new LLScriptSAList(gLine, gColumn, NULL);
521 gAllocationManager->addAllocation($$);
522 }
523 ;
524
525list_entries
526 : list_entry
527 {
528 $$ = $1;
529 }
530 | list_entry ',' list_entries
531 {
532 $$ = $1;
533 $1->addAssignable($3);
534 }
535 ;
536
537list_entry
538 : simple_assignable_no_list
539 {
540 $$ = $1;
541 }
542 ;
543
544typename
545 : INTEGER
546 {
547 $$ = new LLScriptType(gLine, gColumn, LST_INTEGER);
548 gAllocationManager->addAllocation($$);
549 }
550 | FLOAT_TYPE
551 {
552 $$ = new LLScriptType(gLine, gColumn, LST_FLOATINGPOINT);
553 gAllocationManager->addAllocation($$);
554 }
555 | STRING
556 {
557 $$ = new LLScriptType(gLine, gColumn, LST_STRING);
558 gAllocationManager->addAllocation($$);
559 }
560 | LLKEY
561 {
562 $$ = new LLScriptType(gLine, gColumn, LST_KEY);
563 gAllocationManager->addAllocation($$);
564 }
565 | VECTOR
566 {
567 $$ = new LLScriptType(gLine, gColumn, LST_VECTOR);
568 gAllocationManager->addAllocation($$);
569 }
570 | QUATERNION
571 {
572 $$ = new LLScriptType(gLine, gColumn, LST_QUATERNION);
573 gAllocationManager->addAllocation($$);
574 }
575 | LIST
576 {
577 $$ = new LLScriptType(gLine, gColumn, LST_LIST);
578 gAllocationManager->addAllocation($$);
579 }
580 ;
581
582global_function
583 : IDENTIFIER '(' ')' compound_statement
584 {
585 LLScriptIdentifier *id = new LLScriptIdentifier(gLine, gColumn, $1);
586 gAllocationManager->addAllocation(id);
587 $$ = new LLScriptGlobalFunctions(gLine, gColumn, NULL, id, NULL, $4);
588 gAllocationManager->addAllocation($$);
589 }
590 | name_type '(' ')' compound_statement
591 {
592 $$ = new LLScriptGlobalFunctions(gLine, gColumn, $1->mType, $1, NULL, $4);
593 gAllocationManager->addAllocation($$);
594 }
595 | IDENTIFIER '(' function_parameters ')' compound_statement
596 {
597 LLScriptIdentifier *id = new LLScriptIdentifier(gLine, gColumn, $1);
598 gAllocationManager->addAllocation(id);
599 $$ = new LLScriptGlobalFunctions(gLine, gColumn, NULL, id, $3, $5);
600 gAllocationManager->addAllocation($$);
601 }
602 | name_type '(' function_parameters ')' compound_statement
603 {
604 $$ = new LLScriptGlobalFunctions(gLine, gColumn, $1->mType, $1, $3, $5);
605 gAllocationManager->addAllocation($$);
606 }
607 ;
608
609function_parameters
610 : function_parameter
611 {
612 $$ = $1;
613 }
614 | function_parameter ',' function_parameters
615 {
616 $$ = $1;
617 $1->addFunctionParameter($3);
618 }
619 ;
620
621function_parameter
622 : typename IDENTIFIER
623 {
624 LLScriptIdentifier *id = new LLScriptIdentifier(gLine, gColumn, $2);
625 gAllocationManager->addAllocation(id);
626 $$ = new LLScriptFunctionDec(gLine, gColumn, $1, id);
627 gAllocationManager->addAllocation($$);
628 }
629 ;
630
631states
632 : default
633 {
634 $$ = $1;
635 }
636 | default other_states
637 {
638 $$ = $1;
639 $1->mNextp = $2;
640 }
641 ;
642
643other_states
644 : state
645 {
646 $$ = $1;
647 }
648 | state other_states
649 {
650 $$ = $1;
651 $1->addState($2);
652 }
653 ;
654
655default
656 : STATE_DEFAULT '{' state_body '}'
657 {
658 LLScriptIdentifier *id = new LLScriptIdentifier(gLine, gColumn, $1);
659 gAllocationManager->addAllocation(id);
660 $$ = new LLScriptState(gLine, gColumn, LSSTYPE_DEFAULT, id, $3);
661 gAllocationManager->addAllocation($$);
662 }
663 ;
664
665state
666 : STATE IDENTIFIER '{' state_body '}'
667 {
668 LLScriptIdentifier *id = new LLScriptIdentifier(gLine, gColumn, $2);
669 gAllocationManager->addAllocation(id);
670 $$ = new LLScriptState(gLine, gColumn, LSSTYPE_USER, id, $4);
671 gAllocationManager->addAllocation($$);
672 }
673 ;
674
675state_body
676 : event
677 {
678 $$ = $1;
679 }
680 | event state_body
681 {
682 $$ = $1;
683 $1->addEvent($2);
684 }
685 ;
686
687event
688 : state_entry compound_statement
689 {
690 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
691 gAllocationManager->addAllocation($$);
692 }
693 | state_exit compound_statement
694 {
695 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
696 gAllocationManager->addAllocation($$);
697 }
698 | touch_start compound_statement
699 {
700 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
701 gAllocationManager->addAllocation($$);
702 }
703 | touch compound_statement
704 {
705 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
706 gAllocationManager->addAllocation($$);
707 }
708 | touch_end compound_statement
709 {
710 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
711 gAllocationManager->addAllocation($$);
712 }
713 | collision_start compound_statement
714 {
715 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
716 gAllocationManager->addAllocation($$);
717 }
718 | collision compound_statement
719 {
720 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
721 gAllocationManager->addAllocation($$);
722 }
723 | collision_end compound_statement
724 {
725 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
726 gAllocationManager->addAllocation($$);
727 }
728 | land_collision_start compound_statement
729 {
730 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
731 gAllocationManager->addAllocation($$);
732 }
733 | land_collision compound_statement
734 {
735 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
736 gAllocationManager->addAllocation($$);
737 }
738 | land_collision_end compound_statement
739 {
740 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
741 gAllocationManager->addAllocation($$);
742 }
743 | timer compound_statement
744 {
745 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
746 gAllocationManager->addAllocation($$);
747 }
748 | chat compound_statement
749 {
750 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
751 gAllocationManager->addAllocation($$);
752 }
753 | sensor compound_statement
754 {
755 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
756 gAllocationManager->addAllocation($$);
757 }
758 | no_sensor compound_statement
759 {
760 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
761 gAllocationManager->addAllocation($$);
762 }
763 | at_target compound_statement
764 {
765 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
766 gAllocationManager->addAllocation($$);
767 }
768 | not_at_target compound_statement
769 {
770 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
771 gAllocationManager->addAllocation($$);
772 }
773 | at_rot_target compound_statement
774 {
775 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
776 gAllocationManager->addAllocation($$);
777 }
778 | not_at_rot_target compound_statement
779 {
780 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
781 gAllocationManager->addAllocation($$);
782 }
783 | money compound_statement
784 {
785 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
786 gAllocationManager->addAllocation($$);
787 }
788 | email compound_statement
789 {
790 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
791 gAllocationManager->addAllocation($$);
792 }
793 | run_time_permissions compound_statement
794 {
795 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
796 gAllocationManager->addAllocation($$);
797 }
798 | inventory compound_statement
799 {
800 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
801 gAllocationManager->addAllocation($$);
802 }
803 | attach compound_statement
804 {
805 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
806 gAllocationManager->addAllocation($$);
807 }
808 | dataserver compound_statement
809 {
810 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
811 gAllocationManager->addAllocation($$);
812 }
813 | control compound_statement
814 {
815 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
816 gAllocationManager->addAllocation($$);
817 }
818 | moving_start compound_statement
819 {
820 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
821 gAllocationManager->addAllocation($$);
822 }
823 | moving_end compound_statement
824 {
825 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
826 gAllocationManager->addAllocation($$);
827 }
828 | rez compound_statement
829 {
830 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
831 gAllocationManager->addAllocation($$);
832 }
833 | object_rez compound_statement
834 {
835 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
836 gAllocationManager->addAllocation($$);
837 }
838 | link_message compound_statement
839 {
840 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
841 gAllocationManager->addAllocation($$);
842 }
843 | remote_data compound_statement
844 {
845 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
846 gAllocationManager->addAllocation($$);
847 }
848 | http_response compound_statement
849 {
850 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
851 gAllocationManager->addAllocation($$);
852 }
853 | http_request compound_statement
854 {
855 $$ = new LLScriptEventHandler(gLine, gColumn, $1, $2);
856 gAllocationManager->addAllocation($$);
857 }
858 ;
859
860state_entry
861 : STATE_ENTRY '(' ')'
862 {
863 $$ = new LLScriptStateEntryEvent(gLine, gColumn);
864 gAllocationManager->addAllocation($$);
865 }
866 ;
867
868state_exit
869 : STATE_EXIT '(' ')'
870 {
871 $$ = new LLScriptStateExitEvent(gLine, gColumn);
872 gAllocationManager->addAllocation($$);
873 }
874 ;
875
876touch_start
877 : TOUCH_START '(' INTEGER IDENTIFIER ')'
878 {
879 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
880 gAllocationManager->addAllocation(id1);
881 $$ = new LLScriptTouchStartEvent(gLine, gColumn, id1);
882 gAllocationManager->addAllocation($$);
883 }
884 ;
885
886touch
887 : TOUCH '(' INTEGER IDENTIFIER ')'
888 {
889 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
890 gAllocationManager->addAllocation(id1);
891 $$ = new LLScriptTouchEvent(gLine, gColumn, id1);
892 gAllocationManager->addAllocation($$);
893 }
894 ;
895
896touch_end
897 : TOUCH_END '(' INTEGER IDENTIFIER ')'
898 {
899 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
900 gAllocationManager->addAllocation(id1);
901 $$ = new LLScriptTouchEndEvent(gLine, gColumn, id1);
902 gAllocationManager->addAllocation($$);
903 }
904 ;
905
906collision_start
907 : COLLISION_START '(' INTEGER IDENTIFIER ')'
908 {
909 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
910 gAllocationManager->addAllocation(id1);
911 $$ = new LLScriptCollisionStartEvent(gLine, gColumn, id1);
912 gAllocationManager->addAllocation($$);
913 }
914 ;
915
916collision
917 : COLLISION '(' INTEGER IDENTIFIER ')'
918 {
919 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
920 gAllocationManager->addAllocation(id1);
921 $$ = new LLScriptCollisionEvent(gLine, gColumn, id1);
922 gAllocationManager->addAllocation($$);
923 }
924 ;
925
926collision_end
927 : COLLISION_END '(' INTEGER IDENTIFIER ')'
928 {
929 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
930 gAllocationManager->addAllocation(id1);
931 $$ = new LLScriptCollisionEndEvent(gLine, gColumn, id1);
932 gAllocationManager->addAllocation($$);
933 }
934 ;
935
936land_collision_start
937 : LAND_COLLISION_START '(' VECTOR IDENTIFIER ')'
938 {
939 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
940 gAllocationManager->addAllocation(id1);
941 $$ = new LLScriptLandCollisionStartEvent(gLine, gColumn, id1);
942 gAllocationManager->addAllocation($$);
943 }
944 ;
945
946land_collision
947 : LAND_COLLISION '(' VECTOR IDENTIFIER ')'
948 {
949 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
950 gAllocationManager->addAllocation(id1);
951 $$ = new LLScriptLandCollisionEvent(gLine, gColumn, id1);
952 gAllocationManager->addAllocation($$);
953 }
954 ;
955
956land_collision_end
957 : LAND_COLLISION_END '(' VECTOR IDENTIFIER ')'
958 {
959 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
960 gAllocationManager->addAllocation(id1);
961 $$ = new LLScriptLandCollisionEndEvent(gLine, gColumn, id1);
962 gAllocationManager->addAllocation($$);
963 }
964 ;
965
966at_target
967 : AT_TARGET '(' INTEGER IDENTIFIER ',' VECTOR IDENTIFIER ',' VECTOR IDENTIFIER ')'
968 {
969 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
970 gAllocationManager->addAllocation(id1);
971 LLScriptIdentifier *id2 = new LLScriptIdentifier(gLine, gColumn, $7);
972 gAllocationManager->addAllocation(id2);
973 LLScriptIdentifier *id3 = new LLScriptIdentifier(gLine, gColumn, $10);
974 gAllocationManager->addAllocation(id3);
975 $$ = new LLScriptAtTarget(gLine, gColumn, id1, id2, id3);
976 gAllocationManager->addAllocation($$);
977 }
978 ;
979
980not_at_target
981 : NOT_AT_TARGET '(' ')'
982 {
983 $$ = new LLScriptNotAtTarget(gLine, gColumn);
984 gAllocationManager->addAllocation($$);
985 }
986 ;
987
988at_rot_target
989 : AT_ROT_TARGET '(' INTEGER IDENTIFIER ',' QUATERNION IDENTIFIER ',' QUATERNION IDENTIFIER ')'
990 {
991 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
992 gAllocationManager->addAllocation(id1);
993 LLScriptIdentifier *id2 = new LLScriptIdentifier(gLine, gColumn, $7);
994 gAllocationManager->addAllocation(id2);
995 LLScriptIdentifier *id3 = new LLScriptIdentifier(gLine, gColumn, $10);
996 gAllocationManager->addAllocation(id3);
997 $$ = new LLScriptAtRotTarget(gLine, gColumn, id1, id2, id3);
998 gAllocationManager->addAllocation($$);
999 }
1000 ;
1001
1002not_at_rot_target
1003 : NOT_AT_ROT_TARGET '(' ')'
1004 {
1005 $$ = new LLScriptNotAtRotTarget(gLine, gColumn);
1006 gAllocationManager->addAllocation($$);
1007 }
1008 ;
1009
1010money
1011 : MONEY '(' LLKEY IDENTIFIER ',' INTEGER IDENTIFIER ')'
1012 {
1013 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
1014 gAllocationManager->addAllocation(id1);
1015 LLScriptIdentifier *id2 = new LLScriptIdentifier(gLine, gColumn, $7);
1016 gAllocationManager->addAllocation(id2);
1017 $$ = new LLScriptMoneyEvent(gLine, gColumn, id1, id2);
1018 gAllocationManager->addAllocation($$);
1019 }
1020 ;
1021
1022email
1023 : EMAIL '(' STRING IDENTIFIER ',' STRING IDENTIFIER ',' STRING IDENTIFIER ',' STRING IDENTIFIER ',' INTEGER IDENTIFIER ')'
1024 {
1025 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
1026 gAllocationManager->addAllocation(id1);
1027 LLScriptIdentifier *id2 = new LLScriptIdentifier(gLine, gColumn, $7);
1028 gAllocationManager->addAllocation(id2);
1029 LLScriptIdentifier *id3 = new LLScriptIdentifier(gLine, gColumn, $10);
1030 gAllocationManager->addAllocation(id3);
1031 LLScriptIdentifier *id4 = new LLScriptIdentifier(gLine, gColumn, $13);
1032 gAllocationManager->addAllocation(id4);
1033 LLScriptIdentifier *id5 = new LLScriptIdentifier(gLine, gColumn, $16);
1034 gAllocationManager->addAllocation(id5);
1035 $$ = new LLScriptEmailEvent(gLine, gColumn, id1, id2, id3, id4, id5);
1036 gAllocationManager->addAllocation($$);
1037 }
1038 ;
1039
1040run_time_permissions
1041 : RUN_TIME_PERMISSIONS '(' INTEGER IDENTIFIER ')'
1042 {
1043 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
1044 gAllocationManager->addAllocation(id1);
1045 $$ = new LLScriptRTPEvent(gLine, gColumn, id1);
1046 gAllocationManager->addAllocation($$);
1047 }
1048 ;
1049
1050inventory
1051 : INVENTORY '(' INTEGER IDENTIFIER ')'
1052 {
1053 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
1054 gAllocationManager->addAllocation(id1);
1055 $$ = new LLScriptInventoryEvent(gLine, gColumn, id1);
1056 gAllocationManager->addAllocation($$);
1057 }
1058 ;
1059
1060attach
1061 : ATTACH '(' LLKEY IDENTIFIER ')'
1062 {
1063 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
1064 gAllocationManager->addAllocation(id1);
1065 $$ = new LLScriptAttachEvent(gLine, gColumn, id1);
1066 gAllocationManager->addAllocation($$);
1067 }
1068 ;
1069
1070dataserver
1071 : DATASERVER '(' LLKEY IDENTIFIER ',' STRING IDENTIFIER')'
1072 {
1073 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
1074 gAllocationManager->addAllocation(id1);
1075 LLScriptIdentifier *id2 = new LLScriptIdentifier(gLine, gColumn, $7);
1076 gAllocationManager->addAllocation(id2);
1077 $$ = new LLScriptDataserverEvent(gLine, gColumn, id1, id2);
1078 gAllocationManager->addAllocation($$);
1079 }
1080 ;
1081
1082moving_start
1083 : MOVING_START '(' ')'
1084 {
1085 $$ = new LLScriptMovingStartEvent(gLine, gColumn);
1086 gAllocationManager->addAllocation($$);
1087 }
1088 ;
1089
1090moving_end
1091 : MOVING_END '(' ')'
1092 {
1093 $$ = new LLScriptMovingEndEvent(gLine, gColumn);
1094 gAllocationManager->addAllocation($$);
1095 }
1096 ;
1097
1098timer
1099 : TIMER '(' ')'
1100 {
1101 $$ = new LLScriptTimerEvent(gLine, gColumn);
1102 gAllocationManager->addAllocation($$);
1103 }
1104 ;
1105
1106chat
1107 : CHAT '(' INTEGER IDENTIFIER ',' STRING IDENTIFIER ',' LLKEY IDENTIFIER ',' STRING IDENTIFIER ')'
1108 {
1109 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
1110 gAllocationManager->addAllocation(id1);
1111 LLScriptIdentifier *id2 = new LLScriptIdentifier(gLine, gColumn, $7);
1112 gAllocationManager->addAllocation(id2);
1113 LLScriptIdentifier *id3 = new LLScriptIdentifier(gLine, gColumn, $10);
1114 gAllocationManager->addAllocation(id3);
1115 LLScriptIdentifier *id4 = new LLScriptIdentifier(gLine, gColumn, $13);
1116 gAllocationManager->addAllocation(id4);
1117 $$ = new LLScriptChatEvent(gLine, gColumn, id1, id2, id3, id4);
1118 gAllocationManager->addAllocation($$);
1119 }
1120 ;
1121
1122sensor
1123 : SENSOR '(' INTEGER IDENTIFIER ')'
1124 {
1125 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
1126 gAllocationManager->addAllocation(id1);
1127 $$ = new LLScriptSensorEvent(gLine, gColumn, id1);
1128 gAllocationManager->addAllocation($$);
1129 }
1130 ;
1131
1132no_sensor
1133 : NO_SENSOR '(' ')'
1134 {
1135 $$ = new LLScriptNoSensorEvent(gLine, gColumn);
1136 gAllocationManager->addAllocation($$);
1137 }
1138 ;
1139
1140control
1141 : CONTROL '(' LLKEY IDENTIFIER ',' INTEGER IDENTIFIER ',' INTEGER IDENTIFIER ')'
1142 {
1143 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
1144 gAllocationManager->addAllocation(id1);
1145 LLScriptIdentifier *id2 = new LLScriptIdentifier(gLine, gColumn, $7);
1146 gAllocationManager->addAllocation(id2);
1147 LLScriptIdentifier *id3 = new LLScriptIdentifier(gLine, gColumn, $10);
1148 gAllocationManager->addAllocation(id3);
1149 $$ = new LLScriptControlEvent(gLine, gColumn, id1, id2, id3);
1150 gAllocationManager->addAllocation($$);
1151 }
1152 ;
1153
1154rez
1155 : REZ '(' INTEGER IDENTIFIER ')'
1156 {
1157 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
1158 gAllocationManager->addAllocation(id1);
1159 $$ = new LLScriptRezEvent(gLine, gColumn, id1);
1160 gAllocationManager->addAllocation($$);
1161 }
1162 ;
1163
1164object_rez
1165 : OBJECT_REZ '(' LLKEY IDENTIFIER ')'
1166 {
1167 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
1168 gAllocationManager->addAllocation(id1);
1169 $$ = new LLScriptObjectRezEvent(gLine, gColumn, id1);
1170 gAllocationManager->addAllocation($$);
1171 }
1172 ;
1173
1174link_message
1175 : LINK_MESSAGE '(' INTEGER IDENTIFIER ',' INTEGER IDENTIFIER ',' STRING IDENTIFIER ',' LLKEY IDENTIFIER ')'
1176 {
1177 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
1178 gAllocationManager->addAllocation(id1);
1179 LLScriptIdentifier *id2 = new LLScriptIdentifier(gLine, gColumn, $7);
1180 gAllocationManager->addAllocation(id2);
1181 LLScriptIdentifier *id3 = new LLScriptIdentifier(gLine, gColumn, $10);
1182 gAllocationManager->addAllocation(id3);
1183 LLScriptIdentifier *id4 = new LLScriptIdentifier(gLine, gColumn, $13);
1184 gAllocationManager->addAllocation(id4);
1185 $$ = new LLScriptLinkMessageEvent(gLine, gColumn, id1, id2, id3, id4);
1186 gAllocationManager->addAllocation($$);
1187 }
1188 ;
1189
1190remote_data
1191 : REMOTE_DATA '(' INTEGER IDENTIFIER ',' LLKEY IDENTIFIER ',' LLKEY IDENTIFIER ',' STRING IDENTIFIER ',' INTEGER IDENTIFIER ',' STRING IDENTIFIER ')'
1192 {
1193 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
1194 gAllocationManager->addAllocation(id1);
1195 LLScriptIdentifier *id2 = new LLScriptIdentifier(gLine, gColumn, $7);
1196 gAllocationManager->addAllocation(id2);
1197 LLScriptIdentifier *id3 = new LLScriptIdentifier(gLine, gColumn, $10);
1198 gAllocationManager->addAllocation(id3);
1199 LLScriptIdentifier *id4 = new LLScriptIdentifier(gLine, gColumn, $13);
1200 gAllocationManager->addAllocation(id4);
1201 LLScriptIdentifier *id5 = new LLScriptIdentifier(gLine, gColumn, $16);
1202 gAllocationManager->addAllocation(id4);
1203 LLScriptIdentifier *id6 = new LLScriptIdentifier(gLine, gColumn, $19);
1204 gAllocationManager->addAllocation(id4);
1205 $$ = new LLScriptRemoteEvent(gLine, gColumn, id1, id2, id3, id4, id5, id6);
1206 gAllocationManager->addAllocation($$);
1207 }
1208 ;
1209
1210http_response
1211 : HTTP_RESPONSE '(' LLKEY IDENTIFIER ',' INTEGER IDENTIFIER ',' LIST IDENTIFIER ',' STRING IDENTIFIER ')'
1212 {
1213 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
1214 gAllocationManager->addAllocation(id1);
1215 LLScriptIdentifier *id2 = new LLScriptIdentifier(gLine, gColumn, $7);
1216 gAllocationManager->addAllocation(id2);
1217 LLScriptIdentifier *id3 = new LLScriptIdentifier(gLine, gColumn, $10);
1218 gAllocationManager->addAllocation(id3);
1219 LLScriptIdentifier *id4 = new LLScriptIdentifier(gLine, gColumn, $13);
1220 gAllocationManager->addAllocation(id4);
1221 $$ = new LLScriptHTTPResponseEvent(gLine, gColumn, id1, id2, id3, id4);
1222 gAllocationManager->addAllocation($$);
1223 }
1224 ;
1225
1226http_request
1227 : HTTP_REQUEST '(' LLKEY IDENTIFIER ',' STRING IDENTIFIER ',' STRING IDENTIFIER ')'
1228 {
1229 LLScriptIdentifier *id1 = new LLScriptIdentifier(gLine, gColumn, $4);
1230 gAllocationManager->addAllocation(id1);
1231 LLScriptIdentifier *id2 = new LLScriptIdentifier(gLine, gColumn, $7);
1232 gAllocationManager->addAllocation(id2);
1233 LLScriptIdentifier *id3 = new LLScriptIdentifier(gLine, gColumn, $10);
1234 gAllocationManager->addAllocation(id3);
1235 $$ = new LLScriptHTTPRequestEvent(gLine, gColumn, id1, id2, id3);
1236 gAllocationManager->addAllocation($$);
1237 }
1238 ;
1239
1240compound_statement
1241 : '{' '}'
1242 {
1243 $$ = new LLScriptCompoundStatement(gLine, gColumn, NULL);
1244 gAllocationManager->addAllocation($$);
1245 }
1246 | '{' statements '}'
1247 {
1248 $$ = new LLScriptCompoundStatement(gLine, gColumn, $2);
1249 gAllocationManager->addAllocation($$);
1250 }
1251 ;
1252
1253statements
1254 : statement
1255 {
1256 $$ = $1;
1257 }
1258 | statements statement
1259 {
1260 $$ = new LLScriptStatementSequence(gLine, gColumn, $1, $2);
1261 gAllocationManager->addAllocation($$);
1262 }
1263 ;
1264
1265statement
1266 : ';'
1267 {
1268 $$ = new LLScriptNOOP(gLine, gColumn);
1269 gAllocationManager->addAllocation($$);
1270 }
1271 | STATE IDENTIFIER ';'
1272 {
1273 LLScriptIdentifier *id = new LLScriptIdentifier(gLine, gColumn, $2);
1274 gAllocationManager->addAllocation(id);
1275 $$ = new LLScriptStateChange(gLine, gColumn, id);
1276 gAllocationManager->addAllocation($$);
1277 }
1278 | STATE STATE_DEFAULT ';'
1279 {
1280 LLScriptIdentifier *id = new LLScriptIdentifier(gLine, gColumn, $2);
1281 gAllocationManager->addAllocation(id);
1282 $$ = new LLScriptStateChange(gLine, gColumn, id);
1283 gAllocationManager->addAllocation($$);
1284 }
1285 | JUMP IDENTIFIER ';'
1286 {
1287 LLScriptIdentifier *id = new LLScriptIdentifier(gLine, gColumn, $2);
1288 gAllocationManager->addAllocation(id);
1289 $$ = new LLScriptJump(gLine, gColumn, id);
1290 gAllocationManager->addAllocation($$);
1291 }
1292 | '@' IDENTIFIER ';'
1293 {
1294 LLScriptIdentifier *id = new LLScriptIdentifier(gLine, gColumn, $2);
1295 gAllocationManager->addAllocation(id);
1296 $$ = new LLScriptLabel(gLine, gColumn, id);
1297 gAllocationManager->addAllocation($$);
1298 }
1299 | RETURN expression ';'
1300 {
1301 $$ = new LLScriptReturn(gLine, gColumn, $2);
1302 gAllocationManager->addAllocation($$);
1303 }
1304 | RETURN ';'
1305 {
1306 $$ = new LLScriptReturn(gLine, gColumn, NULL);
1307 gAllocationManager->addAllocation($$);
1308 }
1309 | expression ';'
1310 {
1311 $$ = new LLScriptExpressionStatement(gLine, gColumn, $1);
1312 gAllocationManager->addAllocation($$);
1313 }
1314 | declaration ';'
1315 {
1316 $$ = $1;
1317 }
1318 | compound_statement
1319 {
1320 $$ = $1;
1321 }
1322 | IF '(' expression ')' statement %prec LOWER_THAN_ELSE
1323 {
1324 $$ = new LLScriptIf(gLine, gColumn, $3, $5);
1325 $5->mAllowDeclarations = FALSE;
1326 gAllocationManager->addAllocation($$);
1327 }
1328 | IF '(' expression ')' statement ELSE statement
1329 {
1330 $$ = new LLScriptIfElse(gLine, gColumn, $3, $5, $7);
1331 $5->mAllowDeclarations = FALSE;
1332 $7->mAllowDeclarations = FALSE;
1333 gAllocationManager->addAllocation($$);
1334 }
1335 | FOR '(' forexpressionlist ';' expression ';' forexpressionlist ')' statement
1336 {
1337 $$ = new LLScriptFor(gLine, gColumn, $3, $5, $7, $9);
1338 $9->mAllowDeclarations = FALSE;
1339 gAllocationManager->addAllocation($$);
1340 }
1341 | DO statement WHILE '(' expression ')' ';'
1342 {
1343 $$ = new LLScriptDoWhile(gLine, gColumn, $2, $5);
1344 $2->mAllowDeclarations = FALSE;
1345 gAllocationManager->addAllocation($$);
1346 }
1347 | WHILE '(' expression ')' statement
1348 {
1349 $$ = new LLScriptWhile(gLine, gColumn, $3, $5);
1350 $5->mAllowDeclarations = FALSE;
1351 gAllocationManager->addAllocation($$);
1352 }
1353 ;
1354
1355declaration
1356 : typename IDENTIFIER
1357 {
1358 LLScriptIdentifier *id = new LLScriptIdentifier(gLine, gColumn, $2);
1359 gAllocationManager->addAllocation(id);
1360 $$ = new LLScriptDeclaration(gLine, gColumn, $1, id, NULL);
1361 gAllocationManager->addAllocation($$);
1362 }
1363 | typename IDENTIFIER '=' expression
1364 {
1365 LLScriptIdentifier *id = new LLScriptIdentifier(gLine, gColumn, $2);
1366 gAllocationManager->addAllocation(id);
1367 $$ = new LLScriptDeclaration(gLine, gColumn, $1, id, $4);
1368 gAllocationManager->addAllocation($$);
1369 }
1370 ;
1371
1372forexpressionlist
1373 : /* empty */
1374 {
1375 $$ = NULL;
1376 }
1377 | nextforexpressionlist
1378 {
1379 $$ = $1;
1380 }
1381 ;
1382
1383nextforexpressionlist
1384 : expression
1385 {
1386 $$ = new LLScriptForExpressionList(gLine, gColumn, $1, NULL);
1387 gAllocationManager->addAllocation($$);
1388 }
1389 | expression ',' nextforexpressionlist
1390 {
1391 $$ = new LLScriptForExpressionList(gLine, gColumn, $1, $3);
1392 gAllocationManager->addAllocation($$);
1393 }
1394 ;
1395
1396funcexpressionlist
1397 : /* empty */
1398 {
1399 $$ = NULL;
1400 }
1401 | nextfuncexpressionlist
1402 {
1403 $$ = $1;
1404 }
1405 ;
1406
1407nextfuncexpressionlist
1408 : expression
1409 {
1410 $$ = new LLScriptFuncExpressionList(gLine, gColumn, $1, NULL);
1411 gAllocationManager->addAllocation($$);
1412 }
1413 | expression ',' nextfuncexpressionlist
1414 {
1415 $$ = new LLScriptFuncExpressionList(gLine, gColumn, $1, $3);
1416 gAllocationManager->addAllocation($$);
1417 }
1418 ;
1419
1420listexpressionlist
1421 : /* empty */
1422 {
1423 $$ = NULL;
1424 }
1425 | nextlistexpressionlist
1426 {
1427 $$ = $1;
1428 }
1429 ;
1430
1431nextlistexpressionlist
1432 : expression
1433 {
1434 $$ = new LLScriptListExpressionList(gLine, gColumn, $1, NULL);
1435 gAllocationManager->addAllocation($$);
1436 }
1437 | expression ',' nextlistexpressionlist
1438 {
1439 $$ = new LLScriptListExpressionList(gLine, gColumn, $1, $3);
1440 gAllocationManager->addAllocation($$);
1441 }
1442 ;
1443
1444expression
1445 : unaryexpression
1446 {
1447 $$ = $1;
1448 }
1449 | lvalue '=' expression
1450 {
1451 $$ = new LLScriptAssignment(gLine, gColumn, $1, $3);
1452 gAllocationManager->addAllocation($$);
1453 }
1454 | lvalue ADD_ASSIGN expression
1455 {
1456 $$ = new LLScriptAddAssignment(gLine, gColumn, $1, $3);
1457 gAllocationManager->addAllocation($$);
1458 }
1459 | lvalue SUB_ASSIGN expression
1460 {
1461 $$ = new LLScriptSubAssignment(gLine, gColumn, $1, $3);
1462 gAllocationManager->addAllocation($$);
1463 }
1464 | lvalue MUL_ASSIGN expression
1465 {
1466 $$ = new LLScriptMulAssignment(gLine, gColumn, $1, $3);
1467 gAllocationManager->addAllocation($$);
1468 }
1469 | lvalue DIV_ASSIGN expression
1470 {
1471 $$ = new LLScriptDivAssignment(gLine, gColumn, $1, $3);
1472 gAllocationManager->addAllocation($$);
1473 }
1474 | lvalue MOD_ASSIGN expression
1475 {
1476 $$ = new LLScriptModAssignment(gLine, gColumn, $1, $3);
1477 gAllocationManager->addAllocation($$);
1478 }
1479 | expression EQ expression
1480 {
1481 $$ = new LLScriptEquality(gLine, gColumn, $1, $3);
1482 gAllocationManager->addAllocation($$);
1483 }
1484 | expression NEQ expression
1485 {
1486 $$ = new LLScriptNotEquals(gLine, gColumn, $1, $3);
1487 gAllocationManager->addAllocation($$);
1488 }
1489 | expression LEQ expression
1490 {
1491 $$ = new LLScriptLessEquals(gLine, gColumn, $1, $3);
1492 gAllocationManager->addAllocation($$);
1493 }
1494 | expression GEQ expression
1495 {
1496 $$ = new LLScriptGreaterEquals(gLine, gColumn, $1, $3);
1497 gAllocationManager->addAllocation($$);
1498 }
1499 | expression '<' expression
1500 {
1501 $$ = new LLScriptLessThan(gLine, gColumn, $1, $3);
1502 gAllocationManager->addAllocation($$);
1503 }
1504 | expression '>' expression
1505 {
1506 $$ = new LLScriptGreaterThan(gLine, gColumn, $1, $3);
1507 gAllocationManager->addAllocation($$);
1508 }
1509 | expression '+' expression
1510 {
1511 $$ = new LLScriptPlus(gLine, gColumn, $1, $3);
1512 gAllocationManager->addAllocation($$);
1513 }
1514 | expression '-' expression
1515 {
1516 $$ = new LLScriptMinus(gLine, gColumn, $1, $3);
1517 gAllocationManager->addAllocation($$);
1518 }
1519 | expression '*' expression
1520 {
1521 $$ = new LLScriptTimes(gLine, gColumn, $1, $3);
1522 gAllocationManager->addAllocation($$);
1523 }
1524 | expression '/' expression
1525 {
1526 $$ = new LLScriptDivide(gLine, gColumn, $1, $3);
1527 gAllocationManager->addAllocation($$);
1528 }
1529 | expression '%' expression
1530 {
1531 $$ = new LLScriptMod(gLine, gColumn, $1, $3);
1532 gAllocationManager->addAllocation($$);
1533 }
1534 | expression '&' expression
1535 {
1536 $$ = new LLScriptBitAnd(gLine, gColumn, $1, $3);
1537 gAllocationManager->addAllocation($$);
1538 }
1539 | expression '|' expression
1540 {
1541 $$ = new LLScriptBitOr(gLine, gColumn, $1, $3);
1542 gAllocationManager->addAllocation($$);
1543 }
1544 | expression '^' expression
1545 {
1546 $$ = new LLScriptBitXor(gLine, gColumn, $1, $3);
1547 gAllocationManager->addAllocation($$);
1548 }
1549 | expression BOOLEAN_AND expression
1550 {
1551 $$ = new LLScriptBooleanAnd(gLine, gColumn, $1, $3);
1552 gAllocationManager->addAllocation($$);
1553 }
1554 | expression BOOLEAN_OR expression
1555 {
1556 $$ = new LLScriptBooleanOr(gLine, gColumn, $1, $3);
1557 gAllocationManager->addAllocation($$);
1558 }
1559 | expression SHIFT_LEFT expression
1560 {
1561 $$ = new LLScriptShiftLeft(gLine, gColumn, $1, $3);
1562 gAllocationManager->addAllocation($$);
1563 }
1564 | expression SHIFT_RIGHT expression
1565 {
1566 $$ = new LLScriptShiftRight(gLine, gColumn, $1, $3);
1567 gAllocationManager->addAllocation($$);
1568 }
1569 ;
1570
1571unaryexpression
1572 : '-' expression
1573 {
1574 $$ = new LLScriptUnaryMinus(gLine, gColumn, $2);
1575 gAllocationManager->addAllocation($$);
1576 }
1577 | '!' expression
1578 {
1579 $$ = new LLScriptBooleanNot(gLine, gColumn, $2);
1580 gAllocationManager->addAllocation($$);
1581 }
1582 | '~' expression
1583 {
1584 $$ = new LLScriptBitNot(gLine, gColumn, $2);
1585 gAllocationManager->addAllocation($$);
1586 }
1587 | INC_OP lvalue
1588 {
1589 $$ = new LLScriptPreIncrement(gLine, gColumn, $2);
1590 gAllocationManager->addAllocation($$);
1591 }
1592 | DEC_OP lvalue
1593 {
1594 $$ = new LLScriptPreDecrement(gLine, gColumn, $2);
1595 gAllocationManager->addAllocation($$);
1596 }
1597 | typecast
1598 {
1599 $$ = $1;
1600 }
1601 | unarypostfixexpression
1602 {
1603 $$ = $1;
1604 }
1605 | '(' expression ')'
1606 {
1607 $$ = new LLScriptParenthesis(gLine, gColumn, $2);
1608 gAllocationManager->addAllocation($$);
1609 }
1610 ;
1611
1612typecast
1613 : '(' typename ')' lvalue
1614 {
1615 $$ = new LLScriptTypeCast(gLine, gColumn, $2, $4);
1616 gAllocationManager->addAllocation($$);
1617 }
1618 | '(' typename ')' constant
1619 {
1620 LLScriptConstantExpression *temp = new LLScriptConstantExpression(gLine, gColumn, $4);
1621 gAllocationManager->addAllocation(temp);
1622 $$ = new LLScriptTypeCast(gLine, gColumn, $2, temp);
1623 gAllocationManager->addAllocation($$);
1624 }
1625 | '(' typename ')' unarypostfixexpression
1626 {
1627 $$ = new LLScriptTypeCast(gLine, gColumn, $2, $4);
1628 gAllocationManager->addAllocation($$);
1629 }
1630 | '(' typename ')' '(' expression ')'
1631 {
1632 $$ = new LLScriptTypeCast(gLine, gColumn, $2, $5);
1633 gAllocationManager->addAllocation($$);
1634 }
1635 ;
1636
1637unarypostfixexpression
1638 : vector_initializer
1639 {
1640 $$ = $1;
1641 }
1642 | quaternion_initializer
1643 {
1644 $$ = $1;
1645 }
1646 | list_initializer
1647 {
1648 $$ = $1;
1649 }
1650 | lvalue
1651 {
1652 $$ = $1;
1653 }
1654 | lvalue INC_OP
1655 {
1656 $$ = new LLScriptPostIncrement(gLine, gColumn, $1);
1657 gAllocationManager->addAllocation($$);
1658 }
1659 | lvalue DEC_OP
1660 {
1661 $$ = new LLScriptPostDecrement(gLine, gColumn, $1);
1662 gAllocationManager->addAllocation($$);
1663 }
1664 | IDENTIFIER '(' funcexpressionlist ')'
1665 {
1666 LLScriptIdentifier *id = new LLScriptIdentifier(gLine, gColumn, $1);
1667 gAllocationManager->addAllocation(id);
1668 $$ = new LLScriptFunctionCall(gLine, gColumn, id, $3);
1669 gAllocationManager->addAllocation($$);
1670 }
1671 | PRINT '(' expression ')'
1672 {
1673 $$ = new LLScriptPrint(gLine, gColumn, $3);
1674 gAllocationManager->addAllocation($$);
1675 }
1676 | constant
1677 {
1678 $$ = new LLScriptConstantExpression(gLine, gColumn, $1);
1679 gAllocationManager->addAllocation($$);
1680 }
1681 ;
1682
1683vector_initializer
1684 : '<' expression ',' expression ',' expression '>' %prec INITIALIZER
1685 {
1686 $$ = new LLScriptVectorInitializer(gLine, gColumn, $2, $4, $6);
1687 gAllocationManager->addAllocation($$);
1688 }
1689 | ZERO_VECTOR
1690 {
1691 LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
1692 gAllocationManager->addAllocation(cf0);
1693 LLScriptConstantExpression *sa0 = new LLScriptConstantExpression(gLine, gColumn, cf0);
1694 gAllocationManager->addAllocation(sa0);
1695 LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
1696 gAllocationManager->addAllocation(cf1);
1697 LLScriptConstantExpression *sa1 = new LLScriptConstantExpression(gLine, gColumn, cf1);
1698 gAllocationManager->addAllocation(sa1);
1699 LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
1700 gAllocationManager->addAllocation(cf2);
1701 LLScriptConstantExpression *sa2 = new LLScriptConstantExpression(gLine, gColumn, cf2);
1702 gAllocationManager->addAllocation(sa2);
1703 $$ = new LLScriptVectorInitializer(gLine, gColumn, sa0, sa1, sa2);
1704 gAllocationManager->addAllocation($$);
1705 }
1706 | TOUCH_INVALID_VECTOR
1707 {
1708 LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
1709 gAllocationManager->addAllocation(cf0);
1710 LLScriptConstantExpression *sa0 = new LLScriptConstantExpression(gLine, gColumn, cf0);
1711 gAllocationManager->addAllocation(sa0);
1712 LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
1713 gAllocationManager->addAllocation(cf1);
1714 LLScriptConstantExpression *sa1 = new LLScriptConstantExpression(gLine, gColumn, cf1);
1715 gAllocationManager->addAllocation(sa1);
1716 LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
1717 gAllocationManager->addAllocation(cf2);
1718 LLScriptConstantExpression *sa2 = new LLScriptConstantExpression(gLine, gColumn, cf2);
1719 gAllocationManager->addAllocation(sa2);
1720 $$ = new LLScriptVectorInitializer(gLine, gColumn, sa0, sa1, sa2);
1721 gAllocationManager->addAllocation($$);
1722 }
1723 | TOUCH_INVALID_TEXCOORD
1724 {
1725 LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, -1.f);
1726 gAllocationManager->addAllocation(cf0);
1727 LLScriptConstantExpression *sa0 = new LLScriptConstantExpression(gLine, gColumn, cf0);
1728 gAllocationManager->addAllocation(sa0);
1729 LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, -1.f);
1730 gAllocationManager->addAllocation(cf1);
1731 LLScriptConstantExpression *sa1 = new LLScriptConstantExpression(gLine, gColumn, cf1);
1732 gAllocationManager->addAllocation(sa1);
1733 LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
1734 gAllocationManager->addAllocation(cf2);
1735 LLScriptConstantExpression *sa2 = new LLScriptConstantExpression(gLine, gColumn, cf2);
1736 gAllocationManager->addAllocation(sa2);
1737 $$ = new LLScriptVectorInitializer(gLine, gColumn, sa0, sa1, sa2);
1738 gAllocationManager->addAllocation($$);
1739 }
1740 ;
1741
1742quaternion_initializer
1743 : '<' expression ',' expression ',' expression ',' expression '>' %prec INITIALIZER
1744 {
1745 $$ = new LLScriptQuaternionInitializer(gLine, gColumn, $2, $4, $6, $8);
1746 gAllocationManager->addAllocation($$);
1747 }
1748 | ZERO_ROTATION
1749 {
1750 LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
1751 gAllocationManager->addAllocation(cf0);
1752 LLScriptConstantExpression *sa0 = new LLScriptConstantExpression(gLine, gColumn, cf0);
1753 gAllocationManager->addAllocation(sa0);
1754 LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
1755 gAllocationManager->addAllocation(cf1);
1756 LLScriptConstantExpression *sa1 = new LLScriptConstantExpression(gLine, gColumn, cf1);
1757 gAllocationManager->addAllocation(sa1);
1758 LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f);
1759 gAllocationManager->addAllocation(cf2);
1760 LLScriptConstantExpression *sa2 = new LLScriptConstantExpression(gLine, gColumn, cf2);
1761 gAllocationManager->addAllocation(sa2);
1762 LLScriptConstantFloat *cf3 = new LLScriptConstantFloat(gLine, gColumn, 1.f);
1763 gAllocationManager->addAllocation(cf3);
1764 LLScriptConstantExpression *sa3 = new LLScriptConstantExpression(gLine, gColumn, cf3);
1765 gAllocationManager->addAllocation(sa3);
1766 $$ = new LLScriptQuaternionInitializer(gLine, gColumn, sa0, sa1, sa2, sa3);
1767 gAllocationManager->addAllocation($$);
1768 }
1769 ;
1770
1771list_initializer
1772 : '[' listexpressionlist ']' %prec INITIALIZER
1773 {
1774 $$ = new LLScriptListInitializer(gLine, gColumn, $2);
1775 gAllocationManager->addAllocation($$);
1776 }
1777 ;
1778
1779lvalue
1780 : IDENTIFIER
1781 {
1782 LLScriptIdentifier *id = new LLScriptIdentifier(gLine, gColumn, $1);
1783 gAllocationManager->addAllocation(id);
1784 $$ = new LLScriptLValue(gLine, gColumn, id, NULL);
1785 gAllocationManager->addAllocation($$);
1786 }
1787 | IDENTIFIER PERIOD IDENTIFIER
1788 {
1789 LLScriptIdentifier *id = new LLScriptIdentifier(gLine, gColumn, $1);
1790 gAllocationManager->addAllocation(id);
1791 LLScriptIdentifier *ac = new LLScriptIdentifier(gLine, gColumn, $3);
1792 gAllocationManager->addAllocation(id);
1793 $$ = new LLScriptLValue(gLine, gColumn, id, ac);
1794 gAllocationManager->addAllocation($$);
1795 }
1796 ;
1797
1798%%