This is the lex and yacc file used by the LSL compiler as
posted by
CoryLinden.
There is a bug in the lex file that results in weirdness. See the fix here.
lsl.l
D [-]?[0-9]
N [0-9]
L [a-zA-Z_]
H [a-fA-F0-9]
E [Ee][+-]?{D}+
FS (f|F)
% %
"//" { }
"integer" { return(INTEGER); }
"float" { return(FLOAT_TYPE); }
"string" { return(STRING); }
"key" { return(LLKEY); }
"vector" { return(VECTOR); }
"quaternion" { return(QUATERNION); }
"rotation" { return(QUATERNION); }
"list" { return(LIST); }
"default" { yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(STATE_DEFAULT); }
"state" { return(STATE); }
"event" { return(EVENT); }
"jump" { return(JUMP); }
"return" { return(RETURN); }
"if" { return(IF); }
"else" { return(ELSE); }
"for" { return(FOR); }
"do" { return(DO); }
"while" { return(WHILE); }
"state_entry" { return(STATE_ENTRY); }
"state_exit" { return(STATE_EXIT); }
"touch_start" { return(TOUCH_START); }
"touch" { return(TOUCH); }
"touch_end" { return(TOUCH_END); }
"collision_start" { return(COLLISION_START); }
"collision" { return(COLLISION); }
"collision_end" { return(COLLISION_END); }
"land_collision_start" { return(LAND_COLLISION_START); }
"land_collision" { return(LAND_COLLISION); }
"land_collision_end" { return(LAND_COLLISION_END); }
"timer" { return(TIMER); }
"listen" { return(CHAT); }
"sensor" { return(SENSOR); }
"no_sensor" { return(NO_SENSOR); }
"control" { return(CONTROL); }
"print" { return(PRINT); }
"at_target" { return(AT_TARGET); }
"not_at_target" { return(NOT_AT_TARGET); }
"at_rot_target" { return(AT_ROT_TARGET); }
"not_at_rot_target" { return(NOT_AT_ROT_TARGET); }
"money" { return(MONEY); }
"email" { return(EMAIL); }
"run_time_permissions" { return(RUN_TIME_PERMISSIONS); }
"changed" { return(INVENTORY); }
"attach" { return(ATTACH); }
"dataserver" { return(DATASERVER); }
"moving_start" { return(MOVING_START); }
"moving_end" { return(MOVING_END); }
"link_message" { return(LINK_MESSAGE); }
"on_rez" { return(REZ); }
"object_rez" { return(OBJECT_REZ); }
"remote_data" { return(REMOTE_DATA); }
"." { return(PERIOD); }
0[xX]{H}+ { yylval.ival = strtoul(yytext, NULL, 0); return(INTEGER_CONSTANT); }
{D}+ { yylval.ival = strtoul(yytext, NULL, 10); return(INTEGER_CONSTANT); }
"TRUE" { yylval.ival = 1; return(INTEGER_TRUE); }
"FALSE" { yylval.ival = 0; return(INTEGER_FALSE); }
"STATUS_PHYSICS" { yylval.ival = 0x1; return(INTEGER_CONSTANT); }
"STATUS_ROTATE_X" { yylval.ival = 0x2; return(INTEGER_CONSTANT); }
"STATUS_ROTATE_Y" { yylval.ival = 0x4; return(INTEGER_CONSTANT); }
"STATUS_ROTATE_Z" { yylval.ival = 0x8; return(INTEGER_CONSTANT); }
"STATUS_PHANTOM" { yylval.ival = 0x10; return(INTEGER_CONSTANT); }
"STATUS_SANDBOX" { yylval.ival = 0x20; return(INTEGER_CONSTANT); }
"STATUS_BLOCK_GRAB" { yylval.ival = 0x40; return(INTEGER_CONSTANT); }
"STATUS_DIE_AT_EDGE" { yylval.ival = 0x80; return(INTEGER_CONSTANT); }
"STATUS_RETURN_AT_EDGE" { yylval.ival = 0x100; return(INTEGER_CONSTANT); }
"AGENT_FLYING" { yylval.ival = AGENT_FLYING; return(INTEGER_CONSTANT); }
"AGENT_ATTACHMENTS" { yylval.ival = AGENT_ATTACHMENTS; return(INTEGER_CONSTANT); }
"AGENT_SCRIPTED" { yylval.ival = AGENT_SCRIPTED; return(INTEGER_CONSTANT); }
"AGENT_MOUSELOOK" { yylval.ival = AGENT_MOUSELOOK; return(INTEGER_CONSTANT); }
"AGENT_SITTING" { yylval.ival = AGENT_SITTING; return(INTEGER_CONSTANT); }
"AGENT_ON_OBJECT" { yylval.ival = AGENT_ON_OBJECT; return(INTEGER_CONSTANT); }
"AGENT_AWAY" { yylval.ival = AGENT_AWAY; return(INTEGER_CONSTANT); }
"AGENT_WALKING" { yylval.ival = AGENT_WALKING; return(INTEGER_CONSTANT); }
"AGENT_IN_AIR" { yylval.ival = AGENT_IN_AIR; return(INTEGER_CONSTANT); }
"AGENT_TYPING" { yylval.ival = AGENT_TYPING; return(INTEGER_CONSTANT); }
"AGENT_CROUCHING" { yylval.ival = AGENT_CROUCHING; return(INTEGER_CONSTANT); }
"AGENT_BUSY" { yylval.ival = AGENT_BUSY; return(INTEGER_CONSTANT); }
"AGENT_ALWAYS_RUN" { yylval.ival = AGENT_ALWAYS_RUN; return(INTEGER_CONSTANT); }
"ANIM_ON" { yylval.ival = 0x1; return(INTEGER_CONSTANT); }
"LOOP" { yylval.ival = 0x2; return(INTEGER_CONSTANT); }
"REVERSE" { yylval.ival = 0x4; return(INTEGER_CONSTANT); }
"PING_PONG" { yylval.ival = 0x8; return(INTEGER_CONSTANT); }
"SMOOTH" { yylval.ival = 0x10; return(INTEGER_CONSTANT); }
"ROTATE" { yylval.ival = 0x20; return(INTEGER_CONSTANT); }
"SCALE" { yylval.ival = 0x40; return(INTEGER_CONSTANT); }
"ALL_SIDES" { yylval.ival = LSL_ALL_SIDES; return(INTEGER_CONSTANT); }
"LINK_ROOT" { yylval.ival = LSL_LINK_ROOT; return(INTEGER_CONSTANT); }
"LINK_SET" { yylval.ival = LSL_LINK_SET; return(INTEGER_CONSTANT); }
"LINK_ALL_OTHERS" { yylval.ival = LSL_LINK_ALL_OTHERS; return(INTEGER_CONSTANT); }
"LINK_ALL_CHILDREN" { yylval.ival = LSL_LINK_ALL_CHILDREN; return(INTEGER_CONSTANT); }
"LINK_THIS" { yylval.ival = LSL_LINK_THIS; return(INTEGER_CONSTANT); }
"AGENT" { yylval.ival = 0x1; return(INTEGER_CONSTANT); }
"ACTIVE" { yylval.ival = 0x2; return(INTEGER_CONSTANT); }
"PASSIVE" { yylval.ival = 0x4; return(INTEGER_CONSTANT); }
"SCRIPTED" { yylval.ival = 0x8; return(INTEGER_CONSTANT); }
"CONTROL_FWD" { yylval.ival = AGENT_CONTROL_AT_POS; return(INTEGER_CONSTANT); }
"CONTROL_BACK" { yylval.ival = AGENT_CONTROL_AT_NEG; return(INTEGER_CONSTANT); }
"CONTROL_LEFT" { yylval.ival = AGENT_CONTROL_LEFT_POS; return(INTEGER_CONSTANT); }
"CONTROL_RIGHT" { yylval.ival = AGENT_CONTROL_LEFT_NEG; return(INTEGER_CONSTANT); }
"CONTROL_ROT_LEFT" { yylval.ival = AGENT_CONTROL_YAW_POS; return(INTEGER_CONSTANT); }
"CONTROL_ROT_RIGHT" { yylval.ival = AGENT_CONTROL_YAW_NEG; return(INTEGER_CONSTANT); }
"CONTROL_UP" { yylval.ival = AGENT_CONTROL_UP_POS; return(INTEGER_CONSTANT); }
"CONTROL_DOWN" { yylval.ival = AGENT_CONTROL_UP_NEG; return(INTEGER_CONSTANT); }
"CONTROL_LBUTTON" { yylval.ival = AGENT_CONTROL_LBUTTON_DOWN; return(INTEGER_CONSTANT); }
"CONTROL_ML_LBUTTON" { yylval.ival = AGENT_CONTROL_ML_LBUTTON_DOWN; return(INTEGER_CONSTANT); }
"PERMISSION_DEBIT" { yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_DEBIT]; return(INTEGER_CONSTANT); }
"PERMISSION_TAKE_CONTROLS" { yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_TAKE_CONTROLS]; return(INTEGER_CONSTANT); }
"PERMISSION_REMAP_CONTROLS" { yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_REMAP_CONTROLS]; return(INTEGER_CONSTANT); }
"PERMISSION_TRIGGER_ANIMATION" { yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_TRIGGER_ANIMATION]; return(INTEGER_CONSTANT); }
"PERMISSION_ATTACH" { yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_ATTACH]; return(INTEGER_CONSTANT); }
"PERMISSION_RELEASE_OWNERSHIP" { yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_RELEASE_OWNERSHIP]; return(INTEGER_CONSTANT); }
"PERMISSION_CHANGE_LINKS" { yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_CHANGE_LINKS]; return(INTEGER_CONSTANT); }
"PERMISSION_CHANGE_JOINTS" { yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_CHANGE_JOINTS]; return(INTEGER_CONSTANT); }
"PERMISSION_CHANGE_PERMISSIONS" { yylval.ival = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_CHANGE_PERMISSIONS]; return(INTEGER_CONSTANT); }
"INVENTORY_TEXTURE" { yylval.ival = LLAssetType::AT_TEXTURE; return(INTEGER_CONSTANT); }
"INVENTORY_SOUND" { yylval.ival = LLAssetType::AT_SOUND; return(INTEGER_CONSTANT); }
"INVENTORY_OBJECT" { yylval.ival = LLAssetType::AT_OBJECT; return(INTEGER_CONSTANT); }
"INVENTORY_SCRIPT" { yylval.ival = LLAssetType::AT_LSL_TEXT; return(INTEGER_CONSTANT); }
"INVENTORY_LANDMARK" { yylval.ival = LLAssetType::AT_LANDMARK; return(INTEGER_CONSTANT); }
"INVENTORY_CLOTHING" { yylval.ival = LLAssetType::AT_CLOTHING; return(INTEGER_CONSTANT); }
"INVENTORY_NOTECARD" { yylval.ival = LLAssetType::AT_NOTECARD; return(INTEGER_CONSTANT); }
"INVENTORY_BODYPART" { yylval.ival = LLAssetType::AT_BODYPART; return(INTEGER_CONSTANT); }
"INVENTORY_ANIMATION" { yylval.ival = LLAssetType::AT_ANIMATION; return(INTEGER_CONSTANT); }
"INVENTORY_GESTURE" { yylval.ival = LLAssetType::AT_GESTURE; return(INTEGER_CONSTANT); }
"INVENTORY_ALL" { yylval.ival = LLAssetType::AT_NONE; return(INTEGER_CONSTANT); }
"CHANGED_INVENTORY" { yylval.ival = 0x1; return(INTEGER_CONSTANT); }
"CHANGED_COLOR" { yylval.ival = 0x2; return(INTEGER_CONSTANT); }
"CHANGED_SHAPE" { yylval.ival = 0x4; return(INTEGER_CONSTANT); }
"CHANGED_SCALE" { yylval.ival = 0x8; return(INTEGER_CONSTANT); }
"CHANGED_TEXTURE" { yylval.ival = 0x10; return(INTEGER_CONSTANT); }
"CHANGED_LINK" { yylval.ival = 0x20; return(INTEGER_CONSTANT); }
"CHANGED_ALLOWED_DROP" { yylval.ival = 0x40; return(INTEGER_CONSTANT); }
"CHANGED_OWNER" { yylval.ival = 0x80; return(INTEGER_CONSTANT); }
"TYPE_INTEGER" { yylval.ival = LST_INTEGER; return(INTEGER_CONSTANT); }
"TYPE_FLOAT" { yylval.ival = LST_FLOATINGPOINT; return(INTEGER_CONSTANT); }
"TYPE_STRING" { yylval.ival = LST_STRING; return(INTEGER_CONSTANT); }
"TYPE_KEY" { yylval.ival = LST_KEY; return(INTEGER_CONSTANT); }
"TYPE_VECTOR" { yylval.ival = LST_VECTOR; return(INTEGER_CONSTANT); }
"TYPE_ROTATION" { yylval.ival = LST_QUATERNION; return(INTEGER_CONSTANT); }
"TYPE_INVALID" { yylval.ival = LST_NULL; return(INTEGER_CONSTANT); }
"NULL_KEY" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "00000000-0000-0000-0000-000000000000"); return(STRING_CONSTANT); }
"EOF" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "\n\n\n"); return(STRING_CONSTANT); }
"PI" { yylval.fval = F_PI; return(FP_CONSTANT); }
"TWO_PI" { yylval.fval = F_TWO_PI; return(FP_CONSTANT); }
"PI_BY_TWO" { yylval.fval = F_PI_BY_TWO; return(FP_CONSTANT); }
"DEG_TO_RAD" { yylval.fval = DEG_TO_RAD; return(FP_CONSTANT); }
"RAD_TO_DEG" { yylval.fval = RAD_TO_DEG; return(FP_CONSTANT); }
"SQRT2" { yylval.fval = F_SQRT2; return(FP_CONSTANT); }
"ZERO_VECTOR" { return(ZERO_VECTOR); }
"ZERO_ROTATION" { return(ZERO_ROTATION); }
"ATTACH_CHEST" { yylval.ival = 1; return(INTEGER_CONSTANT); }
"ATTACH_HEAD" { yylval.ival = 2; return(INTEGER_CONSTANT); }
"ATTACH_LSHOULDER" { yylval.ival = 3; return(INTEGER_CONSTANT); }
"ATTACH_RSHOULDER" { yylval.ival = 4; return(INTEGER_CONSTANT); }
"ATTACH_LHAND" { yylval.ival = 5; return(INTEGER_CONSTANT); }
"ATTACH_RHAND" { yylval.ival = 6; return(INTEGER_CONSTANT); }
"ATTACH_LFOOT" { yylval.ival = 7; return(INTEGER_CONSTANT); }
"ATTACH_RFOOT" { yylval.ival = 8; return(INTEGER_CONSTANT); }
"ATTACH_BACK" { yylval.ival = 9; return(INTEGER_CONSTANT); }
"ATTACH_PELVIS" { yylval.ival = 10; return(INTEGER_CONSTANT); }
"ATTACH_MOUTH" { yylval.ival = 11; return(INTEGER_CONSTANT); }
"ATTACH_CHIN" { yylval.ival = 12; return(INTEGER_CONSTANT); }
"ATTACH_LEAR" { yylval.ival = 13; return(INTEGER_CONSTANT); }
"ATTACH_REAR" { yylval.ival = 14; return(INTEGER_CONSTANT); }
"ATTACH_LEYE" { yylval.ival = 15; return(INTEGER_CONSTANT); }
"ATTACH_REYE" { yylval.ival = 16; return(INTEGER_CONSTANT); }
"ATTACH_NOSE" { yylval.ival = 17; return(INTEGER_CONSTANT); }
"ATTACH_RUARM" { yylval.ival = 18; return(INTEGER_CONSTANT); }
"ATTACH_RLARM" { yylval.ival = 19; return(INTEGER_CONSTANT); }
"ATTACH_LUARM" { yylval.ival = 20; return(INTEGER_CONSTANT); }
"ATTACH_LLARM" { yylval.ival = 21; return(INTEGER_CONSTANT); }
"ATTACH_RHIP" { yylval.ival = 22; return(INTEGER_CONSTANT); }
"ATTACH_RULEG" { yylval.ival = 23; return(INTEGER_CONSTANT); }
"ATTACH_RLLEG" { yylval.ival = 24; return(INTEGER_CONSTANT); }
"ATTACH_LHIP" { yylval.ival = 25; return(INTEGER_CONSTANT); }
"ATTACH_LULEG" { yylval.ival = 26; return(INTEGER_CONSTANT); }
"ATTACH_LLLEG" { yylval.ival = 27; return(INTEGER_CONSTANT); }
"ATTACH_BELLY" { yylval.ival = 28; return(INTEGER_CONSTANT); }
"ATTACH_RPEC" { yylval.ival = 29; return(INTEGER_CONSTANT); }
"ATTACH_LPEC" { yylval.ival = 30; return(INTEGER_CONSTANT); }
"LAND_LEVEL" { yylval.ival = E_LANDBRUSH_LEVEL; return(INTEGER_CONSTANT); }
"LAND_RAISE" { yylval.ival = E_LANDBRUSH_RAISE; return(INTEGER_CONSTANT); }
"LAND_LOWER" { yylval.ival = E_LANDBRUSH_LOWER; return(INTEGER_CONSTANT); }
"LAND_SMOOTH" { yylval.ival = E_LANDBRUSH_SMOOTH; return(INTEGER_CONSTANT); }
"LAND_NOISE" { yylval.ival = E_LANDBRUSH_NOISE; return(INTEGER_CONSTANT); }
"LAND_REVERT" { yylval.ival = E_LANDBRUSH_REVERT; return(INTEGER_CONSTANT); }
"LAND_SMALL_BRUSH" { yylval.ival = 1; return(INTEGER_CONSTANT); }
"LAND_MEDIUM_BRUSH" { yylval.ival = 2; return(INTEGER_CONSTANT); }
"LAND_LARGE_BRUSH" { yylval.ival = 3; return(INTEGER_CONSTANT); }
"DATA_ONLINE" { yylval.ival = 1; return(INTEGER_CONSTANT); }
"DATA_NAME" { yylval.ival = 2; return(INTEGER_CONSTANT); }
"DATA_BORN" { yylval.ival = 3; return(INTEGER_CONSTANT); }
"DATA_RATING" { yylval.ival = 4; return(INTEGER_CONSTANT); }
"DATA_SIM_POS" { yylval.ival = 5; return(INTEGER_CONSTANT); }
"DATA_SIM_STATUS" { yylval.ival = 6; return(INTEGER_CONSTANT); }
"REMOTE_DATA_CHANNEL" { yylval.ival = 1; return(INTEGER_CONSTANT); }
"REMOTE_DATA_REQUEST" { yylval.ival = 2; return(INTEGER_CONSTANT); }
"REMOTE_DATA_REPLY" { yylval.ival = 3; return(INTEGER_CONSTANT); }
"PSYS_PART_FLAGS" { yylval.ival = LLPS_PART_FLAGS; return(INTEGER_CONSTANT); }
"PSYS_PART_START_COLOR" { yylval.ival = LLPS_PART_START_COLOR; return (INTEGER_CONSTANT); }
"PSYS_PART_START_ALPHA" { yylval.ival = LLPS_PART_START_ALPHA; return (INTEGER_CONSTANT); }
"PSYS_PART_START_SCALE" { yylval.ival = LLPS_PART_START_SCALE; return (INTEGER_CONSTANT); }
"PSYS_PART_END_COLOR" { yylval.ival = LLPS_PART_END_COLOR; return (INTEGER_CONSTANT); }
"PSYS_PART_END_ALPHA" { yylval.ival = LLPS_PART_END_ALPHA; return (INTEGER_CONSTANT); }
"PSYS_PART_END_SCALE" { yylval.ival = LLPS_PART_END_SCALE; return (INTEGER_CONSTANT); }
"PSYS_PART_MAX_AGE" { yylval.ival = LLPS_PART_MAX_AGE; return (INTEGER_CONSTANT); }
"PSYS_PART_WIND_MASK" { yylval.ival = LLPartData::LL_PART_WIND_MASK; return(INTEGER_CONSTANT); }
"PSYS_PART_INTERP_COLOR_MASK" { yylval.ival = LLPartData::LL_PART_INTERP_COLOR_MASK; return(INTEGER_CONSTANT); }
"PSYS_PART_INTERP_SCALE_MASK" { yylval.ival = LLPartData::LL_PART_INTERP_SCALE_MASK; return(INTEGER_CONSTANT); }
"PSYS_PART_BOUNCE_MASK" { yylval.ival = LLPartData::LL_PART_BOUNCE_MASK; return(INTEGER_CONSTANT); }
"PSYS_PART_FOLLOW_SRC_MASK" { yylval.ival = LLPartData::LL_PART_FOLLOW_SRC_MASK; return(INTEGER_CONSTANT); }
"PSYS_PART_FOLLOW_VELOCITY_MASK" { yylval.ival = LLPartData::LL_PART_FOLLOW_VELOCITY_MASK; return(INTEGER_CONSTANT); }
"PSYS_PART_TARGET_POS_MASK" { yylval.ival = LLPartData::LL_PART_TARGET_POS_MASK; return(INTEGER_CONSTANT); }
"PSYS_PART_EMISSIVE_MASK" { yylval.ival = LLPartData::LL_PART_EMISSIVE_MASK; return(INTEGER_CONSTANT); }
"PSYS_PART_TARGET_LINEAR_MASK" { yylval.ival = LLPartData::LL_PART_TARGET_LINEAR_MASK; return(INTEGER_CONSTANT); }
"PSYS_SRC_MAX_AGE" { yylval.ival = LLPS_SRC_MAX_AGE; return(INTEGER_CONSTANT); }
"PSYS_SRC_PATTERN" { yylval.ival = LLPS_SRC_PATTERN; return(INTEGER_CONSTANT); }
"PSYS_SRC_INNERANGLE" { yylval.ival = LLPS_SRC_INNERANGLE; return(INTEGER_CONSTANT); }
"PSYS_SRC_OUTERANGLE" { yylval.ival = LLPS_SRC_OUTERANGLE; return(INTEGER_CONSTANT); }
"PSYS_SRC_ANGLE_BEGIN" { yylval.ival = LLPS_SRC_ANGLE_BEGIN; return(INTEGER_CONSTANT); }
"PSYS_SRC_ANGLE_END" { yylval.ival = LLPS_SRC_ANGLE_END; return(INTEGER_CONSTANT); }
"PSYS_SRC_BURST_RATE" { yylval.ival = LLPS_SRC_BURST_RATE; return(INTEGER_CONSTANT); }
"PSYS_SRC_BURST_PART_COUNT" { yylval.ival = LLPS_SRC_BURST_PART_COUNT; return(INTEGER_CONSTANT); }
"PSYS_SRC_BURST_RADIUS" { yylval.ival = LLPS_SRC_BURST_RADIUS; return(INTEGER_CONSTANT); }
"PSYS_SRC_BURST_SPEED_MIN" { yylval.ival = LLPS_SRC_BURST_SPEED_MIN; return(INTEGER_CONSTANT); }
"PSYS_SRC_BURST_SPEED_MAX" { yylval.ival = LLPS_SRC_BURST_SPEED_MAX; return(INTEGER_CONSTANT); }
"PSYS_SRC_ACCEL" { yylval.ival = LLPS_SRC_ACCEL; return(INTEGER_CONSTANT); }
"PSYS_SRC_TEXTURE" { yylval.ival = LLPS_SRC_TEXTURE; return(INTEGER_CONSTANT); }
"PSYS_SRC_TARGET_KEY" { yylval.ival = LLPS_SRC_TARGET_UUID; return(INTEGER_CONSTANT); }
"PSYS_SRC_OMEGA" { yylval.ival = LLPS_SRC_OMEGA; return(INTEGER_CONSTANT); }
"PSYS_SRC_OBJ_REL_MASK" { yylval.ival = LLPartSysData::LL_PART_SRC_OBJ_REL_MASK; return(INTEGER_CONSTANT); }
"PSYS_SRC_PATTERN_DROP" { yylval.ival = LLPartSysData::LL_PART_SRC_PATTERN_DROP; return(INTEGER_CONSTANT); }
"PSYS_SRC_PATTERN_EXPLODE" { yylval.ival = LLPartSysData::LL_PART_SRC_PATTERN_EXPLODE; return(INTEGER_CONSTANT); }
"PSYS_SRC_PATTERN_ANGLE" { yylval.ival = LLPartSysData::LL_PART_SRC_PATTERN_ANGLE; return(INTEGER_CONSTANT); }
"PSYS_SRC_PATTERN_ANGLE_CONE" { yylval.ival = LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE; return(INTEGER_CONSTANT); }
"PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY" { yylval.ival = LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE_EMPTY; return(INTEGER_CONSTANT); }
"VEHICLE_TYPE_NONE" { yylval.ival = VEHICLE_TYPE_NONE; return(INTEGER_CONSTANT); }
"VEHICLE_TYPE_SLED" { yylval.ival = VEHICLE_TYPE_SLED; return(INTEGER_CONSTANT); }
"VEHICLE_TYPE_CAR" { yylval.ival = VEHICLE_TYPE_CAR; return(INTEGER_CONSTANT); }
"VEHICLE_TYPE_BOAT" { yylval.ival = VEHICLE_TYPE_BOAT; return(INTEGER_CONSTANT); }
"VEHICLE_TYPE_AIRPLANE" { yylval.ival = VEHICLE_TYPE_AIRPLANE; return(INTEGER_CONSTANT); }
"VEHICLE_TYPE_BALLOON" { yylval.ival = VEHICLE_TYPE_BALLOON; return(INTEGER_CONSTANT); }
"VEHICLE_REFERENCE_FRAME" { yylval.ival = VEHICLE_REFERENCE_FRAME; return(INTEGER_CONSTANT); }
"VEHICLE_LINEAR_FRICTION_TIMESCALE" { yylval.ival = VEHICLE_LINEAR_FRICTION_TIMESCALE; return(INTEGER_CONSTANT); }
"VEHICLE_ANGULAR_FRICTION_TIMESCALE" { yylval.ival = VEHICLE_ANGULAR_FRICTION_TIMESCALE; return(INTEGER_CONSTANT); }
"VEHICLE_LINEAR_MOTOR_DIRECTION" { yylval.ival = VEHICLE_LINEAR_MOTOR_DIRECTION; return(INTEGER_CONSTANT); }
"VEHICLE_ANGULAR_MOTOR_DIRECTION" { yylval.ival = VEHICLE_ANGULAR_MOTOR_DIRECTION; return(INTEGER_CONSTANT); }
"VEHICLE_LINEAR_MOTOR_OFFSET" { yylval.ival = VEHICLE_LINEAR_MOTOR_OFFSET; return(INTEGER_CONSTANT); }
"VEHICLE_HOVER_HEIGHT" { yylval.ival = VEHICLE_HOVER_HEIGHT; return(INTEGER_CONSTANT); }
"VEHICLE_HOVER_EFFICIENCY" { yylval.ival = VEHICLE_HOVER_EFFICIENCY; return(INTEGER_CONSTANT); }
"VEHICLE_HOVER_TIMESCALE" { yylval.ival = VEHICLE_HOVER_TIMESCALE; return(INTEGER_CONSTANT); }
"VEHICLE_BUOYANCY" { yylval.ival = VEHICLE_BUOYANCY; return(INTEGER_CONSTANT); }
"VEHICLE_LINEAR_DEFLECTION_EFFICIENCY" { yylval.ival = VEHICLE_LINEAR_DEFLECTION_EFFICIENCY; return(INTEGER_CONSTANT); }
"VEHICLE_LINEAR_DEFLECTION_TIMESCALE" { yylval.ival = VEHICLE_LINEAR_DEFLECTION_TIMESCALE; return(INTEGER_CONSTANT); }
"VEHICLE_LINEAR_MOTOR_TIMESCALE" { yylval.ival = VEHICLE_LINEAR_MOTOR_TIMESCALE; return(INTEGER_CONSTANT); }
"VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE" { yylval.ival = VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE; return(INTEGER_CONSTANT); }
"VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY" { yylval.ival = VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY; return(INTEGER_CONSTANT); }
"VEHICLE_ANGULAR_DEFLECTION_TIMESCALE" { yylval.ival = VEHICLE_ANGULAR_DEFLECTION_TIMESCALE; return(INTEGER_CONSTANT); }
"VEHICLE_ANGULAR_MOTOR_TIMESCALE" { yylval.ival = VEHICLE_ANGULAR_MOTOR_TIMESCALE; return(INTEGER_CONSTANT); }
"VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE" { yylval.ival = VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE; return(INTEGER_CONSTANT); }
"VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY" { yylval.ival = VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY; return(INTEGER_CONSTANT); }
"VEHICLE_VERTICAL_ATTRACTION_TIMESCALE" { yylval.ival = VEHICLE_VERTICAL_ATTRACTION_TIMESCALE; return(INTEGER_CONSTANT); }
"VEHICLE_BANKING_EFFICIENCY" { yylval.ival = VEHICLE_BANKING_EFFICIENCY; return(INTEGER_CONSTANT); }
"VEHICLE_BANKING_MIX" { yylval.ival = VEHICLE_BANKING_MIX; return(INTEGER_CONSTANT); }
"VEHICLE_BANKING_TIMESCALE" { yylval.ival = VEHICLE_BANKING_TIMESCALE; return(INTEGER_CONSTANT); }
"VEHICLE_FLAG_NO_FLY_UP" { yylval.ival = VEHICLE_FLAG_NO_DEFLECTION_UP; return(INTEGER_CONSTANT); }
"VEHICLE_FLAG_NO_DEFLECTION_UP" { yylval.ival = VEHICLE_FLAG_NO_DEFLECTION_UP; return(INTEGER_CONSTANT); }
"VEHICLE_FLAG_LIMIT_ROLL_ONLY" { yylval.ival = VEHICLE_FLAG_LIMIT_ROLL_ONLY; return(INTEGER_CONSTANT); }
"VEHICLE_FLAG_HOVER_WATER_ONLY" { yylval.ival = VEHICLE_FLAG_HOVER_WATER_ONLY; return(INTEGER_CONSTANT); }
"VEHICLE_FLAG_HOVER_TERRAIN_ONLY" { yylval.ival = VEHICLE_FLAG_HOVER_TERRAIN_ONLY; return(INTEGER_CONSTANT); }
"VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT" { yylval.ival = VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT; return(INTEGER_CONSTANT); }
"VEHICLE_FLAG_HOVER_UP_ONLY" { yylval.ival = VEHICLE_FLAG_HOVER_UP_ONLY; return(INTEGER_CONSTANT); }
"VEHICLE_FLAG_LIMIT_MOTOR_UP" { yylval.ival = VEHICLE_FLAG_LIMIT_MOTOR_UP; return(INTEGER_CONSTANT); }
"VEHICLE_FLAG_MOUSELOOK_STEER" { yylval.ival = VEHICLE_FLAG_MOUSELOOK_STEER; return(INTEGER_CONSTANT); }
"VEHICLE_FLAG_MOUSELOOK_BANK" { yylval.ival = VEHICLE_FLAG_MOUSELOOK_BANK; return(INTEGER_CONSTANT); }
"VEHICLE_FLAG_CAMERA_DECOUPLED" { yylval.ival = VEHICLE_FLAG_CAMERA_DECOUPLED; return(INTEGER_CONSTANT); }
"PRIM_TYPE" { yylval.ival = LSL_PRIM_TYPE; return(INTEGER_CONSTANT); }
"PRIM_MATERIAL" { yylval.ival = LSL_PRIM_MATERIAL; return(INTEGER_CONSTANT); }
"PRIM_PHYSICS" { yylval.ival = LSL_PRIM_PHYSICS; return(INTEGER_CONSTANT); }
"PRIM_TEMP_ON_REZ" { yylval.ival = LSL_PRIM_TEMP_ON_REZ; return(INTEGER_CONSTANT); }
"PRIM_PHANTOM" { yylval.ival = LSL_PRIM_PHANTOM; return(INTEGER_CONSTANT); }
"PRIM_POSITION" { yylval.ival = LSL_PRIM_POSITION; return(INTEGER_CONSTANT); }
"PRIM_SIZE" { yylval.ival = LSL_PRIM_SIZE; return(INTEGER_CONSTANT); }
"PRIM_ROTATION" { yylval.ival = LSL_PRIM_ROTATION; return(INTEGER_CONSTANT); }
"PRIM_TEXTURE" { yylval.ival = LSL_PRIM_TEXTURE; return(INTEGER_CONSTANT); }
"PRIM_COLOR" { yylval.ival = LSL_PRIM_COLOR; return(INTEGER_CONSTANT); }
"PRIM_BUMP_SHINY" { yylval.ival = LSL_PRIM_BUMP_SHINY; return(INTEGER_CONSTANT); }
"PRIM_TYPE_BOX" { yylval.ival = LSL_PRIM_TYPE_BOX; return(INTEGER_CONSTANT); }
"PRIM_TYPE_CYLINDER" { yylval.ival = LSL_PRIM_TYPE_CYLINDER; return(INTEGER_CONSTANT); }
"PRIM_TYPE_PRISM" { yylval.ival = LSL_PRIM_TYPE_PRISM; return(INTEGER_CONSTANT); }
"PRIM_TYPE_SPHERE" { yylval.ival = LSL_PRIM_TYPE_SPHERE; return(INTEGER_CONSTANT); }
"PRIM_TYPE_TORUS" { yylval.ival = LSL_PRIM_TYPE_TORUS; return(INTEGER_CONSTANT); }
"PRIM_TYPE_TUBE" { yylval.ival = LSL_PRIM_TYPE_TUBE; return(INTEGER_CONSTANT); }
"PRIM_TYPE_RING" { yylval.ival = LSL_PRIM_TYPE_RING; return(INTEGER_CONSTANT); }
"PRIM_HOLE_DEFAULT" { yylval.ival = LSL_PRIM_HOLE_DEFAULT; return(INTEGER_CONSTANT); }
"PRIM_HOLE_CIRCLE" { yylval.ival = LSL_PRIM_HOLE_CIRCLE; return(INTEGER_CONSTANT); }
"PRIM_HOLE_SQUARE" { yylval.ival = LSL_PRIM_HOLE_SQUARE; return(INTEGER_CONSTANT); }
"PRIM_HOLE_TRIANGLE" { yylval.ival = LSL_PRIM_HOLE_TRIANGLE; return(INTEGER_CONSTANT); }
"PRIM_MATERIAL_STONE" { yylval.ival = LSL_PRIM_MATERIAL_STONE; return(INTEGER_CONSTANT); }
"PRIM_MATERIAL_METAL" { yylval.ival = LSL_PRIM_MATERIAL_METAL; return(INTEGER_CONSTANT); }
"PRIM_MATERIAL_GLASS" { yylval.ival = LSL_PRIM_MATERIAL_GLASS; return(INTEGER_CONSTANT); }
"PRIM_MATERIAL_WOOD" { yylval.ival = LSL_PRIM_MATERIAL_WOOD; return(INTEGER_CONSTANT); }
"PRIM_MATERIAL_FLESH" { yylval.ival = LSL_PRIM_MATERIAL_FLESH; return(INTEGER_CONSTANT); }
"PRIM_MATERIAL_PLASTIC" { yylval.ival = LSL_PRIM_MATERIAL_PLASTIC; return(INTEGER_CONSTANT); }
"PRIM_MATERIAL_RUBBER" { yylval.ival = LSL_PRIM_MATERIAL_RUBBER; return(INTEGER_CONSTANT); }
"PRIM_MATERIAL_LIGHT" { yylval.ival = LSL_PRIM_MATERIAL_LIGHT; return(INTEGER_CONSTANT); }
"PRIM_SHINY_NONE" { yylval.ival = LSL_PRIM_SHINY_NONE; return(INTEGER_CONSTANT); }
"PRIM_SHINY_LOW" { yylval.ival = LSL_PRIM_SHINY_LOW; return(INTEGER_CONSTANT); }
"PRIM_SHINY_MEDIUM" { yylval.ival = LSL_PRIM_SHINY_MEDIUM; return(INTEGER_CONSTANT); }
"PRIM_SHINY_HIGH" { yylval.ival = LSL_PRIM_SHINY_HIGH; return(INTEGER_CONSTANT); }
"PRIM_BUMP_NONE" { yylval.ival = LSL_PRIM_BUMP_NONE; return(INTEGER_CONSTANT); }
"PRIM_BUMP_BRIGHT" { yylval.ival = LSL_PRIM_BUMP_BRIGHT; return(INTEGER_CONSTANT); }
"PRIM_BUMP_DARK" { yylval.ival = LSL_PRIM_BUMP_DARK; return(INTEGER_CONSTANT); }
"PRIM_BUMP_WOOD" { yylval.ival = LSL_PRIM_BUMP_WOOD; return(INTEGER_CONSTANT); }
"PRIM_BUMP_BARK" { yylval.ival = LSL_PRIM_BUMP_BARK; return(INTEGER_CONSTANT); }
"PRIM_BUMP_BRICKS" { yylval.ival = LSL_PRIM_BUMP_BRICKS; return(INTEGER_CONSTANT); }
"PRIM_BUMP_CHECKER" { yylval.ival = LSL_PRIM_BUMP_CHECKER; return(INTEGER_CONSTANT); }
"PRIM_BUMP_CONCRETE" { yylval.ival = LSL_PRIM_BUMP_CONCRETE; return(INTEGER_CONSTANT); }
"PRIM_BUMP_TILE" { yylval.ival = LSL_PRIM_BUMP_TILE; return(INTEGER_CONSTANT); }
"PRIM_BUMP_STONE" { yylval.ival = LSL_PRIM_BUMP_STONE; return(INTEGER_CONSTANT); }
"PRIM_BUMP_DISKS" { yylval.ival = LSL_PRIM_BUMP_DISKS; return(INTEGER_CONSTANT); }
"PRIM_BUMP_GRAVEL" { yylval.ival = LSL_PRIM_BUMP_GRAVEL; return(INTEGER_CONSTANT); }
"PRIM_BUMP_BLOBS" { yylval.ival = LSL_PRIM_BUMP_BLOBS; return(INTEGER_CONSTANT); }
"PRIM_BUMP_SIDING" { yylval.ival = LSL_PRIM_BUMP_SIDING; return(INTEGER_CONSTANT); }
"PRIM_BUMP_LARGETILE" { yylval.ival = LSL_PRIM_BUMP_LARGETILE; return(INTEGER_CONSTANT); }
"PRIM_BUMP_STUCCO" { yylval.ival = LSL_PRIM_BUMP_STUCCO; return(INTEGER_CONSTANT); }
"PRIM_BUMP_SUCTION" { yylval.ival = LSL_PRIM_BUMP_SUCTION; return(INTEGER_CONSTANT); }
"PRIM_BUMP_WEAVE" { yylval.ival = LSL_PRIM_BUMP_WEAVE; return(INTEGER_CONSTANT); }
"MASK_BASE" { yylval.ival = 0; return(INTEGER_CONSTANT); }
"MASK_OWNER" { yylval.ival = 1; return(INTEGER_CONSTANT); }
"MASK_GROUP" { yylval.ival = 2; return(INTEGER_CONSTANT); }
"MASK_EVERYONE" { yylval.ival = 3; return(INTEGER_CONSTANT); }
"MASK_NEXT" { yylval.ival = 4; return(INTEGER_CONSTANT); }
"PERM_TRANSFER" { yylval.ival = PERM_TRANSFER; return(INTEGER_CONSTANT); }
"PERM_MODIFY" { yylval.ival = PERM_MODIFY; return(INTEGER_CONSTANT); }
"PERM_COPY" { yylval.ival = PERM_COPY; return(INTEGER_CONSTANT); }
"PERM_MOVE" { yylval.ival = PERM_MOVE; return(INTEGER_CONSTANT); }
"PERM_ALL" { yylval.ival = PERM_ALL; return(INTEGER_CONSTANT); }
"PARCEL_MEDIA_COMMAND_STOP" { yylval.ival = PARCEL_MEDIA_COMMAND_STOP; return(INTEGER_CONSTANT); }
"PARCEL_MEDIA_COMMAND_PAUSE" { yylval.ival = PARCEL_MEDIA_COMMAND_PAUSE; return(INTEGER_CONSTANT); }
"PARCEL_MEDIA_COMMAND_PLAY" { yylval.ival = PARCEL_MEDIA_COMMAND_PLAY; return(INTEGER_CONSTANT); }
"PARCEL_MEDIA_COMMAND_LOOP" { yylval.ival = PARCEL_MEDIA_COMMAND_LOOP; return(INTEGER_CONSTANT); }
"PARCEL_MEDIA_COMMAND_TEXTURE" { yylval.ival = PARCEL_MEDIA_COMMAND_TEXTURE; return(INTEGER_CONSTANT); }
"PARCEL_MEDIA_COMMAND_URL" { yylval.ival = PARCEL_MEDIA_COMMAND_URL; return(INTEGER_CONSTANT); }
"PARCEL_MEDIA_COMMAND_TIME" { yylval.ival = PARCEL_MEDIA_COMMAND_TIME; return(INTEGER_CONSTANT); }
"PARCEL_MEDIA_COMMAND_AGENT" { yylval.ival = PARCEL_MEDIA_COMMAND_AGENT; return(INTEGER_CONSTANT); }
"PARCEL_MEDIA_COMMAND_UNLOAD" { yylval.ival = PARCEL_MEDIA_COMMAND_UNLOAD; return(INTEGER_CONSTANT); }
"PARCEL_MEDIA_COMMAND_AUTO_ALIGN" { yylval.ival = PARCEL_MEDIA_COMMAND_AUTO_ALIGN; return(INTEGER_CONSTANT); }
{L}({L}|{N})* { yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(IDENTIFIER); }
{D}+{E} { yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); }
{D}*"."{D}+({E})?{FS}? { yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); }
{D}+"."{D}*({E})?{FS}? { yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); }
L?\"(\\.|[^\\"])*\" { parse_string(); return(STRING_CONSTANT); }
"++" { return(INC_OP); }
"--" { return(DEC_OP); }
"+=" { return(ADD_ASSIGN); }
"-=" { return(SUB_ASSIGN); }
"*=" { return(MUL_ASSIGN); }
"/=" { return(DIV_ASSIGN); }
"%=" { return(MOD_ASSIGN); }
";" { return(';'); }
"{" { return('{'); }
"}" { return('}'); }
"," { return(','); }
"=" { return('='); }
"(" { return('('); }
")" { return(')'); }
"-" { return('-'); }
"+" { return('+'); }
"*" { return('*'); }
"/" { return('/'); }
"%" { return('%'); }
"@" { return('@'); }
":" { return(':'); }
">" { return('>'); }
"<" { return('<'); }
"]" { return(']'); }
"[" { return('['); }
"==" { return(EQ); }
"!=" { return(NEQ); }
">=" { return(GEQ); }
"<=" { return(LEQ); }
"&" { return('&'); }
"|" { return('|'); }
"^" { return('^'); }
"~" { return('~'); }
"!" { return('!'); }
"&&" { return(BOOLEAN_AND); }
"||" { return(BOOLEAN_OR); }
"<<" { return(SHIFT_LEFT); }
">>" { return(SHIFT_RIGHT); }
[ \t\v\n\f] { }
. { /* ignore bad characters */ }
% %
lsl.y
lsl.y
%{
int yylex(void);
int yyerror(const char *fmt, ...);
%}
%union
{
S32 ival;
F32 fval;
char *sval;
class LLScriptType *type;
class LLScriptConstant *constant;
class LLScriptIdentifier *identifier;
class LLScriptSimpleAssignable *assignable;
class LLScriptGlobalVariable *global;
class LLScriptEvent *event;
class LLScriptEventHandler *handler;
class LLScriptExpression *expression;
class LLScriptStatement *statement;
class LLScriptGlobalFunctions *global_funcs;
class LLScriptFunctionDec *global_decl;
class LLScriptState *state;
class LLScritpGlobalStorage *global_store;
class LLScriptScript *script;
};
%token INTEGER
%token FLOAT_TYPE
%token STRING
%token LLKEY
%token VECTOR
%token QUATERNION
%token LIST
%token STATE_DEFAULT
%token STATE
%token EVENT
%token JUMP
%token RETURN
%token STATE_ENTRY
%token STATE_EXIT
%token TOUCH_START
%token TOUCH
%token TOUCH_END
%token COLLISION_START
%token COLLISION
%token COLLISION_END
%token LAND_COLLISION_START
%token LAND_COLLISION
%token LAND_COLLISION_END
%token TIMER
%token CHAT
%token SENSOR
%token NO_SENSOR
%token CONTROL
%token AT_TARGET
%token NOT_AT_TARGET
%token AT_ROT_TARGET
%token NOT_AT_ROT_TARGET
%token MONEY
%token EMAIL
%token RUN_TIME_PERMISSIONS
%token INVENTORY
%token ATTACH
%token DATASERVER
%token MOVING_START
%token MOVING_END
%token REZ
%token OBJECT_REZ
%token LINK_MESSAGE
%token REMOTE_DATA
%token <sval> IDENTIFIER
%token <sval> STATE_DEFAULT
%token <ival> INTEGER_CONSTANT
%token <ival> INTEGER_TRUE
%token <ival> INTEGER_FALSE
%token <fval> FP_CONSTANT
%token <sval> STRING_CONSTANT
%token INC_OP
%token DEC_OP
%token ADD_ASSIGN
%token SUB_ASSIGN
%token MUL_ASSIGN
%token DIV_ASSIGN
%token MOD_ASSIGN
%token EQ
%token NEQ
%token GEQ
%token LEQ
%token BOOLEAN_AND
%token BOOLEAN_OR
%token SHIFT_LEFT
%token SHIFT_RIGHT
%token IF
%token ELSE
%token FOR
%token DO
%token WHILE
%token PRINT
%token PERIOD
%token ZERO_VECTOR
%token ZERO_ROTATION
%nonassoc LOWER_THAN_ELSE
%nonassoc ELSE
%type <script> lscript_program
%type <global_store> globals
%type <global_store> global
%type <global> global_variable
%type <assignable> simple_assignable
%type <assignable> simple_assignable_no_list
%type <constant> constant
%type <assignable> special_constant
%type <assignable> vector_constant
%type <assignable> quaternion_constant
%type <assignable> list_constant
%type <assignable> list_entries
%type <assignable> list_entry
%type <type> typename
%type <global_funcs> global_function
%type <global_decl> function_parameters
%type <global_decl> function_parameter
%type <state> states
%type <state> other_states
%type <state> default
%type <state> state
%type <handler> state_body
%type <handler> event
%type <event> state_entry
%type <event> state_exit
%type <event> touch_start
%type <event> touch
%type <event> touch_end
%type <event> collision_start
%type <event> collision
%type <event> collision_end
%type <event> land_collision_start
%type <event> land_collision
%type <event> land_collision_end
%type <event> at_target
%type <event> not_at_target
%type <event> at_rot_target
%type <event> not_at_rot_target
%type <event> money
%type <event> email
%type <event> run_time_permissions
%type <event> inventory
%type <event> attach
%type <event> dataserver
%type <event> moving_start
%type <event> moving_end
%type <event> rez
%type <event> object_rez
%type <event> remote_data
%type <event> link_message
%type <event> timer
%type <event> chat
%type <event> sensor
%type <event> no_sensor
%type <event> control
%type <statement> compound_statement
%type <statement> statement
%type <statement> statements
%type <statement> declaration
%type <statement> ';'
%type <statement> '@'
%type <expression> nextforexpressionlist
%type <expression> forexpressionlist
%type <expression> nextfuncexpressionlist
%type <expression> funcexpressionlist
%type <expression> nextlistexpressionlist
%type <expression> listexpressionlist
%type <expression> unarypostfixexpression
%type <expression> vector_initializer
%type <expression> quaternion_initializer
%type <expression> list_initializer
%type <expression> lvalue
%type <expression> '-'
%type <expression> '!'
%type <expression> '~'
%type <expression> '='
%type <expression> '<'
%type <expression> '>'
%type <expression> '+'
%type <expression> '*'
%type <expression> '/'
%type <expression> '%'
%type <expression> '&'
%type <expression> '|'
%type <expression> '^'
%type <expression> ADD_ASSIGN
%type <expression> SUB_ASSIGN
%type <expression> MUL_ASSIGN
%type <expression> DIV_ASSIGN
%type <expression> MOD_ASSIGN
%type <expression> EQ
%type <expression> NEQ
%type <expression> LEQ
%type <expression> GEQ
%type <expression> BOOLEAN_AND
%type <expression> BOOLEAN_OR
%type <expression> SHIFT_LEFT
%type <expression> SHIFT_RIGHT
%type <expression> INC_OP
%type <expression> DEC_OP
%type <expression> '('
%type <expression> ')'
%type <expression> PRINT
%type <identifier> name_type
%type <expression> expression
%type <expression> unaryexpression
%type <expression> typecast
%right '=' MUL_ASSIGN DIV_ASSIGN MOD_ASSIGN ADD_ASSIGN SUB_ASSIGN
%left BOOLEAN_AND BOOLEAN_OR
%left '|'
%left '^'
%left '&'
%left EQ NEQ
%left '<' LEQ '>' GEQ
%left SHIFT_LEFT SHIFT_RIGHT
%left '+' '-'
%left '*' '/' '%'
%right '!' '~' INC_OP DEC_OP
%nonassoc INITIALIZER
% %
lscript_program
: globals states
{
}
| states
{
}
;
globals
: global
{
}
| global globals
{
}
;
global
: global_variable
{
}
| global_function
{
}
;
name_type
: typename IDENTIFIER
{
}
;
global_variable
: name_type ';'
{
}
| name_type '=' simple_assignable ';'
{
}
;
simple_assignable
: simple_assignable_no_list
{
}
| list_constant
{
}
;
simple_assignable_no_list
: IDENTIFIER
{
}
| constant
{
}
| special_constant
{
}
;
constant
: INTEGER_CONSTANT
{
}
| INTEGER_TRUE
{
}
| INTEGER_FALSE
{
}
| FP_CONSTANT
{
}
| STRING_CONSTANT
{
}
;
special_constant
: vector_constant
{
}
| quaternion_constant
{
}
;
vector_constant
: '<' simple_assignable ',' simple_assignable ',' simple_assignable '>'
{
}
| ZERO_VECTOR
{
}
;
quaternion_constant
: '<' simple_assignable ',' simple_assignable ',' simple_assignable ',' simple_assignable '>'
{
}
| ZERO_ROTATION
{
}
;
list_constant
: '[' list_entries ']'
{
}
| '[' ']'
{
}
;
list_entries
: list_entry
{
}
| list_entry ',' list_entries
{
}
;
list_entry
: simple_assignable_no_list
{
}
;
typename
: INTEGER
{
}
| FLOAT_TYPE
{
}
| STRING
{
}
| LLKEY
{
}
| VECTOR
{
}
| QUATERNION
{
}
| LIST
{
}
;
global_function
: IDENTIFIER '(' ')' compound_statement
{
}
| name_type '(' ')' compound_statement
{
}
| IDENTIFIER '(' function_parameters ')' compound_statement
{
}
| name_type '(' function_parameters ')' compound_statement
{
}
;
function_parameters
: function_parameter
{
}
| function_parameter ',' function_parameters
{
}
;
function_parameter
: typename IDENTIFIER
{
}
;
states
: default
{
}
| default other_states
{
}
;
other_states
: state
{
}
| state other_states
{
}
;
default
: STATE_DEFAULT '{' state_body '}'
{
}
;
state
: STATE IDENTIFIER '{' state_body '}'
{
}
;
state_body
: event
{
}
| event state_body
{
}
;
event
: state_entry compound_statement
{
}
| state_exit compound_statement
{
}
| touch_start compound_statement
{
}
| touch compound_statement
{
}
| touch_end compound_statement
{
}
| collision_start compound_statement
{
}
| collision compound_statement
{
}
| collision_end compound_statement
{
}
| land_collision_start compound_statement
{
}
| land_collision compound_statement
{
}
| land_collision_end compound_statement
{
}
| timer compound_statement
{
}
| chat compound_statement
{
}
| sensor compound_statement
{
}
| no_sensor compound_statement
{
}
| at_target compound_statement
{
}
| not_at_target compound_statement
{
}
| at_rot_target compound_statement
{
}
| not_at_rot_target compound_statement
{
}
| money compound_statement
{
}
| email compound_statement
{
}
| run_time_permissions compound_statement
{
}
| inventory compound_statement
{
}
| attach compound_statement
{
}
| dataserver compound_statement
{
}
| control compound_statement
{
}
| moving_start compound_statement
{
}
| moving_end compound_statement
{
}
| rez compound_statement
{
}
| object_rez compound_statement
{
}
| link_message compound_statement
{
}
| remote_data compound_statement
{
}
;
state_entry
: STATE_ENTRY '(' ')'
{
}
;
state_exit
: STATE_EXIT '(' ')'
{
}
;
touch_start
: TOUCH_START '(' INTEGER IDENTIFIER ')'
{
}
;
touch
: TOUCH '(' INTEGER IDENTIFIER ')'
{
}
;
touch_end
: TOUCH_END '(' INTEGER IDENTIFIER ')'
{
}
;
collision_start
: COLLISION_START '(' INTEGER IDENTIFIER ')'
{
}
;
collision
: COLLISION '(' INTEGER IDENTIFIER ')'
{
}
;
collision_end
: COLLISION_END '(' INTEGER IDENTIFIER ')'
{
}
;
land_collision_start
: LAND_COLLISION_START '(' VECTOR IDENTIFIER ')'
{
}
;
land_collision
: LAND_COLLISION '(' VECTOR IDENTIFIER ')'
{
}
;
land_collision_end
: LAND_COLLISION_END '(' VECTOR IDENTIFIER ')'
{
}
;
at_target
: AT_TARGET '(' INTEGER IDENTIFIER ',' VECTOR IDENTIFIER ',' VECTOR IDENTIFIER ')'
{
}
;
not_at_target
: NOT_AT_TARGET '(' ')'
{
}
;
at_rot_target
: AT_ROT_TARGET '(' INTEGER IDENTIFIER ',' QUATERNION IDENTIFIER ',' QUATERNION IDENTIFIER ')'
{
}
;
not_at_rot_target
: NOT_AT_ROT_TARGET '(' ')'
{
}
;
money
: MONEY '(' LLKEY IDENTIFIER ',' INTEGER IDENTIFIER ')'
{
}
;
email
: EMAIL '(' STRING IDENTIFIER ',' STRING IDENTIFIER ',' STRING IDENTIFIER ',' STRING IDENTIFIER ',' INTEGER IDENTIFIER ')'
{
}
;
run_time_permissions
: RUN_TIME_PERMISSIONS '(' INTEGER IDENTIFIER ')'
{
}
;
inventory
: INVENTORY '(' INTEGER IDENTIFIER ')'
{
}
;
attach
: ATTACH '(' LLKEY IDENTIFIER ')'
{
}
;
dataserver
: DATASERVER '(' LLKEY IDENTIFIER ',' STRING IDENTIFIER')'
{
}
;
moving_start
: MOVING_START '(' ')'
{
}
;
moving_end
: MOVING_END '(' ')'
{
}
;
timer
: TIMER '(' ')'
{
}
;
chat
: CHAT '(' INTEGER IDENTIFIER ',' STRING IDENTIFIER ',' LLKEY IDENTIFIER ',' STRING IDENTIFIER ')'
{
}
;
sensor
: SENSOR '(' INTEGER IDENTIFIER ')'
{
}
;
no_sensor
: NO_SENSOR '(' ')'
{
}
;
control
: CONTROL '(' LLKEY IDENTIFIER ',' INTEGER IDENTIFIER ',' INTEGER IDENTIFIER ')'
{
}
;
rez
: REZ '(' INTEGER IDENTIFIER ')'
{
}
;
object_rez
: OBJECT_REZ '(' LLKEY IDENTIFIER ')'
{
}
;
link_message
: LINK_MESSAGE '(' INTEGER IDENTIFIER ',' INTEGER IDENTIFIER ',' STRING IDENTIFIER ',' LLKEY IDENTIFIER ')'
{
}
;
remote_data
: REMOTE_DATA '(' INTEGER IDENTIFIER ',' LLKEY IDENTIFIER ',' LLKEY IDENTIFIER ',' STRING IDENTIFIER ',' INTEGER IDENTIFIER ',' STRING IDENTIFIER ')'
{
}
;
compound_statement
: '{' '}'
{
}
| '{' statements '}'
{
}
;
statements
: statement
{
}
| statements statement
{
}
;
statement
: ';'
{
}
| STATE IDENTIFIER ';'
{
}
| STATE STATE_DEFAULT ';'
{
}
| JUMP IDENTIFIER ';'
{
}
| '@' IDENTIFIER ';'
{
}
| RETURN expression ';'
{
}
| RETURN ';'
{
}
| expression ';'
{
}
| declaration ';'
{
}
| compound_statement
{
}
| IF '(' expression ')' statement %prec LOWER_THAN_ELSE
{
}
| IF '(' expression ')' statement ELSE statement
{
}
| FOR '(' forexpressionlist ';' expression ';' forexpressionlist ')' statement
{
}
| DO statement WHILE '(' expression ')' ';'
{
}
| WHILE '(' expression ')' statement
{
}
;
declaration
: typename IDENTIFIER
{
}
| typename IDENTIFIER '=' expression
{
}
;
forexpressionlist
: /* empty */
{
}
| nextforexpressionlist
{
}
;
nextforexpressionlist
: expression
{
}
| expression ',' nextforexpressionlist
{
}
;
funcexpressionlist
: /* empty */
{
}
| nextfuncexpressionlist
{
}
;
nextfuncexpressionlist
: expression
{
}
| expression ',' nextfuncexpressionlist
{
}
;
listexpressionlist
: /* empty */
{
}
| nextlistexpressionlist
{
}
;
nextlistexpressionlist
: expression
{
}
| expression ',' nextlistexpressionlist
{
}
;
expression
: unaryexpression
{
}
| lvalue '=' expression
{
}
| lvalue ADD_ASSIGN expression
{
}
| lvalue SUB_ASSIGN expression
{
}
| lvalue MUL_ASSIGN expression
{
}
| lvalue DIV_ASSIGN expression
{
}
| lvalue MOD_ASSIGN expression
{
}
| expression EQ expression
{
}
| expression NEQ expression
{
}
| expression LEQ expression
{
}
| expression GEQ expression
{
}
| expression '<' expression
{
}
| expression '>' expression
{
}
| expression '+' expression
{
}
| expression '-' expression
{
}
| expression '*' expression
{
}
| expression '/' expression
{
}
| expression '%' expression
{
}
| expression '&' expression
{
}
| expression '|' expression
{
}
| expression '^' expression
{
}
| expression BOOLEAN_AND expression
{
}
| expression BOOLEAN_OR expression
{
}
| expression SHIFT_LEFT expression
{
}
| expression SHIFT_RIGHT expression
{
}
;
unaryexpression
: '-' expression
{
}
| '!' expression
{
}
| '~' expression
{
}
| INC_OP lvalue
{
}
| DEC_OP lvalue
{
}
| typecast
{
}
| unarypostfixexpression
{
}
| '(' expression ')'
{
}
;
typecast
: '(' typename ')' lvalue
{
}
| '(' typename ')' constant
{
}
| '(' typename ')' unarypostfixexpression
{
}
| '(' typename ')' '(' expression ')'
{
}
;
unarypostfixexpression
: vector_initializer
{
}
| quaternion_initializer
{
}
| list_initializer
{
}
| lvalue
{
}
| lvalue INC_OP
{
}
| lvalue DEC_OP
{
}
| IDENTIFIER '(' funcexpressionlist ')'
{
}
| PRINT '(' expression ')'
{
}
| constant
{
}
;
vector_initializer
: '<' expression ',' expression ',' expression '>' %prec INITIALIZER
{
}
| ZERO_VECTOR
{
}
;
quaternion_initializer
: '<' expression ',' expression ',' expression ',' expression '>' %prec INITIALIZER
{
}
| ZERO_ROTATION
{
}
;
list_initializer
: '[' listexpressionlist ']' %prec INITIALIZER
{
}
;
lvalue
: IDENTIFIER
{
}
| IDENTIFIER PERIOD IDENTIFIER
{
}
;
% %
Values of Constants (not official)
Constant | Type | Value | Comment |
TRUE | integer | 1 |
FALSE | integer | 0 |
STATUS_PHYSICS | integer | 1 | 0x1 |
STATUS_ROTATE_X | integer | 2 | 0x2 |
STATUS_ROTATE_Y | integer | 4 | 0x4 |
STATUS_ROTATE_Z | integer | 8 | 0x8 |
STATUS_PHANTOM | integer | 16 | 0x10 |
STATUS_SANDBOX | integer | 32 | 0x20 |
STATUS_BLOCK_GRAB | integer | 64 | 0x40 |
STATUS_DIE_AT_EDGE | integer | 128 | 0x80 |
STATUS_RETURN_AT_EDGE | integer | 256 | 0x100 |
AGENT | integer | 1 | 0x1 |
ACTIVE | integer | 2 | 0x2 |
PASSIVE | integer | 4 | 0x4 |
SCRIPTED | integer | 8 | 0x8 |
CONTROL_FWD | integer | 1 | 0x1 |
CONTROL_BACK | integer | 2 | 0x2 |
CONTROL_LEFT | integer | 4 | 0x4 |
CONTROL_RIGHT | integer | 8 | 0x8 |
CONTROL_UP | integer | 16 | 0x10 |
CONTROL_DOWN | integer | 32 | 0x20 |
CONTROL_ROT_LEFT | integer | 256 | 0x100 |
CONTROL_ROT_RIGHT | integer | 512 | 0x200 |
CONTROL_LBUTTON | integer | 268435456 | 0x10000000 |
CONTROL_ML_LBUTTON | integer | 1073741824 | 0x40000000 |
PERMISSION_DEBIT | integer | 2 | 0x2 |
PERMISSION_TAKE_CONTROLS | integer | 4 | 0x4 |
PERMISSION_REMAP_CONTROLS | integer | 8 | 0x8 |
PERMISSION_TRIGGER_ANIMATION | integer | 16 | 0x10 |
PERMISSION_ATTACH | integer | 32 | 0x20 |
PERMISSION_RELEASE_OWNERSHIP | integer | 64 | 0x40 |
PERMISSION_CHANGE_LINKS | integer | 128 | 0x80 |
PERMISSION_CHANGE_JOINTS | integer | 256 | 0x100 |
PERMISSION_CHANGE_PERMISSIONS | integer | 512 | 0x200 |
PERMISSION_TRACK_CAMERA | integer | 1024 | 0x400 |
AGENT_FLYING | integer | 1 | 0x1 |
AGENT_ATTACHMENTS | integer | 2 | 0x2 |
AGENT_SCRIPTED | integer | 4 | 0x4 |
AGENT_MOUSELOOK | integer | 8 | 0x8 |
AGENT_SITTING | integer | 16 | 0x10 |
AGENT_ON_OBJECT | integer | 32 | 0x20 |
AGENT_AWAY | integer | 64 | 0x40 |
AGENT_WALKING | integer | 128 | 0x80 |
AGENT_IN_AIR | integer | 256 | 0x100 |
AGENT_TYPING | integer | 512 | 0x200 |
AGENT_CROUCHING | integer | 1024 | 0x400 |
AGENT_BUSY | integer | 2048 | 0x800 |
AGENT_ALWAYS_RUN | integer | 4096 | 0x1000 |
PSYS_PART_INTERP_COLOR_MASK | integer | 1 | 0x1 |
PSYS_PART_INTERP_SCALE_MASK | integer | 2 | 0x2 |
PSYS_PART_BOUNCE_MASK | integer | 4 | 0x4 |
PSYS_PART_WIND_MASK | integer | 8 | 0x8 |
PSYS_PART_FOLLOW_SRC_MASK | integer | 16 | 0x10 |
PSYS_PART_FOLLOW_VELOCITY_MASK | integer | 32 | 0x20 |
PSYS_PART_TARGET_POS_MASK | integer | 64 | 0x40 |
PSYS_PART_TARGET_LINEAR_MASK | integer | 128 | 0x80 |
PSYS_PART_EMISSIVE_MASK | integer | 256 | 0x100 |
PSYS_PART_FLAGS | integer | 0 |
PSYS_PART_START_COLOR | integer | 1 |
PSYS_PART_START_ALPHA | integer | 2 |
PSYS_PART_END_COLOR | integer | 3 |
PSYS_PART_END_ALPHA | integer | 4 |
PSYS_PART_START_SCALE | integer | 5 |
PSYS_PART_END_SCALE | integer | 6 |
PSYS_PART_MAX_AGE | integer | 7 |
PSYS_SRC_ACCEL | integer | 8 |
PSYS_SRC_PATTERN | integer | 9 |
PSYS_SRC_INNERANGLE | integer | 10 |
PSYS_SRC_OUTERANGLE | integer | 11 |
PSYS_SRC_TEXTURE | integer | 12 |
PSYS_SRC_BURST_RATE | integer | 13 |
PSYS_SRC_BURST_PART_COUNT | integer | 15 |
PSYS_SRC_BURST_RADIUS | integer | 16 |
PSYS_SRC_BURST_SPEED_MIN | integer | 17 |
PSYS_SRC_BURST_SPEED_MAX | integer | 18 |
PSYS_SRC_MAX_AGE | integer | 19 |
PSYS_SRC_TARGET_KEY | integer | 20 |
PSYS_SRC_OMEGA | integer | 21 |
PSYS_SRC_ANGLE_BEGIN | integer | 22 |
PSYS_SRC_ANGLE_END | integer | 23 |
PSYS_SRC_PATTERN_DROP | integer | 1 | 0x1 |
PSYS_SRC_PATTERN_EXPLODE | integer | 2 | 0x2 |
PSYS_SRC_PATTERN_ANGLE | integer | 4 | 0x4 |
PSYS_SRC_PATTERN_ANGLE_CONE | integer | 8 | 0x8 |
PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY | integer | 16 | 0x10 |
VEHICLE_TYPE_NONE | integer | 0 |
VEHICLE_TYPE_SLED | integer | 1 |
VEHICLE_TYPE_CAR | integer | 2 |
VEHICLE_TYPE_BOAT | integer | 3 |
VEHICLE_TYPE_AIRPLANE | integer | 4 |
VEHICLE_TYPE_BALLOON | integer | 5 |
VEHICLE_LINEAR_FRICTION_TIMESCALE | integer | 16 |
VEHICLE_ANGULAR_FRICTION_TIMESCALE | integer | 17 |
VEHICLE_LINEAR_MOTOR_DIRECTION | integer | 18 |
VEHICLE_LINEAR_MOTOR_OFFSET | integer | 20 |
VEHICLE_ANGULAR_MOTOR_DIRECTION | integer | 19 |
VEHICLE_HOVER_HEIGHT | integer | 24 |
VEHICLE_HOVER_EFFICIENCY | integer | 25 |
VEHICLE_HOVER_TIMESCALE | integer | 26 |
VEHICLE_BUOYANCY | integer | 27 |
VEHICLE_LINEAR_DEFLECTION_EFFICIENCY | integer | 28 |
VEHICLE_LINEAR_DEFLECTION_TIMESCALE | integer | 29 |
VEHICLE_LINEAR_MOTOR_TIMESCALE | integer | 30 |
VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE | integer | 31 |
VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY | integer | 32 |
VEHICLE_ANGULAR_DEFLECTION_TIMESCALE | integer | 33 |
VEHICLE_ANGULAR_MOTOR_TIMESCALE | integer | 34 |
VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE | integer | 35 |
VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY | integer | 36 |
VEHICLE_VERTICAL_ATTRACTION_TIMESCALE | integer | 37 |
VEHICLE_BANKING_EFFICIENCY | integer | 38 |
VEHICLE_BANKING_MIX | integer | 39 |
VEHICLE_BANKING_TIMESCALE | integer | 40 |
VEHICLE_REFERENCE_FRAME | integer | 44 |
VEHICLE_FLAG_NO_DEFLECTION_UP | integer | 1 | 0x1 |
VEHICLE_FLAG_LIMIT_ROLL_ONLY | integer | 2 | 0x2 |
VEHICLE_FLAG_HOVER_WATER_ONLY | integer | 4 | 0x4 |
VEHICLE_FLAG_HOVER_TERRAIN_ONLY | integer | 8 | 0x8 |
VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT | integer | 16 | 0x10 |
VEHICLE_FLAG_HOVER_UP_ONLY | integer | 32 | 0x20 |
VEHICLE_FLAG_LIMIT_MOTOR_UP | integer | 64 | 0x40 |
VEHICLE_FLAG_MOUSELOOK_STEER | integer | 128 | 0x80 |
VEHICLE_FLAG_MOUSELOOK_BANK | integer | 256 | 0x100 |
VEHICLE_FLAG_CAMERA_DECOUPLED | integer | 512 | 0x200 |
INVENTORY_ALL | integer | -1 |
INVENTORY_NONE | integer | -1 |
INVENTORY_TEXTURE | integer | 0 |
INVENTORY_SOUND | integer | 1 |
INVENTORY_LANDMARK | integer | 3 |
INVENTORY_CLOTHING | integer | 5 |
INVENTORY_OBJECT | integer | 6 |
INVENTORY_NOTECARD | integer | 7 |
INVENTORY_SCRIPT | integer | 10 |
INVENTORY_BODYPART | integer | 13 |
INVENTORY_ANIMATION | integer | 20 |
INVENTORY_GESTURE | integer | 21 |
ATTACH_CHEST | integer | 1 |
ATTACH_HEAD | integer | 2 |
ATTACH_LSHOULDER | integer | 3 |
ATTACH_RSHOULDER | integer | 4 |
ATTACH_LHAND | integer | 5 |
ATTACH_RHAND | integer | 6 |
ATTACH_LFOOT | integer | 7 |
ATTACH_RFOOT | integer | 8 |
ATTACH_BACK | integer | 9 |
ATTACH_PELVIS | integer | 10 |
ATTACH_MOUTH | integer | 11 |
ATTACH_CHIN | integer | 12 |
ATTACH_LEAR | integer | 13 |
ATTACH_REAR | integer | 14 |
ATTACH_LEYE | integer | 15 |
ATTACH_REYE | integer | 16 |
ATTACH_NOSE | integer | 17 |
ATTACH_RUARM | integer | 18 |
ATTACH_RLARM | integer | 19 |
ATTACH_LUARM | integer | 20 |
ATTACH_LLARM | integer | 21 |
ATTACH_RHIP | integer | 22 |
ATTACH_RULEG | integer | 23 |
ATTACH_RLLEG | integer | 24 |
ATTACH_LHIP | integer | 25 |
ATTACH_LULEG | integer | 26 |
ATTACH_LLLEG | integer | 27 |
ATTACH_BELLY | integer | 28 |
ATTACH_RPEC | integer | 29 |
ATTACH_LPEC | integer | 30 |
LAND_LEVEL | integer | 0 |
LAND_RAISE | integer | 1 |
LAND_LOWER | integer | 2 |
LAND_SMOOTH | integer | 3 |
LAND_NOISE | integer | 4 |
LAND_REVERT | integer | 5 |
LAND_SMALL_BRUSH | integer | 1 |
LAND_MEDIUM_BRUSH | integer | 2 |
LAND_LARGE_BRUSH | integer | 3 |
DATA_ONLINE | integer | 1 |
DATA_NAME | integer | 2 |
DATA_BORN | integer | 3 |
DATA_RATING | integer | 4 |
DATA_SIM_POS | integer | 5 |
DATA_SIM_STATUS | integer | 6 |
DATA_SIM_RATING | integer | 7 |
ANIM_ON | integer | 1 | 0x1 |
LOOP | integer | 2 | 0x2 |
REVERSE | integer | 4 | 0x4 |
PING_PONG | integer | 8 | 0x8 |
SMOOTH | integer | 16 | 0x10 |
ROTATE | integer | 32 | 0x20 |
SCALE | integer | 64 | 0x40 |
ALL_SIDES | integer | -1 |
LINK_SET | integer | -1 |
LINK_ROOT | integer | 1 |
LINK_ALL_OTHERS | integer | -2 |
LINK_ALL_CHILDREN | integer | -3 |
LINK_THIS | integer | -4 |
CHANGED_INVENTORY | integer | 1 | 0x1 |
CHANGED_COLOR | integer | 2 | 0x2 |
CHANGED_SHAPE | integer | 4 | 0x4 |
CHANGED_SCALE | integer | 8 | 0x8 |
CHANGED_TEXTURE | integer | 16 | 0x10 |
CHANGED_LINK | integer | 32 | 0x20 |
CHANGED_ALLOWED_DROP | integer | 64 | 0x40 |
CHANGED_OWNER | integer | 128 | 0x80 |
TYPE_INVALID | integer | 0 |
TYPE_INTEGER | integer | 1 |
TYPE_FLOAT | integer | 2 |
TYPE_STRING | integer | 3 |
TYPE_KEY | integer | 4 |
TYPE_VECTOR | integer | 5 |
TYPE_ROTATION | integer | 6 |
REMOTE_DATA_CHANNEL | integer | 1 |
REMOTE_DATA_REQUEST | integer | 2 |
REMOTE_DATA_REPLY | integer | 3 |
PRIM_TYPE | integer | 1 | Value changed to 9 |
PRIM_MATERIAL | integer | 2 |
PRIM_PHYSICS | integer | 3 |
PRIM_TEMP_ON_REZ | integer | 4 |
PRIM_PHANTOM | integer | 5 |
PRIM_POSITION | integer | 6 |
PRIM_SIZE | integer | 7 |
PRIM_ROTATION | integer | 8 |
PRIM_TYPE | integer | 9 |
PRIM_TEXTURE | integer | 17 |
PRIM_COLOR | integer | 18 |
PRIM_BUMP_SHINY | integer | 19 |
PRIM_FULLBRIGHT | integer | 20 |
PRIM_FLEXIBLE | integer | 21 |
PRIM_TEXGEN | integer | 22 |
PRIM_TEXGEN_DEFAULT | integer | 0 |
PRIM_TEXGEN_PLANAR | integer | 1 |
PRIM_TYPE_BOX | integer | 0 |
PRIM_TYPE_CYLINDER | integer | 1 |
PRIM_TYPE_PRISM | integer | 2 |
PRIM_TYPE_SPHERE | integer | 3 |
PRIM_TYPE_TORUS | integer | 4 |
PRIM_TYPE_TUBE | integer | 5 |
PRIM_TYPE_RING | integer | 6 |
PRIM_HOLE_DEFAULT | integer | 0 | 0x0 |
PRIM_HOLE_CIRCLE | integer | 16 | 0x10 |
PRIM_HOLE_SQUARE | integer | 32 | 0x20 |
PRIM_HOLE_TRIANGLE | integer | 48 | 0x30 |
PRIM_MATERIAL_STONE | integer | 0 |
PRIM_MATERIAL_METAL | integer | 1 |
PRIM_MATERIAL_GLASS | integer | 2 |
PRIM_MATERIAL_WOOD | integer | 3 |
PRIM_MATERIAL_FLESH | integer | 4 |
PRIM_MATERIAL_PLASTIC | integer | 5 |
PRIM_MATERIAL_RUBBER | integer | 6 |
PRIM_MATERIAL_LIGHT | integer | 7 |
PRIM_SHINY_NONE | integer | 0 |
PRIM_SHINY_LOW | integer | 1 |
PRIM_SHINY_MEDIUM | integer | 2 |
PRIM_SHINY_HIGH | integer | 3 |
PRIM_BUMP_NONE | integer | 0 |
PRIM_BUMP_BRIGHT | integer | 1 |
PRIM_BUMP_DARK | integer | 2 |
PRIM_BUMP_WOOD | integer | 3 |
PRIM_BUMP_BARK | integer | 4 |
PRIM_BUMP_BRICKS | integer | 5 |
PRIM_BUMP_CHECKER | integer | 6 |
PRIM_BUMP_CONCRETE | integer | 7 |
PRIM_BUMP_TILE | integer | 8 |
PRIM_BUMP_STONE | integer | 9 |
PRIM_BUMP_DISKS | integer | 10 |
PRIM_BUMP_GRAVEL | integer | 11 |
PRIM_BUMP_BLOBS | integer | 12 |
PRIM_BUMP_SIDING | integer | 13 |
PRIM_BUMP_LARGETILE | integer | 14 |
PRIM_BUMP_STUCCO | integer | 15 |
PRIM_BUMP_SUCTION | integer | 16 |
PRIM_BUMP_WEAVE | integer | 17 |
MASK_BASE | integer | 0 |
MASK_OWNER | integer | 1 |
MASK_GROUP | integer | 2 |
MASK_EVERYONE | integer | 3 |
MASK_NEXT | integer | 4 |
PERM_TRANSFER | integer | 8192 | 0x2000 |
PERM_MODIFY | integer | 16384 | 0x4000 |
PERM_COPY | integer | 32768 | 0x8000 |
PERM_MOVE | integer | 524288 | 0x80000 |
PERM_ALL | integer | 2147483647 | 0x7FFFFFFF |
PARCEL_MEDIA_COMMAND_STOP | integer | 0 |
PARCEL_MEDIA_COMMAND_PAUSE | integer | 1 |
PARCEL_MEDIA_COMMAND_PLAY | integer | 2 |
PARCEL_MEDIA_COMMAND_LOOP | integer | 3 |
PARCEL_MEDIA_COMMAND_TEXTURE | integer | 4 |
PARCEL_MEDIA_COMMAND_URL | integer | 5 |
PARCEL_MEDIA_COMMAND_TIME | integer | 6 |
PARCEL_MEDIA_COMMAND_AGENT | integer | 7 |
PARCEL_MEDIA_COMMAND_UNLOAD | integer | 8 |
PARCEL_MEDIA_COMMAND_AUTO_ALIGN | integer | 9 |
PAY_HIDE | integer | -1 |
PAY_DEFAULT | integer | -2 |
NULL_KEY | string | "00000000-0000-0000-0000-000000000000" |
EOF | string | "\n\n\n" |
PI | float | 3.14159274f | 3.14159265358979323846264338327950 |
TWO_PI | float | 6.28318548f | 6.28318530717958647692528676655900 |
PI_BY_TWO | float | 1.57079637f | 1.57079632679489661923132169163975 |
DEG_TO_RAD | float | 0.01745329238f | (PI / 180) |
RAD_TO_DEG | float | 57.29578f | (180 / PI) |
SQRT2 | float | 1.414213538f | 1.4142135623730950488016887242097 |
ZERO_VECTOR | vector | <0.0f, 0.0f, 0.0f> |
ZERO_ROTATION | rotation | <0.0f, 0.0f, 0.0f, 1.0f> |
| | |