From 1a67db64dcbef15fa978bd103334bcab91543673 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Thu, 9 Jul 2015 20:35:14 +0200 Subject: [PATCH] Get rid of builtins.txt.dat by adding a parameter to the parser ctor. --- builtins-unittest.txt | 16 + builtins.txt | 4 - builtins.txt.dat | 1160 ----------------------------------------- lslopt/lslparse.py | 28 +- testparser.py | 29 +- 5 files changed, 31 insertions(+), 1206 deletions(-) create mode 100644 builtins-unittest.txt delete mode 100644 builtins.txt.dat diff --git a/builtins-unittest.txt b/builtins-unittest.txt new file mode 100644 index 0000000..08e2394 --- /dev/null +++ b/builtins-unittest.txt @@ -0,0 +1,16 @@ +const key a="\t" +event ev(integer i) +event ev(integer i) +quaternion x(integer i) +void x(integer i) +blah +const vector a = <4,5,3,2> +const vector a = <4,5,3,2 +const vector a = +const vector a = <4,x,3> +const vector a = <3,4,x> +const rotation a = <3,4,4,x> +const list l = [] +const quaternion q=<1,2,3,4> +const string v=" +const string q="\t" diff --git a/builtins.txt b/builtins.txt index 91160d1..2c2859b 100644 --- a/builtins.txt +++ b/builtins.txt @@ -1,7 +1,3 @@ -// builtins.txt provides the data for the parser. -// builtins.txt.dat is a copy used only by the unit testing program -// testparser.py, and can be removed. - // Generated by LSL2 Derived Files Generator. Database version: 0.0.20150429000; output module version: 0.0.20140731000 integer llAbs( integer val ) float llAcos( float val ) diff --git a/builtins.txt.dat b/builtins.txt.dat deleted file mode 100644 index 91160d1..0000000 --- a/builtins.txt.dat +++ /dev/null @@ -1,1160 +0,0 @@ -// builtins.txt provides the data for the parser. -// builtins.txt.dat is a copy used only by the unit testing program -// testparser.py, and can be removed. - -// Generated by LSL2 Derived Files Generator. Database version: 0.0.20150429000; output module version: 0.0.20140731000 -integer llAbs( integer val ) -float llAcos( float val ) -void llAddToLandBanList( key avatar, float hours ) -void llAddToLandPassList( key avatar, float hours ) -void llAdjustSoundVolume( float volume ) -integer llAgentInExperience( key agent ) -void llAllowInventoryDrop( integer add ) -float llAngleBetween( rotation a, rotation b ) -void llApplyImpulse( vector force, integer local ) -void llApplyRotationalImpulse( vector force, integer local ) -float llAsin( float val ) -float llAtan2( float y, float x ) -void llAttachToAvatar( integer attach_point ) -void llAttachToAvatarTemp( integer attach_point ) -key llAvatarOnLinkSitTarget( integer link ) -key llAvatarOnSitTarget( ) -rotation llAxes2Rot( vector fwd, vector left, vector up ) -rotation llAxisAngle2Rot( vector axis, float angle ) -integer llBase64ToInteger( string str ) -string llBase64ToString( string str ) -void llBreakAllLinks( ) -void llBreakLink( integer linknum ) -list llCSV2List( string src ) -list llCastRay( vector start, vector end, list params ) -integer llCeil( float val ) -void llClearCameraParams( ) -void llClearExperiencePermissions( key agent ) -integer llClearLinkMedia( integer link, integer face ) -integer llClearPrimMedia( integer face ) -void llCloseRemoteDataChannel( key channel ) -float llCloud( vector offset ) -void llCollisionFilter( string name, key id, integer accept ) -void llCollisionSound( string impact_sound, float impact_volume ) -void llCollisionSprite( string impact_sprite ) -float llCos( float theta ) -void llCreateCharacter( list options ) -key llCreateKeyValue( key k, string v ) -void llCreateLink( key target, integer parent ) -key llDataSizeKeyValue( ) -void llDeleteCharacter( ) -key llDeleteKeyValue( key k ) -list llDeleteSubList( list src, integer start, integer end ) -string llDeleteSubString( string src, integer start, integer end ) -void llDetachFromAvatar( ) -vector llDetectedGrab( integer number ) -integer llDetectedGroup( integer number ) -key llDetectedKey( integer number ) -integer llDetectedLinkNumber( integer number ) -string llDetectedName( integer number ) -key llDetectedOwner( integer number ) -vector llDetectedPos( integer number ) -rotation llDetectedRot( integer number ) -vector llDetectedTouchBinormal( integer index ) -integer llDetectedTouchFace( integer index ) -vector llDetectedTouchNormal( integer index ) -vector llDetectedTouchPos( integer index ) -vector llDetectedTouchST( integer index ) -vector llDetectedTouchUV( integer index ) -integer llDetectedType( integer number ) -vector llDetectedVel( integer number ) -void llDialog( key avatar, string message, list buttons, integer chat_channel ) -void llDie( ) -string llDumpList2String( list src, string separator ) -integer llEdgeOfWorld( vector pos, vector dir ) -void llEjectFromLand( key avatar ) -void llEmail( string address, string subject, string message ) -string llEscapeURL( string url ) -rotation llEuler2Rot( vector v ) -void llEvade( key target, list options ) -void llExecCharacterCmd( integer cmd, list options ) -float llFabs( float val ) -void llFleeFrom( vector source, float radius, list options ) -integer llFloor( float val ) -void llForceMouselook( integer mouselook ) -float llFrand( float mag ) -key llGenerateKey( ) -vector llGetAccel( ) -integer llGetAgentInfo( key id ) -string llGetAgentLanguage( key avatar ) -list llGetAgentList( integer scope, list options ) -vector llGetAgentSize( key id ) -float llGetAlpha( integer face ) -float llGetAndResetTime( ) -string llGetAnimation( key id ) -list llGetAnimationList( key id ) -string llGetAnimationOverride( string anim_state ) -integer llGetAttached( ) -list llGetBoundingBox( key object ) -vector llGetCameraPos( ) -rotation llGetCameraRot( ) -vector llGetCenterOfMass( ) -list llGetClosestNavPoint( vector point, list options ) -vector llGetColor( integer face ) -key llGetCreator( ) -string llGetDate( ) -string llGetDisplayName( key id ) -float llGetEnergy( ) -string llGetEnv( string name ) -list llGetExperienceDetails( key experience_id ) -string llGetExperienceErrorMessage( integer value ) -list llGetExperienceList( key agent ) -vector llGetForce( ) -integer llGetFreeMemory( ) -integer llGetFreeURLs( ) -float llGetGMTclock( ) -vector llGetGeometricCenter( ) -string llGetHTTPHeader( key request_id, string header ) -key llGetInventoryCreator( string item ) -key llGetInventoryKey( string name ) -string llGetInventoryName( integer type, integer number ) -integer llGetInventoryNumber( integer type ) -integer llGetInventoryPermMask( string item, integer mask ) -integer llGetInventoryType( string name ) -key llGetKey( ) -key llGetLandOwnerAt( vector pos ) -key llGetLinkKey( integer linknumber ) -list llGetLinkMedia( integer link, integer face, list params ) -string llGetLinkName( integer linknumber ) -integer llGetLinkNumber( ) -integer llGetLinkNumberOfSides( integer link ) -list llGetLinkPrimitiveParams( integer linknumber, list rules ) -integer llGetListEntryType( list src, integer index ) -integer llGetListLength( list src ) -vector llGetLocalPos( ) -rotation llGetLocalRot( ) -float llGetMass( ) -float llGetMassMKS( ) -float llGetMaxScaleFactor( ) -integer llGetMemoryLimit( ) -float llGetMinScaleFactor( ) -void llGetNextEmail( string address, string subject ) -key llGetNotecardLine( string name, integer line ) -key llGetNumberOfNotecardLines( string name ) -integer llGetNumberOfPrims( ) -integer llGetNumberOfSides( ) -string llGetObjectDesc( ) -list llGetObjectDetails( key id, list params ) -float llGetObjectMass( key id ) -string llGetObjectName( ) -integer llGetObjectPermMask( integer mask ) -integer llGetObjectPrimCount( key object_id ) -vector llGetOmega( ) -key llGetOwner( ) -key llGetOwnerKey( key id ) -list llGetParcelDetails( vector pos, list params ) -integer llGetParcelFlags( vector pos ) -integer llGetParcelMaxPrims( vector pos, integer sim_wide ) -string llGetParcelMusicURL( ) -integer llGetParcelPrimCount( vector pos, integer category, integer sim_wide ) -list llGetParcelPrimOwners( vector pos ) -integer llGetPermissions( ) -key llGetPermissionsKey( ) -list llGetPhysicsMaterial( ) -vector llGetPos( ) -list llGetPrimMediaParams( integer face, list params ) -list llGetPrimitiveParams( list params ) -integer llGetRegionAgentCount( ) -vector llGetRegionCorner( ) -float llGetRegionFPS( ) -integer llGetRegionFlags( ) -string llGetRegionName( ) -float llGetRegionTimeDilation( ) -vector llGetRootPosition( ) -rotation llGetRootRotation( ) -rotation llGetRot( ) -integer llGetSPMaxMemory( ) -vector llGetScale( ) -string llGetScriptName( ) -integer llGetScriptState( string name ) -float llGetSimStats( integer stat_type ) -string llGetSimulatorHostname( ) -integer llGetStartParameter( ) -list llGetStaticPath( vector start, vector end, float radius, list params ) -integer llGetStatus( integer status ) -string llGetSubString( string src, integer start, integer end ) -vector llGetSunDirection( ) -string llGetTexture( integer face ) -vector llGetTextureOffset( integer face ) -float llGetTextureRot( integer side ) -vector llGetTextureScale( integer side ) -float llGetTime( ) -float llGetTimeOfDay( ) -string llGetTimestamp( ) -vector llGetTorque( ) -integer llGetUnixTime( ) -integer llGetUsedMemory( ) -string llGetUsername( key id ) -vector llGetVel( ) -float llGetWallclock( ) -void llGiveInventory( key destination, string inventory ) -void llGiveInventoryList( key target, string folder, list inventory ) -integer llGiveMoney( key destination, integer amount ) -void llGodLikeRezObject( key inventory, vector pos ) -float llGround( vector offset ) -vector llGroundContour( vector offset ) -vector llGroundNormal( vector offset ) -void llGroundRepel( float height, integer water, float tau ) -vector llGroundSlope( vector offset ) -key llHTTPRequest( string url, list parameters, string body ) -void llHTTPResponse( key request_id, integer status, string body ) -string llInsertString( string dst, integer position, string src ) -void llInstantMessage( key user, string message ) -string llIntegerToBase64( integer number ) -list llJson2List( string json ) -string llJsonGetValue( string json, list specifiers ) -string llJsonSetValue( string json, list specifiers, string value ) -string llJsonValueType( string json, list specifiers ) -string llKey2Name( key id ) -key llKeyCountKeyValue( ) -key llKeysKeyValue( integer start, integer count ) -void llLinkParticleSystem( integer linknumber, list rules ) -void llLinkSitTarget( integer link, vector offset, rotation rot ) -string llList2CSV( list src ) -float llList2Float( list src, integer index ) -integer llList2Integer( list src, integer index ) -string llList2Json( string type, list values ) -key llList2Key( list src, integer index ) -list llList2List( list src, integer start, integer end ) -list llList2ListStrided( list src, integer start, integer end, integer stride ) -rotation llList2Rot( list src, integer index ) -string llList2String( list src, integer index ) -vector llList2Vector( list src, integer index ) -integer llListFindList( list src, list test ) -list llListInsertList( list dest, list src, integer start ) -list llListRandomize( list src, integer stride ) -list llListReplaceList( list dest, list src, integer start, integer end ) -list llListSort( list src, integer stride, integer ascending ) -float llListStatistics( integer operation, list src ) -integer llListen( integer channel, string name, key id, string msg ) -void llListenControl( integer number, integer active ) -void llListenRemove( integer number ) -void llLoadURL( key avatar, string message, string url ) -float llLog( float val ) -float llLog10( float val ) -void llLookAt( vector target, float strength, float damping ) -void llLoopSound( string sound, float volume ) -void llLoopSoundMaster( string sound, float volume ) -void llLoopSoundSlave( string sound, float volume ) -string llMD5String( string src, integer nonce ) -void llMakeExplosion( integer particles, float scale, float vel, float lifetime, float arc, string texture, vector offset ) -void llMakeFire( integer particles, float scale, float vel, float lifetime, float arc, string texture, vector offset ) -void llMakeFountain( integer particles, float scale, float vel, float lifetime, float arc, integer bounce, string texture, vector offset, float bounce_offset ) -void llMakeSmoke( integer particles, float scale, float vel, float lifetime, float arc, string texture, vector offset ) -integer llManageEstateAccess( integer action, key id ) -void llMapDestination( string simname, vector pos, vector look_at ) -void llMessageLinked( integer linknum, integer num, string str, key id ) -void llMinEventDelay( float delay ) -integer llModPow( integer a, integer b, integer c ) -void llModifyLand( integer action, integer brush ) -void llMoveToTarget( vector target, float tau ) -void llNavigateTo( vector point, list options ) -void llOffsetTexture( float u, float v, integer face ) -void llOpenRemoteDataChannel( ) -integer llOverMyLand( key id ) -void llOwnerSay( string msg ) -void llParcelMediaCommandList( list command ) -list llParcelMediaQuery( list query ) -list llParseString2List( string src, list separators, list spacers ) -list llParseStringKeepNulls( string src, list separators, list spacers ) -void llParticleSystem( list rules ) -void llPassCollisions( integer pass ) -void llPassTouches( integer pass ) -void llPatrolPoints( list points, list options ) -void llPlaySound( string sound, float volume ) -void llPlaySoundSlave( string sound, float volume ) -void llPointAt( vector pos ) -float llPow( float base, float exponent ) -void llPreloadSound( string sound ) -void llPursue( key target, list options ) -void llPushObject( key id, vector impulse, vector ang_impulse, integer local ) -key llReadKeyValue( key k ) -void llRefreshPrimURL( ) -void llRegionSay( integer channel, string msg ) -void llRegionSayTo( key target, integer channel, string msg ) -void llReleaseCamera( key avatar ) -void llReleaseControls( ) -void llReleaseURL( string url ) -void llRemoteDataReply( key channel, key message_id, string sdata, integer idata ) -void llRemoteDataSetRegion( ) -void llRemoteLoadScript( key target, string name, integer running, integer start_param ) -void llRemoteLoadScriptPin( key target, string name, integer pin, integer running, integer start_param ) -void llRemoveFromLandBanList( key avatar ) -void llRemoveFromLandPassList( key avatar ) -void llRemoveInventory( string item ) -void llRemoveVehicleFlags( integer flags ) -key llRequestAgentData( key id, integer data ) -key llRequestDisplayName( key id ) -void llRequestExperiencePermissions( key agent, string name ) -key llRequestInventoryData( string name ) -void llRequestPermissions( key agent, integer perm ) -key llRequestSecureURL( ) -key llRequestSimulatorData( string simulator, integer data ) -key llRequestURL( ) -key llRequestUsername( key id ) -void llResetAnimationOverride( string anim_state ) -void llResetLandBanList( ) -void llResetLandPassList( ) -void llResetOtherScript( string name ) -void llResetScript( ) -void llResetTime( ) -integer llReturnObjectsByID( list objects ) -integer llReturnObjectsByOwner( key owner, integer scope ) -void llRezAtRoot( string inventory, vector pos, vector vel, rotation rot, integer param ) -void llRezObject( string inventory, vector pos, vector vel, rotation rot, integer param ) -float llRot2Angle( rotation rot ) -vector llRot2Axis( rotation rot ) -vector llRot2Euler( rotation q ) -vector llRot2Fwd( rotation q ) -vector llRot2Left( rotation q ) -vector llRot2Up( rotation q ) -rotation llRotBetween( vector v1, vector v2 ) -void llRotLookAt( rotation target, float strength, float damping ) -integer llRotTarget( rotation rot, float error ) -void llRotTargetRemove( integer number ) -void llRotateTexture( float angle, integer face ) -integer llRound( float val ) -string llSHA1String( string src ) -integer llSameGroup( key id ) -void llSay( integer channel, string msg ) -integer llScaleByFactor( float scaling_factor ) -void llScaleTexture( float u, float v, integer face ) -integer llScriptDanger( vector pos ) -void llScriptProfiler( integer flags ) -key llSendRemoteData( key channel, string dest, integer idata, string sdata ) -void llSensor( string name, key id, integer type, float range, float arc ) -void llSensorRemove( ) -void llSensorRepeat( string name, key id, integer type, float range, float arc, float rate ) -void llSetAlpha( float alpha, integer face ) -void llSetAngularVelocity( vector angular_velocity, integer local ) -void llSetAnimationOverride( string anim_state, string anim ) -void llSetBuoyancy( float buoyancy ) -void llSetCameraAtOffset( vector offset ) -void llSetCameraEyeOffset( vector offset ) -void llSetCameraParams( list rules ) -void llSetClickAction( integer action ) -void llSetColor( vector color, integer face ) -void llSetContentType( key request_id, integer content_type ) -void llSetDamage( float damage ) -void llSetForce( vector force, integer local ) -void llSetForceAndTorque( vector force, vector torque, integer local ) -void llSetHoverHeight( float height, integer water, float tau ) -void llSetInventoryPermMask( string item, integer mask, integer value ) -void llSetKeyframedMotion( list keyframes, list options ) -void llSetLinkAlpha( integer linknumber, float alpha, integer face ) -void llSetLinkCamera( integer link, vector eye, vector at ) -void llSetLinkColor( integer linknumber, vector color, integer face ) -integer llSetLinkMedia( integer link, integer face, list params ) -void llSetLinkPrimitiveParams( integer linknumber, list rules ) -void llSetLinkPrimitiveParamsFast( integer linknumber, list rules ) -void llSetLinkTexture( integer linknumber, string texture, integer face ) -void llSetLinkTextureAnim( integer link, integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate ) -void llSetLocalRot( rotation rot ) -integer llSetMemoryLimit( integer limit ) -void llSetObjectDesc( string desc ) -void llSetObjectName( string name ) -void llSetObjectPermMask( integer mask, integer value ) -void llSetParcelMusicURL( string url ) -void llSetPayPrice( integer price, list quick_pay_buttons ) -void llSetPhysicsMaterial( integer flags, float gravity_multiplier, float restitution, float friction, float density ) -void llSetPos( vector pos ) -integer llSetPrimMediaParams( integer face, list params ) -void llSetPrimURL( string url ) -void llSetPrimitiveParams( list rules ) -integer llSetRegionPos( vector pos ) -void llSetRemoteScriptAccessPin( integer pin ) -void llSetRot( rotation rot ) -void llSetScale( vector scale ) -void llSetScriptState( string name, integer run ) -void llSetSitText( string text ) -void llSetSoundQueueing( integer queue ) -void llSetSoundRadius( float radius ) -void llSetStatus( integer status, integer value ) -void llSetText( string text, vector color, float alpha ) -void llSetTexture( string texture, integer face ) -void llSetTextureAnim( integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate ) -void llSetTimerEvent( float sec ) -void llSetTorque( vector torque, integer local ) -void llSetTouchText( string text ) -void llSetVehicleFlags( integer flags ) -void llSetVehicleFloatParam( integer param, float value ) -void llSetVehicleRotationParam( integer param, rotation rot ) -void llSetVehicleType( integer type ) -void llSetVehicleVectorParam( integer param, vector vec ) -void llSetVelocity( vector velocity, integer local ) -void llShout( integer channel, string msg ) -float llSin( float theta ) -void llSitTarget( vector offset, rotation rot ) -void llSleep( float sec ) -void llSound( string sound, float volume, integer queue, integer loop ) -void llSoundPreload( string sound ) -float llSqrt( float val ) -void llStartAnimation( string anim ) -void llStopAnimation( string anim ) -void llStopHover( ) -void llStopLookAt( ) -void llStopMoveToTarget( ) -void llStopPointAt( ) -void llStopSound( ) -integer llStringLength( string str ) -string llStringToBase64( string str ) -string llStringTrim( string src, integer trim_type ) -integer llSubStringIndex( string source, string pattern ) -void llTakeCamera( key avatar ) -void llTakeControls( integer controls, integer accept, integer pass_on ) -float llTan( float theta ) -integer llTarget( vector position, float range ) -void llTargetOmega( vector axis, float spinrate, float gain ) -void llTargetRemove( integer number ) -void llTeleportAgent( key avatar, string landmark, vector position, vector look_at ) -void llTeleportAgentGlobalCoords( key agent, vector global_coordinates, vector region_coordinates, vector look_at ) -void llTeleportAgentHome( key id ) -void llTextBox( key avatar, string message, integer chat_channel ) -string llToLower( string src ) -string llToUpper( string src ) -key llTransferLindenDollars( key destination, integer amount ) -void llTriggerSound( string sound, float volume ) -void llTriggerSoundLimited( string sound, float volume, vector top_north_east, vector bottom_south_west ) -void llUnSit( key id ) -string llUnescapeURL( string url ) -void llUpdateCharacter( list options ) -key llUpdateKeyValue( key k, string v, integer checked, string original_value ) -float llVecDist( vector v1, vector v2 ) -float llVecMag( vector v ) -vector llVecNorm( vector v ) -void llVolumeDetect( integer detect ) -void llWanderWithin( vector center, vector radius, list options ) -float llWater( vector offset ) -void llWhisper( integer channel, string msg ) -vector llWind( vector offset ) -string llXorBase64( string str1, string str2 ) -string llXorBase64Strings( string str1, string str2 ) -string llXorBase64StringsCorrect( string str1, string str2 ) -const integer ACTIVE = 0x2 -const integer AGENT = 0x1 -const integer AGENT_ALWAYS_RUN = 0x1000 -const integer AGENT_ATTACHMENTS = 0x2 -const integer AGENT_AUTOPILOT = 0x2000 -const integer AGENT_AWAY = 0x40 -const integer AGENT_BUSY = 0x800 -const integer AGENT_BY_LEGACY_NAME = 0x1 -const integer AGENT_BY_USERNAME = 0x10 -const integer AGENT_CROUCHING = 0x400 -const integer AGENT_FLYING = 0x1 -const integer AGENT_IN_AIR = 0x100 -const integer AGENT_LIST_PARCEL = 1 -const integer AGENT_LIST_PARCEL_OWNER = 2 -const integer AGENT_LIST_REGION = 4 -const integer AGENT_MOUSELOOK = 0x8 -const integer AGENT_ON_OBJECT = 0x20 -const integer AGENT_SCRIPTED = 0x4 -const integer AGENT_SITTING = 0x10 -const integer AGENT_TYPING = 0x200 -const integer AGENT_WALKING = 0x80 -const integer ALL_SIDES = -1 -const integer ANIM_ON = 0x1 -const integer ATTACH_AVATAR_CENTER = 40 -const integer ATTACH_BACK = 9 -const integer ATTACH_BELLY = 28 -const integer ATTACH_CHEST = 1 -const integer ATTACH_CHIN = 12 -const integer ATTACH_HEAD = 2 -const integer ATTACH_HUD_BOTTOM = 37 -const integer ATTACH_HUD_BOTTOM_LEFT = 36 -const integer ATTACH_HUD_BOTTOM_RIGHT = 38 -const integer ATTACH_HUD_CENTER_1 = 35 -const integer ATTACH_HUD_CENTER_2 = 31 -const integer ATTACH_HUD_TOP_CENTER = 33 -const integer ATTACH_HUD_TOP_LEFT = 34 -const integer ATTACH_HUD_TOP_RIGHT = 32 -const integer ATTACH_LEAR = 13 -const integer ATTACH_LEFT_PEC = 29 -const integer ATTACH_LEYE = 15 -const integer ATTACH_LFOOT = 7 -const integer ATTACH_LHAND = 5 -const integer ATTACH_LHIP = 25 -const integer ATTACH_LLARM = 21 -const integer ATTACH_LLLEG = 27 -const integer ATTACH_LPEC = 30 -const integer ATTACH_LSHOULDER = 3 -const integer ATTACH_LUARM = 20 -const integer ATTACH_LULEG = 26 -const integer ATTACH_MOUTH = 11 -const integer ATTACH_NECK = 39 -const integer ATTACH_NOSE = 17 -const integer ATTACH_PELVIS = 10 -const integer ATTACH_REAR = 14 -const integer ATTACH_REYE = 16 -const integer ATTACH_RFOOT = 8 -const integer ATTACH_RHAND = 6 -const integer ATTACH_RHIP = 22 -const integer ATTACH_RIGHT_PEC = 30 -const integer ATTACH_RLARM = 19 -const integer ATTACH_RLLEG = 24 -const integer ATTACH_RPEC = 29 -const integer ATTACH_RSHOULDER = 4 -const integer ATTACH_RUARM = 18 -const integer ATTACH_RULEG = 23 -const integer AVOID_CHARACTERS = 1 -const integer AVOID_DYNAMIC_OBSTACLES = 2 -const integer AVOID_NONE = 0 -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 CHANGED_ALLOWED_DROP = 0x40 -const integer CHANGED_COLOR = 0x2 -const integer CHANGED_INVENTORY = 0x1 -const integer CHANGED_LINK = 0x20 -const integer CHANGED_MEDIA = 0x800 -const integer CHANGED_OWNER = 0x80 -const integer CHANGED_REGION = 0x100 -const integer CHANGED_REGION_START = 0x400 -const integer CHANGED_SCALE = 0x8 -const integer CHANGED_SHAPE = 0x4 -const integer CHANGED_TELEPORT = 0x200 -const integer CHANGED_TEXTURE = 0x10 -const integer CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES = 14 -const integer CHARACTER_AVOIDANCE_MODE = 5 -const integer CHARACTER_CMD_JUMP = 1 -const integer CHARACTER_CMD_SMOOTH_STOP = 2 -const integer CHARACTER_CMD_STOP = 0 -const integer CHARACTER_DESIRED_SPEED = 1 -const integer CHARACTER_DESIRED_TURN_SPEED = 12 -const integer CHARACTER_LENGTH = 3 -const integer CHARACTER_MAX_ACCEL = 8 -const integer CHARACTER_MAX_DECEL = 9 -const integer CHARACTER_MAX_SPEED = 13 -const integer CHARACTER_MAX_TURN_RADIUS = 10 -const integer CHARACTER_ORIENTATION = 4 -const integer CHARACTER_RADIUS = 2 -const integer CHARACTER_STAY_WITHIN_PARCEL = 15 -const integer CHARACTER_TYPE = 6 -const integer CHARACTER_TYPE_A = 0 -const integer CHARACTER_TYPE_B = 1 -const integer CHARACTER_TYPE_C = 2 -const integer CHARACTER_TYPE_D = 3 -const integer CHARACTER_TYPE_NONE = 4 -const integer CLICK_ACTION_BUY = 2 -const integer CLICK_ACTION_NONE = 0 -const integer CLICK_ACTION_OPEN = 4 -const integer CLICK_ACTION_OPEN_MEDIA = 6 -const integer CLICK_ACTION_PAY = 3 -const integer CLICK_ACTION_PLAY = 5 -const integer CLICK_ACTION_SIT = 1 -const integer CLICK_ACTION_TOUCH = 0 -const integer CONTENT_TYPE_ATOM = 4 -const integer CONTENT_TYPE_FORM = 7 -const integer CONTENT_TYPE_HTML = 1 -const integer CONTENT_TYPE_JSON = 5 -const integer CONTENT_TYPE_LLSD = 6 -const integer CONTENT_TYPE_RSS = 8 -const integer CONTENT_TYPE_TEXT = 0 -const integer CONTENT_TYPE_XHTML = 3 -const integer CONTENT_TYPE_XML = 2 -const integer CONTROL_BACK = 0x2 -const integer CONTROL_DOWN = 0x20 -const integer CONTROL_FWD = 0x1 -const integer CONTROL_LBUTTON = 0x10000000 -const integer CONTROL_LEFT = 0x4 -const integer CONTROL_ML_LBUTTON = 0x40000000 -const integer CONTROL_RIGHT = 0x8 -const integer CONTROL_ROT_LEFT = 0x100 -const integer CONTROL_ROT_RIGHT = 0x200 -const integer CONTROL_UP = 0x10 -const integer DATA_BORN = 3 -const integer DATA_NAME = 2 -const integer DATA_ONLINE = 1 -const integer DATA_PAYINFO = 8 -const integer DATA_RATING = 4 -const integer DATA_SIM_POS = 5 -const integer DATA_SIM_RATING = 7 -const integer DATA_SIM_STATUS = 6 -const integer DEBUG_CHANNEL = 0x7FFFFFFF -const float DEG_TO_RAD = 0.017453292 -const integer DENSITY = 0x1 -const string EOF = "\n\n\n" -const integer ERR_GENERIC = -1 -const integer ERR_MALFORMED_PARAMS = -3 -const integer ERR_PARCEL_PERMISSIONS = -2 -const integer ERR_RUNTIME_PERMISSIONS = -4 -const integer ERR_THROTTLED = -5 -const integer ESTATE_ACCESS_ALLOWED_AGENT_ADD = 0x4 -const integer ESTATE_ACCESS_ALLOWED_AGENT_REMOVE = 0x8 -const integer ESTATE_ACCESS_ALLOWED_GROUP_ADD = 0x10 -const integer ESTATE_ACCESS_ALLOWED_GROUP_REMOVE = 0x20 -const integer ESTATE_ACCESS_BANNED_AGENT_ADD = 0x40 -const integer ESTATE_ACCESS_BANNED_AGENT_REMOVE = 0x80 -const integer FALSE = 0 -const integer FORCE_DIRECT_PATH = 1 -const integer FRICTION = 0x2 -const integer GCNP_RADIUS = 0 -const integer GCNP_STATIC = 1 -const integer GRAVITY_MULTIPLIER = 0x8 -const integer HORIZONTAL = 1 -const integer HTTP_BODY_MAXLENGTH = 2 -const integer HTTP_BODY_TRUNCATED = 0 -const integer HTTP_CUSTOM_HEADER = 5 -const integer HTTP_METHOD = 0 -const integer HTTP_MIMETYPE = 1 -const integer HTTP_PRAGMA_NO_CACHE = 6 -const integer HTTP_VERBOSE_THROTTLE = 4 -const integer HTTP_VERIFY_CERT = 3 -const integer INVENTORY_ALL = -1 -const integer INVENTORY_ANIMATION = 20 -const integer INVENTORY_BODYPART = 13 -const integer INVENTORY_CLOTHING = 5 -const integer INVENTORY_GESTURE = 21 -const integer INVENTORY_LANDMARK = 3 -const integer INVENTORY_NONE = -1 -const integer INVENTORY_NOTECARD = 7 -const integer INVENTORY_OBJECT = 6 -const integer INVENTORY_SCRIPT = 10 -const integer INVENTORY_SOUND = 1 -const integer INVENTORY_TEXTURE = 0 -const integer JSON_APPEND = -1 -const string JSON_ARRAY = "﷒" -const string JSON_DELETE = "﷘" -const string JSON_FALSE = "﷗" -const string JSON_INVALID = "﷐" -const string JSON_NULL = "﷕" -const string JSON_NUMBER = "﷓" -const string JSON_OBJECT = "﷑" -const string JSON_STRING = "﷔" -const string JSON_TRUE = "﷖" -const integer KFM_CMD_PAUSE = 2 -const integer KFM_CMD_PLAY = 0 -const integer KFM_CMD_SET_MODE = 3 -const integer KFM_CMD_STOP = 1 -const integer KFM_COMMAND = 0 -const integer KFM_DATA = 2 -const integer KFM_FORWARD = 0 -const integer KFM_LOOP = 1 -const integer KFM_MODE = 1 -const integer KFM_PING_PONG = 2 -const integer KFM_REVERSE = 3 -const integer KFM_ROTATION = 1 -const integer KFM_TRANSLATION = 2 -const integer LAND_LARGE_BRUSH = 3 -const integer LAND_LEVEL = 0 -const integer LAND_LOWER = 2 -const integer LAND_MEDIUM_BRUSH = 2 -const integer LAND_NOISE = 4 -const integer LAND_RAISE = 1 -const integer LAND_REVERT = 5 -const integer LAND_SMALL_BRUSH = 1 -const integer LAND_SMOOTH = 3 -const integer LINK_ALL_CHILDREN = -3 -const integer LINK_ALL_OTHERS = -2 -const integer LINK_ROOT = 1 -const integer LINK_SET = -1 -const integer LINK_THIS = -4 -const integer LIST_STAT_GEOMETRIC_MEAN = 9 -const integer LIST_STAT_MAX = 2 -const integer LIST_STAT_MEAN = 3 -const integer LIST_STAT_MEDIAN = 4 -const integer LIST_STAT_MIN = 1 -const integer LIST_STAT_NUM_COUNT = 8 -const integer LIST_STAT_RANGE = 0 -const integer LIST_STAT_STD_DEV = 5 -const integer LIST_STAT_SUM = 6 -const integer LIST_STAT_SUM_SQUARES = 7 -const integer LOOP = 0x2 -const integer MASK_BASE = 0 -const integer MASK_EVERYONE = 3 -const integer MASK_GROUP = 2 -const integer MASK_NEXT = 4 -const integer MASK_OWNER = 1 -const string NULL_KEY = "00000000-0000-0000-0000-000000000000" -const integer OBJECT_ATTACHED_POINT = 19 -const integer OBJECT_BODY_SHAPE_TYPE = 26 -const integer OBJECT_CHARACTER_TIME = 17 -const integer OBJECT_CREATOR = 8 -const integer OBJECT_DESC = 2 -const integer OBJECT_GROUP = 7 -const integer OBJECT_HOVER_HEIGHT = 25 -const integer OBJECT_LAST_OWNER_ID = 27 -const integer OBJECT_NAME = 1 -const integer OBJECT_OWNER = 6 -const integer OBJECT_PATHFINDING_TYPE = 20 -const integer OBJECT_PHANTOM = 22 -const integer OBJECT_PHYSICS = 21 -const integer OBJECT_PHYSICS_COST = 16 -const integer OBJECT_POS = 3 -const integer OBJECT_PRIM_EQUIVALENCE = 13 -const integer OBJECT_RENDER_WEIGHT = 24 -const integer OBJECT_RETURN_PARCEL = 0x1 -const integer OBJECT_RETURN_PARCEL_OWNER = 0x2 -const integer OBJECT_RETURN_REGION = 0x4 -const integer OBJECT_ROOT = 18 -const integer OBJECT_ROT = 4 -const integer OBJECT_RUNNING_SCRIPT_COUNT = 9 -const integer OBJECT_SCRIPT_MEMORY = 11 -const integer OBJECT_SCRIPT_TIME = 12 -const integer OBJECT_SERVER_COST = 14 -const integer OBJECT_STREAMING_COST = 15 -const integer OBJECT_TEMP_ON_REZ = 23 -const integer OBJECT_TOTAL_SCRIPT_COUNT = 10 -const integer OBJECT_UNKNOWN_DETAIL = -1 -const integer OBJECT_VELOCITY = 5 -const integer OPT_AVATAR = 1 -const integer OPT_CHARACTER = 2 -const integer OPT_EXCLUSION_VOLUME = 6 -const integer OPT_LEGACY_LINKSET = 0 -const integer OPT_MATERIAL_VOLUME = 5 -const integer OPT_OTHER = -1 -const integer OPT_STATIC_OBSTACLE = 4 -const integer OPT_WALKABLE = 3 -const integer PARCEL_COUNT_GROUP = 2 -const integer PARCEL_COUNT_OTHER = 3 -const integer PARCEL_COUNT_OWNER = 1 -const integer PARCEL_COUNT_SELECTED = 4 -const integer PARCEL_COUNT_TEMP = 5 -const integer PARCEL_COUNT_TOTAL = 0 -const integer PARCEL_DETAILS_AREA = 4 -const integer PARCEL_DETAILS_DESC = 1 -const integer PARCEL_DETAILS_GROUP = 3 -const integer PARCEL_DETAILS_ID = 5 -const integer PARCEL_DETAILS_NAME = 0 -const integer PARCEL_DETAILS_OWNER = 2 -const integer PARCEL_DETAILS_SEE_AVATARS = 6 -const integer PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY = 0x08000000 -const integer PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS = 0x04000000 -const integer PARCEL_FLAG_ALLOW_CREATE_OBJECTS = 0x00000040 -const integer PARCEL_FLAG_ALLOW_DAMAGE = 0x00000020 -const integer PARCEL_FLAG_ALLOW_FLY = 0x00000001 -const integer PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY = 0x10000000 -const integer PARCEL_FLAG_ALLOW_GROUP_SCRIPTS = 0x02000000 -const integer PARCEL_FLAG_ALLOW_LANDMARK = 0x00000008 -const integer PARCEL_FLAG_ALLOW_SCRIPTS = 0x00000002 -const integer PARCEL_FLAG_ALLOW_TERRAFORM = 0x00000010 -const integer PARCEL_FLAG_LOCAL_SOUND_ONLY = 0x00008000 -const integer PARCEL_FLAG_RESTRICT_PUSHOBJECT = 0x00200000 -const integer PARCEL_FLAG_USE_ACCESS_GROUP = 0x00000100 -const integer PARCEL_FLAG_USE_ACCESS_LIST = 0x00000200 -const integer PARCEL_FLAG_USE_BAN_LIST = 0x00000400 -const integer PARCEL_FLAG_USE_LAND_PASS_LIST = 0x00000800 -const integer PARCEL_MEDIA_COMMAND_AGENT = 7 -const integer PARCEL_MEDIA_COMMAND_AUTO_ALIGN = 9 -const integer PARCEL_MEDIA_COMMAND_DESC = 12 -const integer PARCEL_MEDIA_COMMAND_LOOP = 3 -const integer PARCEL_MEDIA_COMMAND_LOOP_SET = 13 -const integer PARCEL_MEDIA_COMMAND_PAUSE = 1 -const integer PARCEL_MEDIA_COMMAND_PLAY = 2 -const integer PARCEL_MEDIA_COMMAND_SIZE = 11 -const integer PARCEL_MEDIA_COMMAND_STOP = 0 -const integer PARCEL_MEDIA_COMMAND_TEXTURE = 4 -const integer PARCEL_MEDIA_COMMAND_TIME = 6 -const integer PARCEL_MEDIA_COMMAND_TYPE = 10 -const integer PARCEL_MEDIA_COMMAND_UNLOAD = 8 -const integer PARCEL_MEDIA_COMMAND_URL = 5 -const integer PASSIVE = 0x4 -const integer PATROL_PAUSE_AT_WAYPOINTS = 0 -const integer PAYMENT_INFO_ON_FILE = 0x1 -const integer PAYMENT_INFO_USED = 0x2 -const integer PAY_DEFAULT = -2 -const integer PAY_HIDE = -1 -const integer PERMISSION_ATTACH = 0x20 -const integer PERMISSION_CHANGE_JOINTS = 0x100 -const integer PERMISSION_CHANGE_LINKS = 0x80 -const integer PERMISSION_CHANGE_PERMISSIONS = 0x200 -const integer PERMISSION_CONTROL_CAMERA = 0x800 -const integer PERMISSION_DEBIT = 0x2 -const integer PERMISSION_OVERRIDE_ANIMATIONS = 0x8000 -const integer PERMISSION_RELEASE_OWNERSHIP = 0x40 -const integer PERMISSION_REMAP_CONTROLS = 0x8 -const integer PERMISSION_RETURN_OBJECTS = 0x10000 -const integer PERMISSION_SILENT_ESTATE_MANAGEMENT = 0x4000 -const integer PERMISSION_TAKE_CONTROLS = 0x4 -const integer PERMISSION_TELEPORT = 0x1000 -const integer PERMISSION_TRACK_CAMERA = 0x400 -const integer PERMISSION_TRIGGER_ANIMATION = 0x10 -const integer PERM_ALL = 0x7FFFFFFF -const integer PERM_COPY = 0x00008000 -const integer PERM_MODIFY = 0x00004000 -const integer PERM_MOVE = 0x00080000 -const integer PERM_TRANSFER = 0x00002000 -const float PI = 3.14159265 -const integer PING_PONG = 0x8 -const float PI_BY_TWO = 1.57079632 -const integer PRIM_ALPHA_MODE = 38 -const integer PRIM_ALPHA_MODE_BLEND = 1 -const integer PRIM_ALPHA_MODE_EMISSIVE = 3 -const integer PRIM_ALPHA_MODE_MASK = 2 -const integer PRIM_ALPHA_MODE_NONE = 0 -const integer PRIM_BUMP_BARK = 4 -const integer PRIM_BUMP_BLOBS = 12 -const integer PRIM_BUMP_BRICKS = 5 -const integer PRIM_BUMP_BRIGHT = 1 -const integer PRIM_BUMP_CHECKER = 6 -const integer PRIM_BUMP_CONCRETE = 7 -const integer PRIM_BUMP_DARK = 2 -const integer PRIM_BUMP_DISKS = 10 -const integer PRIM_BUMP_GRAVEL = 11 -const integer PRIM_BUMP_LARGETILE = 14 -const integer PRIM_BUMP_NONE = 0 -const integer PRIM_BUMP_SHINY = 19 -const integer PRIM_BUMP_SIDING = 13 -const integer PRIM_BUMP_STONE = 9 -const integer PRIM_BUMP_STUCCO = 15 -const integer PRIM_BUMP_SUCTION = 16 -const integer PRIM_BUMP_TILE = 8 -const integer PRIM_BUMP_WEAVE = 17 -const integer PRIM_BUMP_WOOD = 3 -const integer PRIM_CAST_SHADOWS = 24 -const integer PRIM_COLOR = 18 -const integer PRIM_DESC = 28 -const integer PRIM_FLEXIBLE = 21 -const integer PRIM_FULLBRIGHT = 20 -const integer PRIM_GLOW = 25 -const integer PRIM_HOLE_CIRCLE = 0x10 -const integer PRIM_HOLE_DEFAULT = 0x0 -const integer PRIM_HOLE_SQUARE = 0x20 -const integer PRIM_HOLE_TRIANGLE = 0x30 -const integer PRIM_LINK_TARGET = 34 -const integer PRIM_MATERIAL = 2 -const integer PRIM_MATERIAL_FLESH = 4 -const integer PRIM_MATERIAL_GLASS = 2 -const integer PRIM_MATERIAL_LIGHT = 7 -const integer PRIM_MATERIAL_METAL = 1 -const integer PRIM_MATERIAL_PLASTIC = 5 -const integer PRIM_MATERIAL_RUBBER = 6 -const integer PRIM_MATERIAL_STONE = 0 -const integer PRIM_MATERIAL_WOOD = 3 -const integer PRIM_MEDIA_ALT_IMAGE_ENABLE = 0 -const integer PRIM_MEDIA_AUTO_LOOP = 4 -const integer PRIM_MEDIA_AUTO_PLAY = 5 -const integer PRIM_MEDIA_AUTO_SCALE = 6 -const integer PRIM_MEDIA_AUTO_ZOOM = 7 -const integer PRIM_MEDIA_CONTROLS = 1 -const integer PRIM_MEDIA_CONTROLS_MINI = 1 -const integer PRIM_MEDIA_CONTROLS_STANDARD = 0 -const integer PRIM_MEDIA_CURRENT_URL = 2 -const integer PRIM_MEDIA_FIRST_CLICK_INTERACT = 8 -const integer PRIM_MEDIA_HEIGHT_PIXELS = 10 -const integer PRIM_MEDIA_HOME_URL = 3 -const integer PRIM_MEDIA_MAX_HEIGHT_PIXELS = 2048 -const integer PRIM_MEDIA_MAX_URL_LENGTH = 1024 -const integer PRIM_MEDIA_MAX_WHITELIST_COUNT = 64 -const integer PRIM_MEDIA_MAX_WHITELIST_SIZE = 1024 -const integer PRIM_MEDIA_MAX_WIDTH_PIXELS = 2048 -const integer PRIM_MEDIA_PARAM_MAX = 14 -const integer PRIM_MEDIA_PERMS_CONTROL = 14 -const integer PRIM_MEDIA_PERMS_INTERACT = 13 -const integer PRIM_MEDIA_PERM_ANYONE = 0x4 -const integer PRIM_MEDIA_PERM_GROUP = 0x2 -const integer PRIM_MEDIA_PERM_NONE = 0x0 -const integer PRIM_MEDIA_PERM_OWNER = 0x1 -const integer PRIM_MEDIA_WHITELIST = 12 -const integer PRIM_MEDIA_WHITELIST_ENABLE = 11 -const integer PRIM_MEDIA_WIDTH_PIXELS = 9 -const integer PRIM_NAME = 27 -const integer PRIM_NORMAL = 37 -const integer PRIM_OMEGA = 32 -const integer PRIM_PHANTOM = 5 -const integer PRIM_PHYSICS = 3 -const integer PRIM_PHYSICS_SHAPE_CONVEX = 2 -const integer PRIM_PHYSICS_SHAPE_NONE = 1 -const integer PRIM_PHYSICS_SHAPE_PRIM = 0 -const integer PRIM_PHYSICS_SHAPE_TYPE = 30 -const integer PRIM_POINT_LIGHT = 23 -const integer PRIM_POSITION = 6 -const integer PRIM_POS_LOCAL = 33 -const integer PRIM_ROTATION = 8 -const integer PRIM_ROT_LOCAL = 29 -const integer PRIM_SCULPT_FLAG_INVERT = 0x40 -const integer PRIM_SCULPT_FLAG_MIRROR = 0x80 -const integer PRIM_SCULPT_TYPE_CYLINDER = 4 -const integer PRIM_SCULPT_TYPE_MASK = 7 -const integer PRIM_SCULPT_TYPE_PLANE = 3 -const integer PRIM_SCULPT_TYPE_SPHERE = 1 -const integer PRIM_SCULPT_TYPE_TORUS = 2 -const integer PRIM_SHINY_HIGH = 3 -const integer PRIM_SHINY_LOW = 1 -const integer PRIM_SHINY_MEDIUM = 2 -const integer PRIM_SHINY_NONE = 0 -const integer PRIM_SIZE = 7 -const integer PRIM_SLICE = 35 -const integer PRIM_SPECULAR = 36 -const integer PRIM_TEMP_ON_REZ = 4 -const integer PRIM_TEXGEN = 22 -const integer PRIM_TEXGEN_DEFAULT = 0 -const integer PRIM_TEXGEN_PLANAR = 1 -const integer PRIM_TEXT = 26 -const integer PRIM_TEXTURE = 17 -const integer PRIM_TYPE = 9 -const integer PRIM_TYPE_BOX = 0 -const integer PRIM_TYPE_CYLINDER = 1 -const integer PRIM_TYPE_PRISM = 2 -const integer PRIM_TYPE_RING = 6 -const integer PRIM_TYPE_SCULPT = 7 -const integer PRIM_TYPE_SPHERE = 3 -const integer PRIM_TYPE_TORUS = 4 -const integer PRIM_TYPE_TUBE = 5 -const integer PROFILE_NONE = 0 -const integer PROFILE_SCRIPT_MEMORY = 1 -const integer PSYS_PART_BF_DEST_COLOR = 2 -const integer PSYS_PART_BF_ONE = 0 -const integer PSYS_PART_BF_ONE_MINUS_DEST_COLOR = 4 -const integer PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA = 9 -const integer PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR = 5 -const integer PSYS_PART_BF_SOURCE_ALPHA = 7 -const integer PSYS_PART_BF_SOURCE_COLOR = 3 -const integer PSYS_PART_BF_ZERO = 1 -const integer PSYS_PART_BLEND_FUNC_DEST = 25 -const integer PSYS_PART_BLEND_FUNC_SOURCE = 24 -const integer PSYS_PART_BOUNCE_MASK = 0x4 -const integer PSYS_PART_EMISSIVE_MASK = 0x100 -const integer PSYS_PART_END_ALPHA = 4 -const integer PSYS_PART_END_COLOR = 3 -const integer PSYS_PART_END_GLOW = 27 -const integer PSYS_PART_END_SCALE = 6 -const integer PSYS_PART_FLAGS = 0 -const integer PSYS_PART_FOLLOW_SRC_MASK = 0x10 -const integer PSYS_PART_FOLLOW_VELOCITY_MASK = 0x20 -const integer PSYS_PART_INTERP_COLOR_MASK = 0x1 -const integer PSYS_PART_INTERP_SCALE_MASK = 0x2 -const integer PSYS_PART_MAX_AGE = 7 -const integer PSYS_PART_RIBBON_MASK = 0x400 -const integer PSYS_PART_START_ALPHA = 2 -const integer PSYS_PART_START_COLOR = 1 -const integer PSYS_PART_START_GLOW = 26 -const integer PSYS_PART_START_SCALE = 5 -const integer PSYS_PART_TARGET_LINEAR_MASK = 0x80 -const integer PSYS_PART_TARGET_POS_MASK = 0x40 -const integer PSYS_PART_WIND_MASK = 0x8 -const integer PSYS_SRC_ACCEL = 8 -const integer PSYS_SRC_ANGLE_BEGIN = 22 -const integer PSYS_SRC_ANGLE_END = 23 -const integer PSYS_SRC_BURST_PART_COUNT = 15 -const integer PSYS_SRC_BURST_RADIUS = 16 -const integer PSYS_SRC_BURST_RATE = 13 -const integer PSYS_SRC_BURST_SPEED_MAX = 18 -const integer PSYS_SRC_BURST_SPEED_MIN = 17 -const integer PSYS_SRC_INNERANGLE = 10 -const integer PSYS_SRC_MAX_AGE = 19 -const integer PSYS_SRC_OBJ_REL_MASK = 1 -const integer PSYS_SRC_OMEGA = 21 -const integer PSYS_SRC_OUTERANGLE = 11 -const integer PSYS_SRC_PATTERN = 9 -const integer PSYS_SRC_PATTERN_ANGLE = 4 -const integer PSYS_SRC_PATTERN_ANGLE_CONE = 8 -const integer PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY = 16 -const integer PSYS_SRC_PATTERN_DROP = 1 -const integer PSYS_SRC_PATTERN_EXPLODE = 2 -const integer PSYS_SRC_TARGET_KEY = 20 -const integer PSYS_SRC_TEXTURE = 12 -const integer PUBLIC_CHANNEL = 0 -const integer PURSUIT_FUZZ_FACTOR = 3 -const integer PURSUIT_GOAL_TOLERANCE = 5 -const integer PURSUIT_INTERCEPT = 4 -const integer PURSUIT_OFFSET = 1 -const integer PU_EVADE_HIDDEN = 7 -const integer PU_EVADE_SPOTTED = 8 -const integer PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED = 10 -const integer PU_FAILURE_INVALID_GOAL = 3 -const integer PU_FAILURE_INVALID_START = 2 -const integer PU_FAILURE_NO_NAVMESH = 9 -const integer PU_FAILURE_NO_VALID_DESTINATION = 6 -const integer PU_FAILURE_OTHER = 1000000 -const integer PU_FAILURE_PARCEL_UNREACHABLE = 11 -const integer PU_FAILURE_TARGET_GONE = 5 -const integer PU_FAILURE_UNREACHABLE = 4 -const integer PU_GOAL_REACHED = 1 -const integer PU_SLOWDOWN_DISTANCE_REACHED = 0 -const float RAD_TO_DEG = 57.295779 -const integer RCERR_CAST_TIME_EXCEEDED = -3 -const integer RCERR_SIM_PERF_LOW = -2 -const integer RCERR_UNKNOWN = -1 -const integer RC_DATA_FLAGS = 2 -const integer RC_DETECT_PHANTOM = 1 -const integer RC_GET_LINK_NUM = 0x4 -const integer RC_GET_NORMAL = 0x1 -const integer RC_GET_ROOT_KEY = 0x2 -const integer RC_MAX_HITS = 3 -const integer RC_REJECT_AGENTS = 0x1 -const integer RC_REJECT_LAND = 0x8 -const integer RC_REJECT_NONPHYSICAL = 0x4 -const integer RC_REJECT_PHYSICAL = 0x2 -const integer RC_REJECT_TYPES = 0 -const integer REGION_FLAG_ALLOW_DAMAGE = 0x00000001 -const integer REGION_FLAG_ALLOW_DIRECT_TELEPORT = 0x00100000 -const integer REGION_FLAG_BLOCK_FLY = 0x00080000 -const integer REGION_FLAG_BLOCK_TERRAFORM = 0x00000040 -const integer REGION_FLAG_DISABLE_COLLISIONS = 0x00001000 -const integer REGION_FLAG_DISABLE_PHYSICS = 0x00004000 -const integer REGION_FLAG_FIXED_SUN = 0x00000010 -const integer REGION_FLAG_RESTRICT_PUSHOBJECT = 0x00400000 -const integer REGION_FLAG_SANDBOX = 0x00000100 -const integer REMOTE_DATA_CHANNEL = 1 -const integer REMOTE_DATA_REPLY = 3 -const integer REMOTE_DATA_REQUEST = 2 -const integer REQUIRE_LINE_OF_SIGHT = 2 -const integer RESTITUTION = 0x4 -const integer REVERSE = 0x4 -const integer ROTATE = 0x20 -const integer SCALE = 0x40 -const integer SCRIPTED = 0x8 -const integer SIM_STAT_PCT_CHARS_STEPPED = 0 -const integer SMOOTH = 0x10 -const float SQRT2 = 1.4142135 -const integer STATUS_BLOCK_GRAB = 0x40 -const integer STATUS_BLOCK_GRAB_OBJECT = 0x400 -const integer STATUS_BOUNDS_ERROR = 1002 -const integer STATUS_CAST_SHADOWS = 0x200 -const integer STATUS_DIE_AT_EDGE = 0x80 -const integer STATUS_INTERNAL_ERROR = 1999 -const integer STATUS_MALFORMED_PARAMS = 1000 -const integer STATUS_NOT_FOUND = 1003 -const integer STATUS_NOT_SUPPORTED = 1004 -const integer STATUS_OK = 0 -const integer STATUS_PHANTOM = 0x10 -const integer STATUS_PHYSICS = 0x1 -const integer STATUS_RETURN_AT_EDGE = 0x100 -const integer STATUS_ROTATE_X = 0x2 -const integer STATUS_ROTATE_Y = 0x4 -const integer STATUS_ROTATE_Z = 0x8 -const integer STATUS_SANDBOX = 0x20 -const integer STATUS_TYPE_MISMATCH = 1001 -const integer STATUS_WHITELIST_FAILED = 2001 -const integer STRING_TRIM = 0x3 -const integer STRING_TRIM_HEAD = 0x1 -const integer STRING_TRIM_TAIL = 0x2 -const string TEXTURE_BLANK = "5748decc-f629-461c-9a36-a35a221fe21f" -const string TEXTURE_DEFAULT = "89556747-24cb-43ed-920b-47caed15465f" -const string TEXTURE_MEDIA = "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361" -const string TEXTURE_PLYWOOD = "89556747-24cb-43ed-920b-47caed15465f" -const string TEXTURE_TRANSPARENT = "8dcd4a48-2d37-4909-9f78-f7a9eb4ef903" -const integer TOUCH_INVALID_FACE = -1 -const vector TOUCH_INVALID_TEXCOORD = <-1.0, -1.0, 0.0> -const vector TOUCH_INVALID_VECTOR = <0.0, 0.0, 0.0> -const integer TRAVERSAL_TYPE = 7 -const integer TRAVERSAL_TYPE_FAST = 1 -const integer TRAVERSAL_TYPE_NONE = 2 -const integer TRAVERSAL_TYPE_SLOW = 0 -const integer TRUE = 1 -const float TWO_PI = 6.2831853 -const integer TYPE_FLOAT = 2 -const integer TYPE_INTEGER = 1 -const integer TYPE_INVALID = 0 -const integer TYPE_KEY = 4 -const integer TYPE_ROTATION = 6 -const integer TYPE_STRING = 3 -const integer TYPE_VECTOR = 5 -const string URL_REQUEST_DENIED = "URL_REQUEST_DENIED" -const string URL_REQUEST_GRANTED = "URL_REQUEST_GRANTED" -const integer VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY = 32 -const integer VEHICLE_ANGULAR_DEFLECTION_TIMESCALE = 33 -const integer VEHICLE_ANGULAR_FRICTION_TIMESCALE = 17 -const integer VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE = 35 -const integer VEHICLE_ANGULAR_MOTOR_DIRECTION = 19 -const integer VEHICLE_ANGULAR_MOTOR_TIMESCALE = 34 -const integer VEHICLE_BANKING_EFFICIENCY = 38 -const integer VEHICLE_BANKING_MIX = 39 -const integer VEHICLE_BANKING_TIMESCALE = 40 -const integer VEHICLE_BUOYANCY = 27 -const integer VEHICLE_FLAG_CAMERA_DECOUPLED = 0x200 -const integer VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT = 0x10 -const integer VEHICLE_FLAG_HOVER_TERRAIN_ONLY = 0x8 -const integer VEHICLE_FLAG_HOVER_UP_ONLY = 0x20 -const integer VEHICLE_FLAG_HOVER_WATER_ONLY = 0x4 -const integer VEHICLE_FLAG_LIMIT_MOTOR_UP = 0x40 -const integer VEHICLE_FLAG_LIMIT_ROLL_ONLY = 0x2 -const integer VEHICLE_FLAG_MOUSELOOK_BANK = 0x100 -const integer VEHICLE_FLAG_MOUSELOOK_STEER = 0x80 -const integer VEHICLE_FLAG_NO_DEFLECTION_UP = 0x1 -const integer VEHICLE_FLAG_NO_FLY_UP = 0x1 -const integer VEHICLE_HOVER_EFFICIENCY = 25 -const integer VEHICLE_HOVER_HEIGHT = 24 -const integer VEHICLE_HOVER_TIMESCALE = 26 -const integer VEHICLE_LINEAR_DEFLECTION_EFFICIENCY = 28 -const integer VEHICLE_LINEAR_DEFLECTION_TIMESCALE = 29 -const integer VEHICLE_LINEAR_FRICTION_TIMESCALE = 16 -const integer VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE = 31 -const integer VEHICLE_LINEAR_MOTOR_DIRECTION = 18 -const integer VEHICLE_LINEAR_MOTOR_OFFSET = 20 -const integer VEHICLE_LINEAR_MOTOR_TIMESCALE = 30 -const integer VEHICLE_REFERENCE_FRAME = 44 -const integer VEHICLE_TYPE_AIRPLANE = 4 -const integer VEHICLE_TYPE_BALLOON = 5 -const integer VEHICLE_TYPE_BOAT = 3 -const integer VEHICLE_TYPE_CAR = 2 -const integer VEHICLE_TYPE_NONE = 0 -const integer VEHICLE_TYPE_SLED = 1 -const integer VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY = 36 -const integer VEHICLE_VERTICAL_ATTRACTION_TIMESCALE = 37 -const integer VERTICAL = 0 -const integer WANDER_PAUSE_AT_WAYPOINTS = 0 -const integer XP_ERROR_EXPERIENCES_DISABLED = 2 -const integer XP_ERROR_EXPERIENCE_DISABLED = 8 -const integer XP_ERROR_EXPERIENCE_SUSPENDED = 9 -const integer XP_ERROR_INVALID_EXPERIENCE = 7 -const integer XP_ERROR_INVALID_PARAMETERS = 3 -const integer XP_ERROR_KEY_NOT_FOUND = 14 -const integer XP_ERROR_MATURITY_EXCEEDED = 16 -const integer XP_ERROR_NONE = 0 -const integer XP_ERROR_NOT_FOUND = 6 -const integer XP_ERROR_NOT_PERMITTED = 4 -const integer XP_ERROR_NOT_PERMITTED_LAND = 17 -const integer XP_ERROR_NO_EXPERIENCE = 5 -const integer XP_ERROR_QUOTA_EXCEEDED = 11 -const integer XP_ERROR_RETRY_UPDATE = 15 -const integer XP_ERROR_STORAGE_EXCEPTION = 13 -const integer XP_ERROR_STORE_DISABLED = 12 -const integer XP_ERROR_THROTTLED = 1 -const integer XP_ERROR_UNKNOWN_ERROR = 10 -const rotation ZERO_ROTATION = <0.0, 0.0, 0.0, 1.0> -const vector ZERO_VECTOR = <0.0, 0.0, 0.0> -event at_rot_target( integer tnum, rotation targetrot, rotation ourrot ) -event at_target( integer tnum, vector targetpos, vector ourpos ) -event attach( key id ) -event changed( integer change ) -event collision( integer num_detected ) -event collision_end( integer num_detected ) -event collision_start( integer num_detected ) -event control( key id, integer level, integer edge ) -event dataserver( key queryid, string data ) -event email( string time, string address, string subj, string message, integer num_left ) -event experience_permissions( key agent ) -event experience_permissions_denied( key agent, integer reason ) -event http_request( key id, string method, string body ) -event http_response( key request_id, integer status, list metadata, string body ) -event land_collision( vector pos ) -event land_collision_end( vector pos ) -event land_collision_start( vector pos ) -event link_message( integer sender_num, integer num, string str, key id ) -event listen( integer channel, string name, key id, string message ) -event money( key id, integer amount ) -event moving_end( ) -event moving_start( ) -event no_sensor( ) -event not_at_rot_target( ) -event not_at_target( ) -event object_rez( key id ) -event on_rez( integer start_param ) -event path_update( integer type, list reserved ) -event remote_data( integer event_type, key channel, key message_id, string sender, integer idata, string sdata ) -event run_time_permissions( integer perm ) -event sensor( integer num_detected ) -event state_entry( ) -event state_exit( ) -event timer( ) -event touch( integer num_detected ) -event touch_end( integer num_detected ) -event touch_start( integer num_detected ) -event transaction_result( key id, integer success, string data ) diff --git a/lslopt/lslparse.py b/lslopt/lslparse.py index b9a5ceb..057c4eb 100644 --- a/lslopt/lslparse.py +++ b/lslopt/lslparse.py @@ -2429,7 +2429,7 @@ list lazy_list_set(list L, integer i, list v) return self.parse(script, options) - def __init__(self): + def __init__(self, builtins = 'builtins.txt', seftable = 'seftable.txt'): """Reads the library.""" self.events = {} @@ -2453,7 +2453,7 @@ list lazy_list_set(list L, integer i, list v) parse_num_re = re.compile(r'^\s*(-?(?=[0-9]|\.[0-9])[0-9]*((?:\.[0-9]*)?(?:[Ee][+-]?[0-9]+)?))\s*$') parse_str_re = re.compile(ur'^"((?:[^"\\]|\\.)*)"$') - f = open(lslcommon.DataPath + 'builtins.txt', 'rb') + f = open(lslcommon.DataPath + builtins, 'rb') try: while True: line = f.readline() @@ -2461,7 +2461,7 @@ list lazy_list_set(list L, integer i, list v) if line[-1] == '\n': line = line[:-1] match = parse_lin_re.match(line) if not match: - warning('Syntax error in builtins.txt, line ' + line) + warning('Syntax error in ' + builtins + ', line ' + line) continue if match.group(1): # event or function @@ -2471,7 +2471,7 @@ list lazy_list_set(list L, integer i, list v) if typ == 'void': typ = None elif typ != 'event' and typ not in self.types: - warning('Invalid type in builtins.txt, line ' + line + ': ' + typ) + warning('Invalid type in ' + builtins + ', line ' + line + ': ' + typ) continue args = [] arglist = match.group(3) @@ -2481,7 +2481,7 @@ list lazy_list_set(list L, integer i, list v) for arg in arglist: argtyp = parse_arg_re.match(arg).group(1) if argtyp not in self.types: - warning('Invalid type in builtins.txt, line ' + line + ': ' + argtyp) + warning('Invalid type in ' + builtins + ', line ' + line + ': ' + argtyp) bad = True break args.append(parse_arg_re.match(arg).group(1)) @@ -2490,14 +2490,14 @@ list lazy_list_set(list L, integer i, list v) name = match.group(2) if typ == 'event': if name in self.events: - warning('Event already defined in bultins.txt, overwriting: ' + name) + warning('Event already defined in ' + builtins + ', overwriting: ' + name) self.events[name] = tuple(args) else: # Library functions go to the functions table. If # they are implemented in lslfuncs.*, they get a # reference to the implementation; otherwise None. if name in self.funclibrary: - warning('Function already defined in bultins.txt, overwriting: ' + name) + warning('Function already defined in ' + builtins + ', overwriting: ' + name) fn = getattr(lslfuncs, name, None) self.funclibrary[name] = {'Kind':'f', 'Type':typ, 'ParamTypes':args} if fn is not None: @@ -2506,10 +2506,10 @@ list lazy_list_set(list L, integer i, list v) # constant name = match.group(5) if name in self.constants: - warning('Global already defined in bultins.txt, overwriting: ' + name) + warning('Global already defined in ' + builtins + ', overwriting: ' + name) typ = match.group(4) if typ not in self.types: - warning('Invalid type in builtins.txt, line ' + line + ': ' + typ) + warning('Invalid type in ' + builtins + ', line ' + line + ': ' + typ) continue if typ == 'quaternion': typ = 'rotation' @@ -2539,10 +2539,10 @@ list lazy_list_set(list L, integer i, list v) #if typ == 'key': # value = Key(value) else: - warning('Invalid string in builtins.txt: ' + line) + warning('Invalid string in ' + builtins + ': ' + line) value = None elif typ == 'key': - warning('Key constants not supported in builtins.txt: ' + line) + warning('Key constants not supported in ' + builtins + ': ' + line) value = None elif typ in ('vector', 'rotation'): try: @@ -2572,10 +2572,10 @@ list lazy_list_set(list L, integer i, list v) value[3] = lslfuncs.F32(float(num.group(1))) value = Quaternion(value) except ValueError: - warning('Invalid vector/rotation syntax in builtins.txt: ' + line) + warning('Invalid vector/rotation syntax in ' + builtins + ': ' + line) else: assert typ == 'list' - warning('List constants not supported in builtins.txt: ' + line) + warning('List constants not supported in ' + builtins + ': ' + line) value = None if value is not None: self.constants[name] = value @@ -2588,7 +2588,7 @@ list lazy_list_set(list L, integer i, list v) # that includes domain data (min, max) and possibly input # parameter transformations e.g. # llSensor(..., PI, ...) -> llSensor(..., 4, ...). - f = open(lslcommon.DataPath + 'seftable.txt', 'rb') + f = open(lslcommon.DataPath + seftable, 'rb') try: while True: line = f.readline() diff --git a/testparser.py b/testparser.py index 265fbc8..949cca9 100644 --- a/testparser.py +++ b/testparser.py @@ -34,34 +34,7 @@ class UnitTestCase(unittest.TestCase): class Test01_LibraryLoader(UnitTestCase): def test_coverage(self): - os.remove('builtins.txt') - f = open('builtins.txt', 'wb') - f.write(r'''const key a="\t" -event ev(integer i) -event ev(integer i) -quaternion x(integer i) -void x(integer i) -blah -const vector a = <4,5,3,2> -const vector a = <4,5,3,2 -const vector a = -const vector a = <4,x,3> -const vector a = <3,4,x> -const rotation a = <3,4,4,x> -const list l = [] -const quaternion q=<1,2,3,4> -const string v=" -const string q="\t" -''') - f.close() - parser() - f = open('builtins.txt.dat', 'rb') - b = f.read() - f.close() - os.remove('builtins.txt') - f = open('builtins.txt', 'wb') - f.write(b) - f.close() + parser(builtins='builtins-unittest.txt') parser()