diff --git a/builtins.cc b/builtins.cc index 82c174e..e989bcc 100644 --- a/builtins.cc +++ b/builtins.cc @@ -32,54 +32,83 @@ LLScriptType *str_to_type(char *str) { } void LLScriptScript::define_builtins() { - LLScriptFunctionDec *dec = NULL; - FILE *fp = NULL; - char buf[1024]; - char *ret_type = NULL; - char *name = NULL; - char *ptype = NULL, *pname = NULL; - int line = 0; - - if(builtins_file != NULL) { - fp = fopen(builtins_file, "r"); - - if (fp==NULL) { - snprintf(buf, 1024, "couldn't open %s", builtins_file); - perror(buf); - exit(EXIT_FAILURE); - } - } + LLScriptFunctionDec *dec = NULL; + FILE *fp = NULL; + char buf[1024]; + char original[1024]; + char *ret_type = NULL; + char *name = NULL; + char *ptype = NULL, *pname = NULL; + int line = 0; + + if(builtins_file != NULL) { + fp = fopen(builtins_file, "r"); - while (1) { - if (fp) { - if (fgets(buf, 1024, fp)==NULL) - break; - } else { - if (builtins_txt[line]==NULL) - break; - strncpy(buf, builtins_txt[line], 1024); - ++line; - } - - ret_type = strtok(buf, " (),"); - name = strtok(NULL, " (),"); - - if ( ret_type == NULL || name == NULL ) { - fprintf(stderr, "error parsing %s\n", builtins_file); - exit(EXIT_FAILURE); - return; - } - - dec = new LLScriptFunctionDec(); - while ( (ptype = strtok(NULL, " (),")) != NULL ) { - if ( (pname = strtok(NULL, " (),")) != NULL ) { - dec->push_child(new LLScriptIdentifier( str_to_type(ptype), strdup(pname))); + if (fp==NULL) { + snprintf(buf, 1024, "couldn't open %s", builtins_file); + perror(buf); + exit(EXIT_FAILURE); } - } + } - define_symbol( new LLScriptSymbol( - strdup(name), str_to_type(ret_type), SYM_FUNCTION, SYM_BUILTIN, dec - )); - } + while (1) { + if (fp) { + if (fgets(buf, 1024, fp)==NULL) + break; + } else { + if (builtins_txt[line]==NULL) + break; + strncpy(buf, builtins_txt[line], 1024); + ++line; + } + + strcpy(original, buf); + + ret_type = strtok(buf, " (),"); + + if ( ret_type == NULL ) { + fprintf(stderr, "error parsing %s: %s\n", builtins_file, original); + exit(EXIT_FAILURE); + return; + } + + if (!strcmp(ret_type, "const")) { + ret_type = strtok(NULL, " (),"); + name = strtok(NULL, " (),"); + + if ( ret_type == NULL || name == NULL ) { + fprintf(stderr, "error parsing %s: %s\n", builtins_file, original); + exit(EXIT_FAILURE); + return; + } + + define_symbol( new LLScriptSymbol( + strdup(name), str_to_type(ret_type), SYM_VARIABLE, SYM_BUILTIN + )); + } + else if (!strcmp(ret_type, "event")) { + printf("ignoring event\n"); + } + else { + name = strtok(NULL, " (),"); + + if ( ret_type == NULL || name == NULL ) { + fprintf(stderr, "error parsing %s: %s\n", builtins_file, original); + exit(EXIT_FAILURE); + return; + } + + dec = new LLScriptFunctionDec(); + while ( (ptype = strtok(NULL, " (),")) != NULL ) { + if ( (pname = strtok(NULL, " (),")) != NULL ) { + dec->push_child(new LLScriptIdentifier( str_to_type(ptype), strdup(pname))); + } + } + + define_symbol( new LLScriptSymbol( + strdup(name), str_to_type(ret_type), SYM_FUNCTION, SYM_BUILTIN, dec + )); + } + } } diff --git a/builtins_txt.cc b/builtins_txt.cc index 3ad19af..e83b801 100644 --- a/builtins_txt.cc +++ b/builtins_txt.cc @@ -332,4 +332,385 @@ char *builtins_txt[] = { "string llStringTrim(string src, integer trim_type)", "void llRegionSay(integer channel, string msg)", "list llGetObjectDetails(key id, list params)", +"const integer STATUS_PHYSICS = 0x1", +"const integer STATUS_ROTATE_X = 0x2", +"const integer STATUS_ROTATE_Y = 0x4", +"const integer STATUS_ROTATE_Z = 0x8", +"const integer STATUS_PHANTOM = 0x10", +"const integer STATUS_SANDBOX = 0x20", +"const integer STATUS_BLOCK_GRAB = 0x40", +"const integer STATUS_DIE_AT_EDGE = 0x80", +"const integer STATUS_RETURN_AT_EDGE = 0x100", +"const integer AGENT_FLYING = 0x1", +"const integer AGENT_ATTACHMENTS = 0x2", +"const integer AGENT_SCRIPTED = 0x4", +"const integer AGENT_MOUSELOOK = 0x8", +"const integer AGENT_SITTING = 0x10", +"const integer AGENT_ON_OBJECT = 0x20", +"const integer AGENT_AWAY = 0x40", +"const integer AGENT_WALKING = 0x80", +"const integer AGENT_IN_AIR = 0x100", +"const integer AGENT_TYPING = 0x200", +"const integer AGENT_CROUCHING = 0x400", +"const integer AGENT_BUSY = 0x800", +"const integer AGENT_ALWAYS_RUN = 0x1000", +"const integer ANIM_ON = 0x1", +"const integer LOOP = 0x2", +"const integer REVERSE = 0x4", +"const integer PING_PONG = 0x8", +"const integer SMOOTH = 0x10", +"const integer ROTATE = 0x20", +"const integer SCALE = 0x40", +"const integer ALL_SIDES = -1", +"const integer LINK_ROOT = 0", +"const integer LINK_SET = -1", +"const integer LINK_ALL_OTHERS = -2", +"const integer LINK_ALL_CHILDREN = -3", +"const integer LINK_THIS = -4", +"const integer AGENT = 0x1", +"const integer ACTIVE = 0x2", +"const integer PASSIVE = 0x4", +"const integer SCRIPTED = 0x8", +"const integer CONTROL_FWD = 0x1", +"const integer CONTROL_BACK = 0x2", +"const integer CONTROL_LEFT = 0x4", +"const integer CONTROL_RIGHT = 0x8", +"const integer CONTROL_ROT_LEFT = 0x100", +"const integer CONTROL_ROT_RIGHT = 0x200", +"const integer CONTROL_UP = 0x10", +"const integer CONTROL_DOWN = 0x20", +"const integer CONTROL_LBUTTON = 0x10000000", +"const integer CONTROL_ML_LBUTTON = 0x40000000", +"const integer PERMISSION_DEBIT = 0x2", +"const integer PERMISSION_TAKE_CONTROLS = 0x4", +"const integer PERMISSION_REMAP_CONTROLS = 0x8", +"const integer PERMISSION_TRIGGER_ANIMATION = 0x10", +"const integer PERMISSION_ATTACH = 0x20", +"const integer PERMISSION_RELEASE_OWNERSHIP = 0x40", +"const integer PERMISSION_CHANGE_LINKS = 0x80", +"const integer PERMISSION_CHANGE_JOINTS = 0x100", +"const integer PERMISSION_CHANGE_PERMISSIONS = 0x200", +"const integer PERMISSION_TRACK_CAMERA = 0x400", +"const integer PERMISSION_CONTROL_CAMERA = 0x800", +"const integer INVENTORY_TEXTURE = 0", +"const integer INVENTORY_SOUND = 1", +"const integer INVENTORY_OBJECT = 6", +"const integer INVENTORY_SCRIPT = 10", +"const integer INVENTORY_LANDMARK = 3", +"const integer INVENTORY_CLOTHING = 5", +"const integer INVENTORY_NOTECARD = 7", +"const integer INVENTORY_BODYPART = 13", +"const integer INVENTORY_ANIMATION = 20", +"const integer INVENTORY_GESTURE = 21", +"const integer INVENTORY_ALL = -1", +"const integer INVENTORY_NONE = -1", +"const integer CHANGED_INVENTORY = 0x1", +"const integer CHANGED_COLOR = 0x2", +"const integer CHANGED_SHAPE = 0x4", +"const integer CHANGED_SCALE = 0x8", +"const integer CHANGED_TEXTURE = 0x10", +"const integer CHANGED_LINK = 0x20", +"const integer CHANGED_ALLOWED_DROP = 0x40", +"const integer CHANGED_OWNER = 0x80", +"const integer CHANGED_REGION = 0x100", +"const integer CHANGED_TELEPORT = 0x200", +"const integer CAMERA_ACTIVE = 12", +"const integer CAMERA_BEHINDNESS_ANGLE = 8", +"const integer CAMERA_BEHINDNESS_LAG = 9", +"const integer CAMERA_DISTANCE = 7", +"const integer CAMERA_FOCUS = 17", +"const integer CAMERA_FOCUS_LAG = 6", +"const integer CAMERA_FOCUS_LOCKED = 22", +"const integer CAMERA_FOCUS_OFFSET = 1", +"const integer CAMERA_FOCUS_THRESHOLD = 11", +"const integer CAMERA_PITCH = 0", +"const integer CAMERA_POSITION = 13", +"const integer CAMERA_POSITION_LAG = 5", +"const integer CAMERA_POSITION_LOCKED = 21", +"const integer CAMERA_POSITION_THRESHOLD = 10", +"const integer REGION_FLAG_ALLOW_DAMAGE = 0x1", +"const integer REGION_FLAG_FIXED_SUN = 0x10", +"const integer REGION_FLAG_BLOCK_TERRAFORM = 0x40", +"const integer REGION_FLAG_SANDBOX = 0x100", +"const integer REGION_FLAG_DISABLE_COLLISIONS = 0x1000", +"const integer REGION_FLAG_DISABLE_PHYSICS = 0x4000", +"const integer REGION_FLAG_BLOCK_FLY = 0x80000", +"const integer REGION_FLAG_ALLOW_DIRECT_TELEPORT = 0x100000", +"const integer REGION_FLAG_RESTRICT_PUSHOBJECT = 0x400000", +"const integer LIST_STAT_MAX = 2", +"const integer LIST_STAT_MIN = 1", +"const integer LIST_STAT_MEAN = 3", +"const integer LIST_STAT_MEDIAN = 4", +"const integer LIST_STAT_STD_DEV = 5", +"const integer LIST_STAT_SUM = 6", +"const integer LIST_STAT_SUM_SQUARES = 7", +"const integer LIST_STAT_NUM_COUNT = 8", +"const integer LIST_STAT_GEOMETRIC_MEAN = 9", +"const integer LIST_STAT_RANGE = 0", +"const integer DEBUG_CHANNEL = 2147483647", +"const integer HTTP_METHOD = 0", +"const integer HTTP_MIMETYPE = 1", +"const integer HTTP_BODY_MAXLENGTH = 2", +"const integer HTTP_VERIFY_CERT = 3", +"const integer HTTP_BODY_TRUNCATED = 0", +"const integer OBJECT_UNKNOWN_DETAIL = -1", +"const integer OBJECT_NAME = 1", +"const integer OBJECT_DESC = 2", +"const integer OBJECT_POS = 3", +"const integer OBJECT_ROT = 4", +"const integer OBJECT_VELOCITY = 5", +"const integer OBJECT_OWNER = 6", +"const integer OBJECT_GROUP = 7", +"const integer OBJECT_CREATOR = 8", +"const integer TYPE_INTEGER = 1", +"const integer TYPE_FLOAT = 2", +"const integer TYPE_STRING = 3", +"const integer TYPE_KEY = 4", +"const integer TYPE_VECTOR = 5", +"const integer TYPE_ROTATION = 6", +"const integer TYPE_INVALID = 0", +"const string NULL_KEY = \"00000000-0000-0000-0000-000000000000\"", +"const string EOF = \"\\n\\n\\n\"", +"const float PI = 3.14159274f", +"const float TWO_PI = 6.28318548f", +"const float PI_BY_TWO = 1.57079637f", +"const float DEG_TO_RAD = 0.01745329238f", +"const float RAD_TO_DEG = 57.29578f", +"const float SQRT2 = 1.414213538f", +"const integer ATTACH_CHEST = 1", +"const integer ATTACH_HEAD = 2", +"const integer ATTACH_LSHOULDER = 3", +"const integer ATTACH_RSHOULDER = 4", +"const integer ATTACH_LHAND = 5", +"const integer ATTACH_RHAND = 6", +"const integer ATTACH_LFOOT = 7", +"const integer ATTACH_RFOOT = 8", +"const integer ATTACH_BACK = 9", +"const integer ATTACH_PELVIS = 10", +"const integer ATTACH_MOUTH = 11", +"const integer ATTACH_CHIN = 12", +"const integer ATTACH_LEAR = 13", +"const integer ATTACH_REAR = 14", +"const integer ATTACH_LEYE = 15", +"const integer ATTACH_REYE = 16", +"const integer ATTACH_NOSE = 17", +"const integer ATTACH_RUARM = 18", +"const integer ATTACH_RLARM = 19", +"const integer ATTACH_LUARM = 20", +"const integer ATTACH_LLARM = 21", +"const integer ATTACH_RHIP = 22", +"const integer ATTACH_RULEG = 23", +"const integer ATTACH_RLLEG = 24", +"const integer ATTACH_LHIP = 25", +"const integer ATTACH_LULEG = 26", +"const integer ATTACH_LLLEG = 27", +"const integer ATTACH_BELLY = 28", +"const integer ATTACH_RPEC = 29", +"const integer ATTACH_LPEC = 30", +"const integer LAND_LEVEL = 0", +"const integer LAND_RAISE = 1", +"const integer LAND_LOWER = 2", +"const integer LAND_SMOOTH = 3", +"const integer LAND_NOISE = 4", +"const integer LAND_REVERT = 5", +"const integer LAND_SMALL_BRUSH = 1", +"const integer LAND_MEDIUM_BRUSH = 2", +"const integer LAND_LARGE_BRUSH = 3", +"const integer DATA_ONLINE = 1", +"const integer DATA_NAME = 2", +"const integer DATA_BORN = 3", +"const integer DATA_RATING = 4", +"const integer DATA_SIM_POS = 5", +"const integer DATA_SIM_STATUS = 6", +"const integer DATA_SIM_RATING = 7", +"const integer DATA_PAYINFO = 8", +"const integer REMOTE_DATA_CHANNEL = 1", +"const integer REMOTE_DATA_REQUEST = 2", +"const integer REMOTE_DATA_REPLY = 3", +"const integer PSYS_PART_FLAGS = 0", +"const integer PSYS_PART_START_COLOR = 1", +"const integer PSYS_PART_START_ALPHA = 2", +"const integer PSYS_PART_START_SCALE = 5", +"const integer PSYS_PART_END_COLOR = 3", +"const integer PSYS_PART_END_ALPHA = 4", +"const integer PSYS_PART_END_SCALE = 6", +"const integer PSYS_PART_MAX_AGE = 7", +"const integer PSYS_PART_WIND_MASK = 0x008", +"const integer PSYS_PART_INTERP_COLOR_MASK = 0x001", +"const integer PSYS_PART_INTERP_SCALE_MASK = 0x002", +"const integer PSYS_PART_BOUNCE_MASK = 0x004", +"const integer PSYS_PART_FOLLOW_SRC_MASK = 0x010", +"const integer PSYS_PART_FOLLOW_VELOCITY_MASK = 0x020", +"const integer PSYS_PART_TARGET_POS_MASK = 0x040", +"const integer PSYS_PART_EMISSIVE_MASK = 0x100", +"const integer PSYS_PART_TARGET_LINEAR_MASK = 0x080", +"const integer PSYS_SRC_MAX_AGE = 19", +"const integer PSYS_SRC_PATTERN = 9", +"const integer PSYS_SRC_INNERANGLE = 10", +"const integer PSYS_SRC_OUTERANGLE = 11", +"const integer PSYS_SRC_ANGLE_BEGIN = 22", +"const integer PSYS_SRC_ANGLE_END = 23", +"const integer PSYS_SRC_BURST_RATE = 13", +"const integer PSYS_SRC_BURST_PART_COUNT = 15", +"const integer PSYS_SRC_BURST_RADIUS = 16", +"const integer PSYS_SRC_BURST_SPEED_MIN = 17", +"const integer PSYS_SRC_BURST_SPEED_MAX = 18", +"const integer PSYS_SRC_ACCEL = 8", +"const integer PSYS_SRC_TEXTURE = 12", +"const integer PSYS_SRC_TARGET_KEY = 20", +"const integer PSYS_SRC_OMEGA = 21", +"const integer PSYS_SRC_PATTERN_DROP = 0x01", +"const integer PSYS_SRC_PATTERN_EXPLODE = 0x02", +"const integer PSYS_SRC_PATTERN_ANGLE = 0x04", +"const integer PSYS_SRC_PATTERN_ANGLE_CONE = 0x08", +"const integer PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY = 0x10", +"const integer VEHICLE_TYPE_NONE = 0", +"const integer VEHICLE_TYPE_SLED = 1", +"const integer VEHICLE_TYPE_CAR = 2", +"const integer VEHICLE_TYPE_BOAT = 3", +"const integer VEHICLE_TYPE_AIRPLANE = 4", +"const integer VEHICLE_TYPE_BALLOON = 5", +"const integer VEHICLE_REFERENCE_FRAME = 44", +"const integer VEHICLE_LINEAR_FRICTION_TIMESCALE = 16", +"const integer VEHICLE_ANGULAR_FRICTION_TIMESCALE = 17", +"const integer VEHICLE_LINEAR_MOTOR_DIRECTION = 18", +"const integer VEHICLE_ANGULAR_MOTOR_DIRECTION = 19", +"const integer VEHICLE_LINEAR_MOTOR_OFFSET = 20", +"const integer VEHICLE_HOVER_HEIGHT = 24", +"const integer VEHICLE_HOVER_EFFICIENCY = 25", +"const integer VEHICLE_HOVER_TIMESCALE = 26", +"const integer VEHICLE_BUOYANCY = 27", +"const integer VEHICLE_LINEAR_DEFLECTION_EFFICIENCY = 28", +"const integer VEHICLE_LINEAR_DEFLECTION_TIMESCALE = 29", +"const integer VEHICLE_LINEAR_MOTOR_TIMESCALE = 30", +"const integer VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE = 31", +"const integer VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY = 32", +"const integer VEHICLE_ANGULAR_DEFLECTION_TIMESCALE = 33", +"const integer VEHICLE_ANGULAR_MOTOR_TIMESCALE = 34", +"const integer VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE = 35", +"const integer VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY = 36", +"const integer VEHICLE_VERTICAL_ATTRACTION_TIMESCALE = 37", +"const integer VEHICLE_BANKING_EFFICIENCY = 38", +"const integer VEHICLE_BANKING_MIX = 39", +"const integer VEHICLE_BANKING_TIMESCALE = 40", +"const integer VEHICLE_FLAG_NO_FLY_UP = 0x1", +"const integer VEHICLE_FLAG_NO_DEFLECTION_UP = 0x1", +"const integer VEHICLE_FLAG_LIMIT_ROLL_ONLY = 0x2", +"const integer VEHICLE_FLAG_HOVER_WATER_ONLY = 0x4", +"const integer VEHICLE_FLAG_HOVER_TERRAIN_ONLY = 0x8", +"const integer VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT = 0x10", +"const integer VEHICLE_FLAG_HOVER_UP_ONLY = 0x20", +"const integer VEHICLE_FLAG_LIMIT_MOTOR_UP = 0x40", +"const integer VEHICLE_FLAG_MOUSELOOK_STEER = 0x80", +"const integer VEHICLE_FLAG_MOUSELOOK_BANK = 0x100", +"const integer VEHICLE_FLAG_CAMERA_DECOUPLED = 0x200", +"const integer PRIM_TYPE = 9", +"const integer PRIM_MATERIAL = 2", +"const integer PRIM_PHYSICS = 3", +"const integer PRIM_TEMP_ON_REZ = 4", +"const integer PRIM_PHANTOM = 5", +"const integer PRIM_POSITION = 6", +"const integer PRIM_SIZE = 7", +"const integer PRIM_ROTATION = 8", +"const integer PRIM_TEXTURE = 17", +"const integer PRIM_COLOR = 18", +"const integer PRIM_BUMP_SHINY = 19", +"const integer PRIM_FULLBRIGHT = 20", +"const integer PRIM_FLEXIBLE = 21", +"const integer PRIM_TEXGEN = 22", +"const integer PRIM_POINT_LIGHT = 23", +"const integer PRIM_GLOW = 25", +"const integer PRIM_TEXGEN_DEFAULT = 0", +"const integer PRIM_TEXGEN_PLANAR = 1", +"const integer PRIM_TYPE_BOX = 0", +"const integer PRIM_TYPE_CYLINDER = 1", +"const integer PRIM_TYPE_PRISM = 2", +"const integer PRIM_TYPE_SPHERE = 3", +"const integer PRIM_TYPE_TORUS = 4", +"const integer PRIM_TYPE_TUBE = 5", +"const integer PRIM_TYPE_RING = 6", +"const integer PRIM_HOLE_DEFAULT = 0x00", +"const integer PRIM_HOLE_CIRCLE = 0x10", +"const integer PRIM_HOLE_SQUARE = 0x20", +"const integer PRIM_HOLE_TRIANGLE = 0x30", +"const integer PRIM_MATERIAL_STONE = 0", +"const integer PRIM_MATERIAL_METAL = 1", +"const integer PRIM_MATERIAL_GLASS = 2", +"const integer PRIM_MATERIAL_WOOD = 3", +"const integer PRIM_MATERIAL_FLESH = 4", +"const integer PRIM_MATERIAL_PLASTIC = 5", +"const integer PRIM_MATERIAL_RUBBER = 6", +"const integer PRIM_MATERIAL_LIGHT = 7", +"const integer PRIM_SHINY_NONE = 0", +"const integer PRIM_SHINY_LOW = 1", +"const integer PRIM_SHINY_MEDIUM = 2", +"const integer PRIM_SHINY_HIGH = 3", +"const integer PRIM_BUMP_NONE = 0", +"const integer PRIM_BUMP_BRIGHT = 1", +"const integer PRIM_BUMP_DARK = 2", +"const integer PRIM_BUMP_WOOD = 3", +"const integer PRIM_BUMP_BARK = 4", +"const integer PRIM_BUMP_BRICKS = 5", +"const integer PRIM_BUMP_CHECKER = 6", +"const integer PRIM_BUMP_CONCRETE = 7", +"const integer PRIM_BUMP_TILE = 8", +"const integer PRIM_BUMP_STONE = 9", +"const integer PRIM_BUMP_DISKS = 10", +"const integer PRIM_BUMP_GRAVEL = 11", +"const integer PRIM_BUMP_BLOBS = 12", +"const integer PRIM_BUMP_SIDING = 13", +"const integer PRIM_BUMP_LARGETILE = 14", +"const integer PRIM_BUMP_STUCCO = 15", +"const integer PRIM_BUMP_SUCTION = 16", +"const integer PRIM_BUMP_WEAVE = 17", +"const integer MASK_BASE = 0", +"const integer MASK_OWNER = 1", +"const integer MASK_GROUP = 2", +"const integer MASK_EVERYONE = 3", +"const integer MASK_NEXT = 4", +"const integer PERM_TRANSFER = 0x2000", +"const integer PERM_MODIFY = 0x4000", +"const integer PERM_COPY = 0x8000", +"const integer PERM_MOVE = 0x80000", +"const integer PERM_ALL = 0x7FFFFFFF", +"const integer PARCEL_MEDIA_COMMAND_STOP = 0", +"const integer PARCEL_MEDIA_COMMAND_PAUSE = 1", +"const integer PARCEL_MEDIA_COMMAND_PLAY = 2", +"const integer PARCEL_MEDIA_COMMAND_LOOP = 3", +"const integer PARCEL_MEDIA_COMMAND_TEXTURE = 4", +"const integer PARCEL_MEDIA_COMMAND_URL = 5", +"const integer PARCEL_MEDIA_COMMAND_TIME = 6", +"const integer PARCEL_MEDIA_COMMAND_AGENT = 7", +"const integer PARCEL_MEDIA_COMMAND_UNLOAD = 8", +"const integer PARCEL_MEDIA_COMMAND_AUTO_ALIGN = 9", +"const integer PAY_HIDE = -1", +"const integer PAY_DEFAULT = -2", +"const integer PARCEL_FLAG_ALLOW_FLY = 0x1", +"const integer PARCEL_FLAG_ALLOW_SCRIPTS = 0x2", +"const integer PARCEL_FLAG_ALLOW_LANDMARK = 0x8", +"const integer PARCEL_FLAG_ALLOW_TERRAFORM = 0x10", +"const integer PARCEL_FLAG_ALLOW_DAMAGE = 0x20", +"const integer PARCEL_FLAG_ALLOW_CREATE_OBJECTS = 0x40", +"const integer PARCEL_FLAG_USE_ACCESS_GROUP = 0x100", +"const integer PARCEL_FLAG_USE_ACCESS_LIST = 0x200", +"const integer PARCEL_FLAG_USE_BAN_LIST = 0x400", +"const integer PARCEL_FLAG_USE_LAND_PASS_LIST = 0x800", +"const integer PARCEL_FLAG_LOCAL_SOUND_ONLY = 0x8000", +"const integer PARCEL_FLAG_RESTRICT_PUSHOBJECT = 0x200000", +"const integer PARCEL_COUNT_TOTAL = 0x0", +"const integer PARCEL_COUNT_OWNER = 0x1", +"const integer PARCEL_COUNT_GROUP = 0x2", +"const integer PARCEL_COUNT_OTHER = 0x3", +"const integer PARCEL_COUNT_SELECTED = 0x4", +"const integer PARCEL_COUNT_TEMP = 0x5", +"const integer PARCEL_DETAILS_NAME = 0x0", +"const integer PARCEL_DETAILS_DESC = 0x1", +"const integer PARCEL_DETAILS_OWNER = 0x2", +"const integer PARCEL_DETAILS_GROUP = 0x3", +"const integer PARCEL_DETAILS_AREA = 0x4", +"const integer STRING_TRIM_HEAD = 0x01", +"const integer STRING_TRIM_TAIL = 0x02", +"const integer STRING_TRIM = 0x03", +"const vector ZERO_VECTOR = <0,0,0>", +"const vector ZERO_ROTATION = <0,0,0,1>", (char*)0 }; diff --git a/logger.cc b/logger.cc index 85c4576..370522b 100644 --- a/logger.cc +++ b/logger.cc @@ -258,7 +258,9 @@ const char *Logger::error_messages[] = { "Are you doing `foo-2`? Separate operators with spaces.\n" "See: http://secondlife.com/badgeo/wakka.php?wakka=knownbugs", "State must have at least one event handler.", - "Parser stack depth exceeded; SL will throw a syntax error here." + "Parser stack depth exceeded; SL will throw a syntax error here.", + "`%s' is a constant and cannot be used as an lvalue.", + "`%s' is a constant and cannot be used in a variable declaration.", }; diff --git a/logger.hh b/logger.hh index fffa8ce..e645d27 100644 --- a/logger.hh +++ b/logger.hh @@ -56,6 +56,8 @@ enum ErrorCode { E_NO_OPERATOR, E_NO_EVENT_HANDLERS, E_PARSER_STACK_DEPTH, + E_BUILTIN_LVALUE, + E_SHADOW_CONSTANT, E_LAST, diff --git a/lslmini.cc b/lslmini.cc index 948cec8..26d6378 100644 --- a/lslmini.cc +++ b/lslmini.cc @@ -132,7 +132,12 @@ void LLASTNode::define_symbol(LLScriptSymbol *symbol) { if ( parent ) { shadow = parent->lookup_symbol(symbol->get_name(), symbol->get_symbol_type()); if ( shadow!= NULL ) { - ERROR( IN(symbol), W_SHADOW_DECLARATION, symbol->get_name(), LINECOL(shadow->get_lloc()) ); + if (shadow->get_sub_type() == SYM_BUILTIN) { + ERROR( IN(symbol), E_SHADOW_CONSTANT, symbol->get_name()); + } + else { + ERROR( IN(symbol), W_SHADOW_DECLARATION, symbol->get_name(), LINECOL(shadow->get_lloc()) ); + } } } } @@ -288,7 +293,12 @@ void LLScriptExpression::determine_type() { // add assignment if ( get_child(0)->get_node_sub_type() == NODE_LVALUE_EXPRESSION && get_child(0)->get_child(0)->get_node_type() == NODE_IDENTIFIER ) { LLScriptIdentifier *id = (LLScriptIdentifier*)get_child(0)->get_child(0); - if ( id->get_symbol() ) id->get_symbol()->add_assignment(); + if ( id->get_symbol() ) { + if (id->get_symbol()->get_sub_type() == SYM_BUILTIN) { + ERROR( HERE, E_BUILTIN_LVALUE, id->get_symbol()->get_name()); + } + id->get_symbol()->add_assignment(); + } } } } diff --git a/lslmini.hh b/lslmini.hh index 8d5008d..c0c421a 100644 --- a/lslmini.hh +++ b/lslmini.hh @@ -14,13 +14,6 @@ typedef float F32; #define UUID_STR_LENGTH 36 #define MAX_NODES 3 -#define F_PI 3.14159274f -#define F_TWO_PI 6.28318548f -#define F_PI_BY_TWO 1.57079637f -#define DEG_TO_RAD 0.01745329238f -#define RAD_TO_DEG 57.29578f -#define F_SQRT2 1.414213538f - extern class LLScriptScript *script; extern int walklevel; void print_walk(char *str); diff --git a/lslmini.l b/lslmini.l index 28d6cb5..e58aba0 100644 --- a/lslmini.l +++ b/lslmini.l @@ -8,7 +8,7 @@ #include #include "lslmini.hh" #include "lslmini.tab.h" -#include "llconstants.hh" +//#include "llconstants.hh" #ifdef WIN32 #include @@ -119,444 +119,6 @@ FS (f|F) "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 = SCRIPT_PERMISSION_DEBIT; return(INTEGER_CONSTANT); } -"PERMISSION_TAKE_CONTROLS" { yylval->ival = SCRIPT_PERMISSION_TAKE_CONTROLS; return(INTEGER_CONSTANT); } -"PERMISSION_REMAP_CONTROLS" { yylval->ival = SCRIPT_PERMISSION_REMAP_CONTROLS; return(INTEGER_CONSTANT); } -"PERMISSION_TRIGGER_ANIMATION" { yylval->ival = SCRIPT_PERMISSION_TRIGGER_ANIMATION; return(INTEGER_CONSTANT); } -"PERMISSION_ATTACH" { yylval->ival = SCRIPT_PERMISSION_ATTACH; return(INTEGER_CONSTANT); } -"PERMISSION_RELEASE_OWNERSHIP" { yylval->ival = SCRIPT_PERMISSION_RELEASE_OWNERSHIP; return(INTEGER_CONSTANT); } -"PERMISSION_CHANGE_LINKS" { yylval->ival = SCRIPT_PERMISSION_CHANGE_LINKS; return(INTEGER_CONSTANT); } -"PERMISSION_CHANGE_JOINTS" { yylval->ival = SCRIPT_PERMISSION_CHANGE_JOINTS; return(INTEGER_CONSTANT); } -"PERMISSION_CHANGE_PERMISSIONS" { yylval->ival = SCRIPT_PERMISSION_CHANGE_PERMISSIONS; return(INTEGER_CONSTANT); } -"PERMISSION_TRACK_CAMERA" { yylval->ival = SCRIPT_PERMISSION_TRACK_CAMERA; return(INTEGER_CONSTANT); } -"PERMISSION_CONTROL_CAMERA" { yylval->ival = 0x800; 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); } -"INVENTORY_NONE" { 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); } -"CHANGED_REGION" { yylval->ival = 0x100; return(INTEGER_CONSTANT); } -"CHANGED_TELEPORT" { yylval->ival = 0x200; return(INTEGER_CONSTANT); } - -"CAMERA_ACTIVE" { yylval->ival = 12; return(INTEGER_CONSTANT); } -"CAMERA_BEHINDNESS_ANGLE" { yylval->ival = 8; return(INTEGER_CONSTANT); } -"CAMERA_BEHINDNESS_LAG" { yylval->ival = 9; return(INTEGER_CONSTANT); } -"CAMERA_DISTANCE" { yylval->ival = 7; return(INTEGER_CONSTANT); } -"CAMERA_FOCUS" { yylval->ival = 17; return(INTEGER_CONSTANT); } -"CAMERA_FOCUS_LAG" { yylval->ival = 6; return(INTEGER_CONSTANT); } -"CAMERA_FOCUS_LOCKED" { yylval->ival = 22; return(INTEGER_CONSTANT); } -"CAMERA_FOCUS_OFFSET" { yylval->ival = 1; return(INTEGER_CONSTANT); } -"CAMERA_FOCUS_THRESHOLD" { yylval->ival = 11; return(INTEGER_CONSTANT); } -"CAMERA_PITCH" { yylval->ival = 0; return(INTEGER_CONSTANT); } -"CAMERA_POSITION" { yylval->ival = 13; return(INTEGER_CONSTANT); } -"CAMERA_POSITION_LAG" { yylval->ival = 5; return(INTEGER_CONSTANT); } -"CAMERA_POSITION_LOCKED" { yylval->ival = 21; return(INTEGER_CONSTANT); } -"CAMERA_POSITION_THRESHOLD" { yylval->ival = 10; return(INTEGER_CONSTANT); } - -"REGION_FLAG_ALLOW_DAMAGE" { yylval->ival = 0x1; return(INTEGER_CONSTANT); } -"REGION_FLAG_FIXED_SUN" { yylval->ival = 0x10; return(INTEGER_CONSTANT); } -"REGION_FLAG_BLOCK_TERRAFORM" { yylval->ival = 0x40; return(INTEGER_CONSTANT); } -"REGION_FLAG_SANDBOX" { yylval->ival = 0x100; return(INTEGER_CONSTANT); } -"REGION_FLAG_DISABLE_COLLISIONS" { yylval->ival = 0x1000; return(INTEGER_CONSTANT); } -"REGION_FLAG_DISABLE_PHYSICS" { yylval->ival = 0x4000; return(INTEGER_CONSTANT); } -"REGION_FLAG_BLOCK_FLY" { yylval->ival = 0x80000; return(INTEGER_CONSTANT); } -"REGION_FLAG_ALLOW_DIRECT_TELEPORT" { yylval->ival = 0x100000; return(INTEGER_CONSTANT); } -"REGION_FLAG_RESTRICT_PUSHOBJECT" { yylval->ival = 0x400000; return(INTEGER_CONSTANT); } - -"LIST_STAT_MAX" { yylval->ival = 2; return(INTEGER_CONSTANT); } -"LIST_STAT_MIN" { yylval->ival = 1; return(INTEGER_CONSTANT); } -"LIST_STAT_MEAN" { yylval->ival = 3; return(INTEGER_CONSTANT); } -"LIST_STAT_MEDIAN" { yylval->ival = 4; return(INTEGER_CONSTANT); } -"LIST_STAT_STD_DEV" { yylval->ival = 5; return(INTEGER_CONSTANT); } -"LIST_STAT_SUM" { yylval->ival = 6; return(INTEGER_CONSTANT); } -"LIST_STAT_SUM_SQUARES" { yylval->ival = 7; return(INTEGER_CONSTANT); } -"LIST_STAT_NUM_COUNT" { yylval->ival = 8; return(INTEGER_CONSTANT); } -"LIST_STAT_GEOMETRIC_MEAN" { yylval->ival = 9; return(INTEGER_CONSTANT); } -"LIST_STAT_RANGE" { yylval->ival = 0; return(INTEGER_CONSTANT); } - -"DEBUG_CHANNEL" { yylval->ival = 2147483647; return(INTEGER_CONSTANT); } - -"HTTP_METHOD" { yylval->ival = 0; return(INTEGER_CONSTANT); } -"HTTP_MIMETYPE" { yylval->ival = 1; return(INTEGER_CONSTANT); } -"HTTP_BODY_MAXLENGTH" { yylval->ival = 2; return(INTEGER_CONSTANT); } -"HTTP_VERIFY_CERT" { yylval->ival = 3; return(INTEGER_CONSTANT); } -"HTTP_BODY_TRUNCATED" { yylval->ival = 0; return(INTEGER_CONSTANT); } - -"OBJECT_UNKNOWN_DETAIL" { yylval->ival = -1; return(INTEGER_CONSTANT); } -"OBJECT_NAME" { yylval->ival = 1; return(INTEGER_CONSTANT); } -"OBJECT_DESC" { yylval->ival = 2; return(INTEGER_CONSTANT); } -"OBJECT_POS" { yylval->ival = 3; return(INTEGER_CONSTANT); } -"OBJECT_ROT" { yylval->ival = 4; return(INTEGER_CONSTANT); } -"OBJECT_VELOCITY" { yylval->ival = 5; return(INTEGER_CONSTANT); } -"OBJECT_OWNER" { yylval->ival = 6; return(INTEGER_CONSTANT); } -"OBJECT_GROUP" { yylval->ival = 7; return(INTEGER_CONSTANT); } -"OBJECT_CREATOR" { yylval->ival = 8; 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); } -"DATA_SIM_RATING" { yylval->ival = 7; return(INTEGER_CONSTANT); } -"DATA_PAYINFO" { yylval->ival = 8; 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_FULLBRIGHT" { yylval->ival = LSL_PRIM_FULLBRIGHT; return(INTEGER_CONSTANT); } -"PRIM_FLEXIBLE" { yylval->ival = 21; return(INTEGER_CONSTANT); } -"PRIM_TEXGEN" { yylval->ival = 22; return(INTEGER_CONSTANT); } -"PRIM_POINT_LIGHT" { yylval->ival = 23; return(INTEGER_CONSTANT); } - -"PRIM_TEXGEN_DEFAULT" { yylval->ival = 0; return(INTEGER_CONSTANT); } -"PRIM_TEXGEN_PLANAR" { yylval->ival = 1; 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); } - -"PAY_HIDE" { yylval->ival = LSL_PAY_HIDE; return(INTEGER_CONSTANT); } -"PAY_DEFAULT" { yylval->ival = LSL_PAY_DEFAULT; return(INTEGER_CONSTANT); } - -"PARCEL_FLAG_ALLOW_FLY" { yylval->ival = 0x1; return(INTEGER_CONSTANT); } -"PARCEL_FLAG_ALLOW_SCRIPTS" { yylval->ival = 0x2; return(INTEGER_CONSTANT); } -"PARCEL_FLAG_ALLOW_LANDMARK" { yylval->ival = 0x8; return(INTEGER_CONSTANT); } -"PARCEL_FLAG_ALLOW_TERRAFORM" { yylval->ival = 0x10; return(INTEGER_CONSTANT); } -"PARCEL_FLAG_ALLOW_DAMAGE" { yylval->ival = 0x20; return(INTEGER_CONSTANT); } -"PARCEL_FLAG_ALLOW_CREATE_OBJECTS" { yylval->ival = 0x40; return(INTEGER_CONSTANT); } -"PARCEL_FLAG_USE_ACCESS_GROUP" { yylval->ival = 0x100; return(INTEGER_CONSTANT); } -"PARCEL_FLAG_USE_ACCESS_LIST" { yylval->ival = 0x200; return(INTEGER_CONSTANT); } -"PARCEL_FLAG_USE_BAN_LIST" { yylval->ival = 0x400; return(INTEGER_CONSTANT); } -"PARCEL_FLAG_USE_LAND_PASS_LIST" { yylval->ival = 0x800; return(INTEGER_CONSTANT); } -"PARCEL_FLAG_LOCAL_SOUND_ONLY" { yylval->ival = 0x8000; return(INTEGER_CONSTANT); } -"PARCEL_FLAG_RESTRICT_PUSHOBJECT" { yylval->ival = 0x200000; return(INTEGER_CONSTANT); } - -"PARCEL_COUNT_TOTAL" { yylval->ival = 0x0; return(INTEGER_CONSTANT); } -"PARCEL_COUNT_OWNER" { yylval->ival = 0x1; return(INTEGER_CONSTANT); } -"PARCEL_COUNT_GROUP" { yylval->ival = 0x2; return(INTEGER_CONSTANT); } -"PARCEL_COUNT_OTHER" { yylval->ival = 0x3; return(INTEGER_CONSTANT); } -"PARCEL_COUNT_SELECTED" { yylval->ival = 0x4; return(INTEGER_CONSTANT); } -"PARCEL_COUNT_TEMP" { yylval->ival = 0x5; return(INTEGER_CONSTANT); } - -"PARCEL_DETAILS_NAME" { yylval->ival = 0x0; return(INTEGER_CONSTANT); } -"PARCEL_DETAILS_DESC" { yylval->ival = 0x1; return(INTEGER_CONSTANT); } -"PARCEL_DETAILS_OWNER" { yylval->ival = 0x2; return(INTEGER_CONSTANT); } -"PARCEL_DETAILS_GROUP" { yylval->ival = 0x3; return(INTEGER_CONSTANT); } -"PARCEL_DETAILS_AREA" { yylval->ival = 0x4; return(INTEGER_CONSTANT); } - -"STRING_TRIM_HEAD" { yylval->ival = 0x01; return (INTEGER_CONSTANT); } -"STRING_TRIM_TAIL" { yylval->ival = 0x02; return (INTEGER_CONSTANT); } -"STRING_TRIM" { yylval->ival = 0x03; 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); }