ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
uscript.php
Go to the documentation of this file.
1 <?php
2 /*************************************************************************************
3  * uscript.php
4  * ---------------------------------
5  * Author: pospi (pospi@spadgos.com)
6  * Copyright: (c) 2007 pospi (http://pospi.spadgos.com)
7  * Release Version: 1.0.9.0
8  * Date Started: 2007/05/21
9  *
10  * UnrealScript language file for GeSHi.
11  *
12  * Comments:
13  * * Main purpose at this time is for Unreal Engine 2 / 2.5
14  * * Mostly taken from UltraEdit unrealScript wordfile.
15  *
16  * CHANGES
17  * -------
18  * 2007/05/21 (1.0.8.10)
19  * - First Release
20  *
21  * TODO (updated 2007/05/21)
22  * -------------------------
23  * * Update to feature any UE3 classes / keywords when UT3 comes out
24  *
25  *************************************************************************************
26  *
27  * This file is part of GeSHi.
28  *
29  * GeSHi is free software; you can redistribute it and/or modify
30  * it under the terms of the GNU General Public License as published by
31  * the Free Software Foundation; either version 2 of the License, or
32  * (at your option) any later version.
33  *
34  * GeSHi is distributed in the hope that it will be useful,
35  * but WITHOUT ANY WARRANTY; without even the implied warranty of
36  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37  * GNU General Public License for more details.
38  *
39  * You should have received a copy of the GNU General Public License
40  * along with GeSHi; if not, write to the Free Software
41  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
42  *
43  ************************************************************************************/
44 
45 $language_data = array (
46  'LANG_NAME' => 'Unreal Script',
47  'COMMENT_SINGLE' => array(
48  1 => '//',
49  2 => '#'
50  ),
51  'COMMENT_MULTI' => array('/*' => '*/'),
52  'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
53  'QUOTEMARKS' => array("'", '"'),
54  'ESCAPE_CHAR' => '\\',
55  'KEYWORDS' => array(
56  1 => array( //declaration keywords
57  'simulated', 'state', 'class', 'function', 'event', 'var', 'local',
58  'ignores', 'globalconfig', 'config', 'abstract', 'nativereplication', 'native',
59  'auto', 'coerce', 'const', 'default',
60  'defaultproperties',
61  'enum', 'extends', 'expands', 'final', 'guid', 'latent', 'localized',
62  'new', 'noexport', 'operator', 'preoperator', 'optional', 'out',
63  'private', 'public', 'protected', 'reliable', 'replication',
64  'singular', 'static', 'struct', 'transient', 'unreliable',
65  'hidedropdown', 'cacheexempt', 'exec', 'delegate', 'import', 'placeable', 'exportstructs'
66  ),
67  2 => array( //control flow keywords
68  'for', 'while', 'do', 'if', 'else', 'switch', 'case', 'return', 'break', 'continue',
69  'begin', 'loop', 'assert',
70  'foreach', 'AllActors', 'DynamicActors', 'ChildActors', 'BasedActors', 'TouchingActors',
71  'TraceActors', 'RadiusActors', 'VisibleActors', 'CollidingActors', 'VisibleCollidingActors'
72  ),
73  3 => array( //global (object) functions
74  'log', 'warn', 'rot', 'vect', 'Rand', 'Min', 'Max', 'Clamp', 'Abs', 'Sin', 'ASin',
75  'Cos', 'ACos', 'Tan', 'ATan', 'Exp', 'Loge', 'Sqrt', 'Square', 'FRand', 'FMin', 'FMax', 'FClamp',
76  'Lerp', 'Smerp', 'Ceil', 'Round', 'VSize', 'Normal', 'Invert', 'VRand', 'MirrorVectorByNormal',
77  'GetAxes', 'GetUnAxes', 'RotRand', 'OrthoRotation', 'Normalize', 'ClockwiseFrom',
78  'Len', 'InStr', 'Mid', 'Left', 'Right', 'Caps', 'Chr', 'Asc', 'Locs',
79  'Divide', 'Split', 'StrCmp', 'Repl', 'Eval',
80  'InterpCurveEval', 'InterpCurveGetOutputRange', 'InterpCurveGetInputDomain',
81  'QuatProduct', 'QuatInvert', 'QuatRotateVector', 'QuatFindBetween', 'QuatFromAxisAndAngle',
82  'QuatFromRotator', 'QuatToRotator', 'QuatSlerp',
83  'Localize', 'GotoState', 'IsInState', 'GetStateName',
84  'ClassIsChildOf', 'IsA', 'Enable', 'Disable',
85  'GetPropertyText', 'SetPropertyText', 'GetEnum', 'DynamicLoadObject', 'FindObject',
86  'SaveConfig', 'ClearConfig', 'StaticSaveConfig', 'ResetConfig', 'StaticClearConfig',
87  'GetPerObjectNames', 'RandRange', 'StopWatch', 'IsOnConsole', 'IsSoaking',
88  'PlatformIsMacOS', 'PlatformIsUnix', 'PlatformIsWindows', 'PlatformIs64Bit',
89  'BeginState', 'EndState', 'Created', 'AllObjects', 'GetReferencers', 'GetItemName',
90  'ReplaceText', 'EatStr'
91  ),
92  4 => array( //common almost-global (actor) functions
93  'ClientMessage', 'ConsoleCommand', 'CopyObjectToClipboard', 'TextToSpeech',
94  'Error', 'Sleep', 'SetCollision', 'SetCollisionSize', 'SetDrawScale', 'SetDrawScale3D',
95  'SetStaticMesh', 'SetDrawType', 'Move', 'SetLocation', 'SetRotation',
96  'SetRelativeLocation', 'SetRelativeRotation', 'MoveSmooth', 'AutonomousPhysics',
97  'SetBase', 'SetOwner', 'IsJoinedTo', 'GetMeshName', 'PlayAnim', 'LoopAnim', 'TweenAnim',
98  'IsAnimating', 'FinishAnim', 'HasAnim', 'StopAnimating', 'FreezeFrameAt', 'SetAnimFrame',
99  'IsTweening', 'AnimStopLooping', 'AnimEnd', 'LinkSkelAnim', 'LinkMesh', 'BoneRefresh',
100  'GetBoneCoords', 'GetBoneRotation', 'GetRootLocation', 'GetRootRotation', 'AttachToBone',
101  'DetachFromBone', 'SetBoneScale', 'UpdateURL', 'GetURLOption', 'SetPhysics', 'KAddImpulse',
102  'KImpact', 'KApplyForce', 'Clock', 'UnClock', 'Destroyed', 'GainedChild', 'LostChild',
103  'Tick', 'PostNetReceive', 'ClientTrigger', 'Trigger', 'UnTrigger', 'BeginEvent', 'EndEvent',
104  'Timer', 'HitWall', 'Falling', 'Landed', 'ZoneChange', 'PhysicsVolumeChange', 'Touch',
105  'PostTouch', 'UnTouch', 'Bump', 'BaseChange', 'Attach', 'Detach', 'SpecialHandling',
106  'EncroachingOn', 'EncroachedBy', 'RanInto', 'FinishedInterpolation', 'EndedRotation',
107  'UsedBy', 'FellOutOfWorld', 'KilledBy', 'TakeDamage', 'HealDamage', 'Trace', 'FastTrace',
108  'TraceThisActor', 'spawn', 'Destroy', 'TornOff', 'SetTimer', 'PlaySound', 'PlayOwnedSound',
109  'GetSoundDuration', 'MakeNoise', 'BeginPlay', 'GetAllInt', 'RenderOverlays', 'RenderTexture',
110  'PreBeginPlay', 'PostBeginPlay', 'PostNetBeginPlay', 'HurtRadius', 'Reset', 'Crash'
111  ),
112  5 => array( //data types
113  'none', 'null',
114  'float', 'int', 'bool', 'byte', 'char', 'double', 'iterator', 'name', 'string', //primitive
115  'plane', 'rotator', 'vector', 'spline', 'coords', 'Quat', 'Range', 'RangeVector', //structs
116  'Scale', 'Color', 'Box', 'IntBox', 'FloatBox', 'BoundingVolume', 'Matrix', 'InterpCurvePoint',
117  'InterpCurve', 'CompressedPosition', 'TMultiMap', 'PointRegion',
118  'KRigidBodyState', 'KSimParams', 'AnimRep', 'FireProperties',
119  'lodmesh', 'skeletalmesh', 'mesh', 'StaticMesh', 'MeshInstance', //3d resources
120  'sound', //sound resources
121  'material', 'texture', 'combiner', 'modifier', 'ColorModifier', 'FinalBlend', //2d resources
122  'MaterialSequence', 'MaterialSwitch', 'OpacityModifier', 'TexModifier', 'TexEnvMap',
123  'TexCoordSource', 'TexMatrix', 'TexOscillator', 'TexPanner', 'TexRotator', 'TexScaler',
124  'RenderedMaterial', 'BitmapMaterial', 'ScriptedTexture', 'ShadowBitmapMaterial', 'Cubemap',
125  'FractalTexture', 'FireTexture', 'IceTexture', 'WaterTexture', 'FluidTexture', 'WaveTexture',
126  'WetTexture', 'ConstantMaterial', 'ConstantColor', 'FadeColor', 'ParticleMaterial',
127  'ProjectorMaterial', 'Shader', 'TerrainMaterial', 'VertexColor'
128  ),
129  6 => array( //misc keywords
130  'false', 'true', 'self', 'super', 'MaxInt', 'Pi'
131  ),
132  7 => array( //common actor enums & variables
133  'DT_None', 'DT_Sprite', 'DT_Mesh', 'DT_Brush', 'DT_RopeSprite',
134  'DT_VerticalSprite', 'DT_TerraForm', 'DT_SpriteAnimOnce', 'DT_StaticMesh', 'DT_DrawType',
135  'DT_Particle', 'DT_AntiPortal', 'DT_FluidSurface',
136  'PHYS_None', 'PHYS_Walking', 'PHYS_Falling', 'PHYS_Swimming', 'PHYS_Flying',
137  'PHYS_Rotating', 'PHYS_Projectile', 'PHYS_Interpolating', 'PHYS_MovingBrush', 'PHYS_Spider',
138  'PHYS_Trailer', 'PHYS_Ladder', 'PHYS_RootMotion', 'PHYS_Karma', 'PHYS_KarmaRagDoll',
139  'PHYS_Hovering', 'PHYS_CinMotion',
140  'ROLE_None', 'ROLE_DumbProxy', 'ROLE_SimulatedProxy',
141  'ROLE_AutonomousProxy', 'ROLE_Authority',
142  'STY_None', 'STY_Normal', 'STY_Masked', 'STY_Translucent', 'STY_Modulated', 'STY_Alpha',
143  'STY_Additive', 'STY_Subtractive', 'STY_Particle', 'STY_AlphaZ',
144  'OCCLUSION_None', 'OCCLUSION_BSP', 'OCCLUSION_Default', 'OCCLUSION_StaticMeshes',
145  'SLOT_None', 'SLOT_Misc', 'SLOT_Pain', 'SLOT_Interact', 'SLOT_Ambient', 'SLOT_Talk',
146  'SLOT_Interface', 'MTRAN_None', 'MTRAN_Instant', 'MTRAN_Segue', 'MTRAN_Fade',
147  'MTRAN_FastFade', 'MTRAN_SlowFade',
148 
149  'DrawType', 'Physics', 'Owner', 'Base', 'Level', 'Game', 'Instigator', 'RemoteRole', 'Role',
150  'LifeSpan', 'Tag', 'Event', 'Location', 'Rotation', 'Velocity', 'Acceleration',
151  'RelativeLocation', 'RelativeRotation', 'DrawScale', 'DrawScale3D', 'Skins', 'Style',
152  'SoundVolume', 'SoundPitch', 'SoundRadius', 'TransientSoundVolume', 'TransientSoundRadius',
153  'CollisionRadius', 'CollisionHeight', 'Mass', 'Buoyancy', 'RotationRate', 'DesiredRotation'
154  ),
155  8 => array( //common non-actor uscript classes
156  'Object',
157  'CacheManager', 'CameraEffect', 'Canvas', 'CheatManager', 'Commandlet', 'DecoText', 'GUI',
158  'InteractionMaster', 'Interactions', 'Interaction', 'KarmaParamsCollision', 'KarmaParamsRBFull',
159  'KarmaParamsSkel', 'KarmaParams', 'LevelSummary', 'Locale', 'Manifest', 'MaterialFactory',
160  'MeshObject', 'ObjectPool', 'Pallete',
161  'ParticleEmitter', 'MeshEmitter', 'BeamEmitter', 'SpriteEmitter', 'SparkEmitter', 'TrailEmitter',
162  'Player', 'PlayerInput', 'PlayInfo', 'ReachSpec', 'Resource', 'LatentScriptedAction', 'ScriptedAction',
163  'speciesType', 'StreamBase', 'Stream', 'EditorEngine', 'Engine', 'Time', 'WeaponFire',
164  'WebApplication', 'WebRequest', 'WebResponse', 'WebSkin', 'xPawnGibGroup', 'xPawnSoundGroup',
165  'xUtil'
166  ),
167  9 => array( //common actor-based uscript classes
168  'Actor',
169  'Controller', 'AIController', 'ScriptedController', 'Bot', 'xBot',
170  'PlayerController', 'UnrealPlayer', 'xPlayer',
171  'DamageType', 'WeaponDamageType', 'Effects', 'Emitter', 'NetworkEmitter',
172  'Gib', 'HUD', 'HudBase', 'Info', 'FluidSurfaceInfo', 'Combo',
173  'GameInfo', 'UnrealMPGameInfo', 'DeathMatch', 'TeamGame', 'CTFGame',
174  'xCTFGame', 'xBombingRun', 'xDoubleDom', 'xTeamGame',
175  'ASGameInfo', 'Invasion', 'ONSOnslaughtGame', 'xDeathmatch',
176  'Mutator', 'Inventory', 'Ammunition', 'KeyInventory', 'Powerups', 'Armor', 'Weapon',
177  'InventoryAttachment', 'WeaponAttachment',
178  'KActor', 'KConstraint', 'KBSJoint', 'KCarWheelJoint', 'KConeLimit', 'KHinge', 'KTire',
179  'KVehicleFactory', 'Keypoint', 'AIScript', 'ScriptedSequence', 'ScriptedTrigger',
180  'AmbientSound', 'Light', 'SpotLight', 'SunLight', 'TriggerLight',
181  'MeshEffect', 'NavigationPoint', 'GameObjective', 'DestroyableObjective',
182  'PathNode', 'FlyingPathNode', 'RoadPathNode', 'InventorySpot', 'PlayerStart',
183  'Pawn', 'Vehicle', 'UnrealPawn', 'xPawn', 'Monster', 'ASVehicle', 'KVehicle', 'KCar',
184  'ONSWeaponPawn', 'SVehicle', 'ONSVehicle', 'ONSChopperCraft', 'ONSHoverCraft',
185  'ONSPlaneCraft', 'ONSTreadCraft', 'ONSWheeledCraft',
186  'Pickup', 'Ammo', 'UTAmmoPickup', 'ArmorPickup', 'KeyPickup', 'TournamentPickup',
187  'Projectile', 'Projector', 'DynamicProjector', 'ShadowProjector', 'xScorch',
188  'xEmitter', 'xPickupBase', 'xProcMesh', 'xWeatherEffect', 'PhysicsVolume', 'Volume'
189  ),
190  10 => array( //symbol-like operators
191  'dot','cross'
192  )
193  ),
194  'SYMBOLS' => array(
195  '+','-','=','/','*','-','%','>','<','&','^','!','|','`','(',')','[',']','{','}',
196  '<<','>>','$','@'
197  ),
198  'CASE_SENSITIVE' => array(
199  GESHI_COMMENTS => false,
200  1 => false,
201  2 => false,
202  3 => false,
203  4 => false,
204  5 => false,
205  6 => false,
206  7 => false,
207  8 => false,
208  9 => false,
209  10 => false,
210  ),
211  'STYLES' => array(
212  'KEYWORDS' => array(
213  1 => 'color: #0000FF;',
214  2 => 'color: #0000FF;',
215  3 => 'color: #0066AA;',
216  4 => 'color: #0088FF;',
217  5 => 'color: #E000E0;',
218  6 => 'color: #900000;',
219  7 => 'color: #888800;',
220  8 => 'color: #AA6600;',
221  9 => 'color: #FF8800;',
222  10 => 'color: #0000FF;'
223  ),
224  'COMMENTS' => array(
225  1 => 'color: #008080; font-style: italic;',
226  2 => 'color: #000000; font-weight: bold;',
227  'MULTI' => 'color: #008080; font-style: italic;'
228  ),
229  'ESCAPE_CHAR' => array(
230  0 => ''
231  ),
232  'BRACKETS' => array(
233  0 => 'color: #000000;'
234  ),
235  'STRINGS' => array(
236  0 => 'color: #999999;'
237  ),
238  'NUMBERS' => array(
239  0 => 'color: #FF0000;'
240  ),
241  'METHODS' => array(
242  0 => 'color: #006600;'
243  ),
244  'SYMBOLS' => array(
245  0 => 'color: #669966;'
246  ),
247  'REGEXPS' => array(
248  0 => 'color: #E000E0;',
249  1 => 'color: #E000E0;'
250  ),
251  'SCRIPT' => array(
252  0 => ''
253  )
254  ),
255  'URLS' => array(
256  1 => '',
257  2 => '',
258  3 => '',
259  4 => '',
260  5 => '',
261  6 => '',
262  7 => '',
263  8 => 'http://wiki.beyondunreal.com/wiki?search={FNAME}',
264  9 => 'http://wiki.beyondunreal.com/wiki?search={FNAME}',
265  10 => ''
266  ),
267  'OOLANG' => true,
268  'OBJECT_SPLITTERS' => array('.'),
269  'REGEXPS' => array( //handle template-style variable definitions
270  0 => array(
271  GESHI_SEARCH => '(class\s*)<(\s*(\w+)\s*)>',
272  GESHI_REPLACE => "\${1}",
273  GESHI_MODIFIERS => 'i',
274  GESHI_BEFORE => '',
275  GESHI_AFTER => "< \${3} >"
276  ),
277  1 => array(
278  GESHI_SEARCH => '(array\s*)<(\s*(\w+)\s*)>',
279  GESHI_REPLACE => "\${1}",
280  GESHI_MODIFIERS => 'i',
281  GESHI_BEFORE => '',
282  GESHI_AFTER => "< \${3} >"
283  )
284  ),
285  'STRICT_MODE_APPLIES' => GESHI_NEVER,
286  'SCRIPT_DELIMITERS' => array(
287  ),
288  'HIGHLIGHT_STRICT_BLOCK' => array(
289  ),
290  'PARSER_CONTROL' => array(
291  'KEYWORDS' => array(
292  10 => array(
293  'DISALLOWED_BEFORE' => '(?<!<)(?=DOT>)'
294  )
295  )
296  )
297 );
const GESHI_MODIFIERS
The key of the regex array defining any modifiers to the regular expression.
Definition: geshi.php:137
const GESHI_BEFORE
The key of the regex array defining what bracket group in a matched search to put before the replacem...
Definition: geshi.php:140
$language_data
Definition: uscript.php:45
const GESHI_COMMENTS
Used in language files to mark comments.
Definition: geshi.php:149
const GESHI_REPLACE
The key of the regex array defining what bracket group in a matched search to use as a replacement...
Definition: geshi.php:135
const GESHI_SEARCH
The key of the regex array defining what to search for.
Definition: geshi.php:132
const GESHI_NEVER
#+ private
Definition: geshi.php:123
const GESHI_CAPS_NO_CHANGE
Lowercase keywords found.
Definition: geshi.php:94
const GESHI_AFTER
The key of the regex array defining what bracket group in a matched search to put after the replaceme...
Definition: geshi.php:143