pygments.rb 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/README.md +6 -1
  2. data/lexers +0 -0
  3. data/lib/pygments/version.rb +1 -1
  4. data/vendor/pygments-main/AUTHORS +15 -0
  5. data/vendor/pygments-main/CHANGES +28 -1
  6. data/vendor/pygments-main/LICENSE +1 -1
  7. data/vendor/pygments-main/external/lasso-builtins-generator-9.lasso +121 -0
  8. data/vendor/pygments-main/pygments/cmdline.py +1 -1
  9. data/vendor/pygments-main/pygments/filters/__init__.py +0 -1
  10. data/vendor/pygments-main/pygments/formatters/_mapping.py +2 -2
  11. data/vendor/pygments-main/pygments/formatters/img.py +1 -1
  12. data/vendor/pygments-main/pygments/formatters/latex.py +8 -8
  13. data/vendor/pygments-main/pygments/formatters/other.py +0 -2
  14. data/vendor/pygments-main/pygments/lexers/_lassobuiltins.py +5413 -0
  15. data/vendor/pygments-main/pygments/lexers/_mapping.py +36 -11
  16. data/vendor/pygments-main/pygments/lexers/_openedgebuiltins.py +551 -0
  17. data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +0 -1
  18. data/vendor/pygments-main/pygments/lexers/_robotframeworklexer.py +546 -0
  19. data/vendor/pygments-main/pygments/lexers/_sourcemodbuiltins.py +1072 -0
  20. data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +174 -0
  21. data/vendor/pygments-main/pygments/lexers/_vimbuiltins.py +13 -3
  22. data/vendor/pygments-main/pygments/lexers/agile.py +145 -33
  23. data/vendor/pygments-main/pygments/lexers/asm.py +2 -2
  24. data/vendor/pygments-main/pygments/lexers/compiled.py +328 -36
  25. data/vendor/pygments-main/pygments/lexers/dalvik.py +104 -0
  26. data/vendor/pygments-main/pygments/lexers/dotnet.py +8 -14
  27. data/vendor/pygments-main/pygments/lexers/functional.py +773 -8
  28. data/vendor/pygments-main/pygments/lexers/jvm.py +184 -36
  29. data/vendor/pygments-main/pygments/lexers/math.py +349 -23
  30. data/vendor/pygments-main/pygments/lexers/other.py +315 -492
  31. data/vendor/pygments-main/pygments/lexers/parsers.py +83 -1
  32. data/vendor/pygments-main/pygments/lexers/shell.py +4 -1
  33. data/vendor/pygments-main/pygments/lexers/templates.py +112 -2
  34. data/vendor/pygments-main/pygments/lexers/text.py +52 -3
  35. data/vendor/pygments-main/pygments/lexers/web.py +382 -36
  36. data/vendor/pygments-main/pygments/unistring.py +35 -25
  37. data/vendor/pygments-main/pygments/util.py +45 -0
  38. data/vendor/pygments-main/tests/examplefiles/Config.in.cache +1973 -0
  39. data/vendor/pygments-main/tests/examplefiles/example.Rd +78 -0
  40. data/vendor/pygments-main/tests/examplefiles/example.bug +54 -0
  41. data/vendor/pygments-main/tests/examplefiles/example.ceylon +33 -0
  42. data/vendor/pygments-main/tests/examplefiles/example.jag +48 -0
  43. data/vendor/pygments-main/tests/examplefiles/example.monkey +152 -0
  44. data/vendor/pygments-main/tests/examplefiles/example.msc +43 -0
  45. data/vendor/pygments-main/tests/examplefiles/example.reg +19 -0
  46. data/vendor/pygments-main/tests/examplefiles/example.rkt +95 -0
  47. data/vendor/pygments-main/tests/examplefiles/example.rpf +4 -0
  48. data/vendor/pygments-main/tests/examplefiles/example.stan +97 -0
  49. data/vendor/pygments-main/tests/examplefiles/example.xtend +34 -0
  50. data/vendor/pygments-main/tests/examplefiles/example2.msc +79 -0
  51. data/vendor/pygments-main/tests/examplefiles/garcia-wachs.kk +123 -0
  52. data/vendor/pygments-main/tests/examplefiles/hello.smali +40 -0
  53. data/vendor/pygments-main/tests/examplefiles/hello.sp +9 -0
  54. data/vendor/pygments-main/tests/examplefiles/http_request_example +2 -1
  55. data/vendor/pygments-main/tests/examplefiles/http_response_example +4 -2
  56. data/vendor/pygments-main/tests/examplefiles/inet_pton6.dg +71 -0
  57. data/vendor/pygments-main/tests/examplefiles/json.lasso +301 -0
  58. data/vendor/pygments-main/tests/examplefiles/json.lasso9 +213 -0
  59. data/vendor/pygments-main/tests/examplefiles/livescript-demo.ls +41 -0
  60. data/vendor/pygments-main/tests/examplefiles/matlab_sample +5 -2
  61. data/vendor/pygments-main/tests/examplefiles/metagrammar.treetop +455 -0
  62. data/vendor/pygments-main/tests/examplefiles/pytb_test3.pytb +4 -0
  63. data/vendor/pygments-main/tests/examplefiles/robotframework.txt +39 -0
  64. data/vendor/pygments-main/tests/examplefiles/rust_example.rs +743 -0
  65. data/vendor/pygments-main/tests/examplefiles/test.R +149 -115
  66. data/vendor/pygments-main/tests/examplefiles/test.cu +36 -0
  67. data/vendor/pygments-main/tests/test_basic_api.py +1 -1
  68. data/vendor/pygments-main/tests/test_util.py +18 -0
  69. metadata +34 -3
  70. data/vendor/pygments-main/REVISION +0 -1
@@ -0,0 +1,1072 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ pygments.lexers._sourcemodbuiltins
4
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
+
6
+ This file contains the names of SourceMod functions.
7
+ It is able to re-generate itself.
8
+
9
+ Do not edit the FUNCTIONS list by hand.
10
+
11
+ :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS.
12
+ :license: BSD, see LICENSE for details.
13
+ """
14
+
15
+ FUNCTIONS = ['TopMenuHandler',
16
+ 'CreateTopMenu',
17
+ 'LoadTopMenuConfig',
18
+ 'AddToTopMenu',
19
+ 'GetTopMenuInfoString',
20
+ 'GetTopMenuObjName',
21
+ 'RemoveFromTopMenu',
22
+ 'DisplayTopMenu',
23
+ 'FindTopMenuCategory',
24
+ 'OnAdminMenuCreated',
25
+ 'OnAdminMenuReady',
26
+ 'GetAdminTopMenu',
27
+ 'AddTargetsToMenu',
28
+ 'AddTargetsToMenu2',
29
+ 'RedisplayAdminMenu',
30
+ 'TEHook',
31
+ 'AddTempEntHook',
32
+ 'RemoveTempEntHook',
33
+ 'TE_Start',
34
+ 'TE_IsValidProp',
35
+ 'TE_WriteNum',
36
+ 'TE_ReadNum',
37
+ 'TE_WriteFloat',
38
+ 'TE_ReadFloat',
39
+ 'TE_WriteVector',
40
+ 'TE_ReadVector',
41
+ 'TE_WriteAngles',
42
+ 'TE_WriteFloatArray',
43
+ 'TE_Send',
44
+ 'TE_WriteEncodedEnt',
45
+ 'TE_SendToAll',
46
+ 'TE_SendToClient',
47
+ 'CreateKeyValues',
48
+ 'KvSetString',
49
+ 'KvSetNum',
50
+ 'KvSetUInt64',
51
+ 'KvSetFloat',
52
+ 'KvSetColor',
53
+ 'KvSetVector',
54
+ 'KvGetString',
55
+ 'KvGetNum',
56
+ 'KvGetFloat',
57
+ 'KvGetColor',
58
+ 'KvGetUInt64',
59
+ 'KvGetVector',
60
+ 'KvJumpToKey',
61
+ 'KvJumpToKeySymbol',
62
+ 'KvGotoFirstSubKey',
63
+ 'KvGotoNextKey',
64
+ 'KvSavePosition',
65
+ 'KvDeleteKey',
66
+ 'KvDeleteThis',
67
+ 'KvGoBack',
68
+ 'KvRewind',
69
+ 'KvGetSectionName',
70
+ 'KvSetSectionName',
71
+ 'KvGetDataType',
72
+ 'KeyValuesToFile',
73
+ 'FileToKeyValues',
74
+ 'KvSetEscapeSequences',
75
+ 'KvNodesInStack',
76
+ 'KvCopySubkeys',
77
+ 'KvFindKeyById',
78
+ 'KvGetNameSymbol',
79
+ 'KvGetSectionSymbol',
80
+ 'TE_SetupSparks',
81
+ 'TE_SetupSmoke',
82
+ 'TE_SetupDust',
83
+ 'TE_SetupMuzzleFlash',
84
+ 'TE_SetupMetalSparks',
85
+ 'TE_SetupEnergySplash',
86
+ 'TE_SetupArmorRicochet',
87
+ 'TE_SetupGlowSprite',
88
+ 'TE_SetupExplosion',
89
+ 'TE_SetupBloodSprite',
90
+ 'TE_SetupBeamRingPoint',
91
+ 'TE_SetupBeamPoints',
92
+ 'TE_SetupBeamLaser',
93
+ 'TE_SetupBeamRing',
94
+ 'TE_SetupBeamFollow',
95
+ 'HookEvent',
96
+ 'HookEventEx',
97
+ 'UnhookEvent',
98
+ 'CreateEvent',
99
+ 'FireEvent',
100
+ 'CancelCreatedEvent',
101
+ 'GetEventBool',
102
+ 'SetEventBool',
103
+ 'GetEventInt',
104
+ 'SetEventInt',
105
+ 'GetEventFloat',
106
+ 'SetEventFloat',
107
+ 'GetEventString',
108
+ 'SetEventString',
109
+ 'GetEventName',
110
+ 'SetEventBroadcast',
111
+ 'GetUserMessageId',
112
+ 'GetUserMessageName',
113
+ 'StartMessage',
114
+ 'StartMessageEx',
115
+ 'EndMessage',
116
+ 'MsgHook',
117
+ 'MsgPostHook',
118
+ 'HookUserMessage',
119
+ 'UnhookUserMessage',
120
+ 'StartMessageAll',
121
+ 'StartMessageOne',
122
+ 'InactivateClient',
123
+ 'ReconnectClient',
124
+ 'GetMaxEntities',
125
+ 'GetEntityCount',
126
+ 'IsValidEntity',
127
+ 'IsValidEdict',
128
+ 'IsEntNetworkable',
129
+ 'CreateEdict',
130
+ 'RemoveEdict',
131
+ 'GetEdictFlags',
132
+ 'SetEdictFlags',
133
+ 'GetEdictClassname',
134
+ 'GetEntityNetClass',
135
+ 'ChangeEdictState',
136
+ 'GetEntData',
137
+ 'SetEntData',
138
+ 'GetEntDataFloat',
139
+ 'SetEntDataFloat',
140
+ 'GetEntDataEnt2',
141
+ 'SetEntDataEnt2',
142
+ 'GetEntDataVector',
143
+ 'SetEntDataVector',
144
+ 'GetEntDataString',
145
+ 'SetEntDataString',
146
+ 'FindSendPropOffs',
147
+ 'FindSendPropInfo',
148
+ 'FindDataMapOffs',
149
+ 'GetEntSendPropOffs',
150
+ 'GetEntProp',
151
+ 'SetEntProp',
152
+ 'GetEntPropFloat',
153
+ 'SetEntPropFloat',
154
+ 'GetEntPropEnt',
155
+ 'SetEntPropEnt',
156
+ 'GetEntPropVector',
157
+ 'SetEntPropVector',
158
+ 'GetEntPropString',
159
+ 'SetEntPropString',
160
+ 'GetEntPropArraySize',
161
+ 'GetEntDataArray',
162
+ 'SetEntDataArray',
163
+ 'GetEntityClassname',
164
+ 'float',
165
+ 'FloatMul',
166
+ 'FloatDiv',
167
+ 'FloatAdd',
168
+ 'FloatSub',
169
+ 'FloatFraction',
170
+ 'RoundToZero',
171
+ 'RoundToCeil',
172
+ 'RoundToFloor',
173
+ 'RoundToNearest',
174
+ 'FloatCompare',
175
+ 'SquareRoot',
176
+ 'Pow',
177
+ 'Exponential',
178
+ 'Logarithm',
179
+ 'Sine',
180
+ 'Cosine',
181
+ 'Tangent',
182
+ 'FloatAbs',
183
+ 'ArcTangent',
184
+ 'ArcCosine',
185
+ 'ArcSine',
186
+ 'ArcTangent2',
187
+ 'RoundFloat',
188
+ 'operator%',
189
+ 'DegToRad',
190
+ 'RadToDeg',
191
+ 'GetURandomInt',
192
+ 'GetURandomFloat',
193
+ 'SetURandomSeed',
194
+ 'SetURandomSeedSimple',
195
+ 'RemovePlayerItem',
196
+ 'GivePlayerItem',
197
+ 'GetPlayerWeaponSlot',
198
+ 'IgniteEntity',
199
+ 'ExtinguishEntity',
200
+ 'TeleportEntity',
201
+ 'ForcePlayerSuicide',
202
+ 'SlapPlayer',
203
+ 'FindEntityByClassname',
204
+ 'GetClientEyeAngles',
205
+ 'CreateEntityByName',
206
+ 'DispatchSpawn',
207
+ 'DispatchKeyValue',
208
+ 'DispatchKeyValueFloat',
209
+ 'DispatchKeyValueVector',
210
+ 'GetClientAimTarget',
211
+ 'GetTeamCount',
212
+ 'GetTeamName',
213
+ 'GetTeamScore',
214
+ 'SetTeamScore',
215
+ 'GetTeamClientCount',
216
+ 'SetEntityModel',
217
+ 'GetPlayerDecalFile',
218
+ 'GetServerNetStats',
219
+ 'EquipPlayerWeapon',
220
+ 'ActivateEntity',
221
+ 'SetClientInfo',
222
+ 'SetClientListeningFlags',
223
+ 'GetClientListeningFlags',
224
+ 'SetListenOverride',
225
+ 'GetListenOverride',
226
+ 'IsClientMuted',
227
+ 'TR_GetPointContents',
228
+ 'TR_GetPointContentsEnt',
229
+ 'TR_TraceRay',
230
+ 'TR_TraceHull',
231
+ 'TR_TraceRayFilter',
232
+ 'TR_TraceHullFilter',
233
+ 'TR_TraceRayEx',
234
+ 'TR_TraceHullEx',
235
+ 'TR_TraceRayFilterEx',
236
+ 'TR_TraceHullFilterEx',
237
+ 'TR_GetFraction',
238
+ 'TR_GetEndPosition',
239
+ 'TR_GetEntityIndex',
240
+ 'TR_DidHit',
241
+ 'TR_GetHitGroup',
242
+ 'TR_GetPlaneNormal',
243
+ 'TR_PointOutsideWorld',
244
+ 'SortIntegers',
245
+ 'SortFloats',
246
+ 'SortStrings',
247
+ 'SortFunc1D',
248
+ 'SortCustom1D',
249
+ 'SortCustom2D',
250
+ 'SortADTArray',
251
+ 'SortFuncADTArray',
252
+ 'SortADTArrayCustom',
253
+ 'CompileRegex',
254
+ 'MatchRegex',
255
+ 'GetRegexSubString',
256
+ 'SimpleRegexMatch',
257
+ 'TF2_GetPlayerClass',
258
+ 'TF2_SetPlayerClass',
259
+ 'TF2_GetPlayerResourceData',
260
+ 'TF2_SetPlayerResourceData',
261
+ 'TF2_RemoveWeaponSlot',
262
+ 'TF2_RemoveAllWeapons',
263
+ 'TF2_IsPlayerInCondition',
264
+ 'TF2_GetObjectType',
265
+ 'TF2_GetObjectMode',
266
+ 'NominateMap',
267
+ 'RemoveNominationByMap',
268
+ 'RemoveNominationByOwner',
269
+ 'GetExcludeMapList',
270
+ 'GetNominatedMapList',
271
+ 'CanMapChooserStartVote',
272
+ 'InitiateMapChooserVote',
273
+ 'HasEndOfMapVoteFinished',
274
+ 'EndOfMapVoteEnabled',
275
+ 'OnNominationRemoved',
276
+ 'OnMapVoteStarted',
277
+ 'CreateTimer',
278
+ 'KillTimer',
279
+ 'TriggerTimer',
280
+ 'GetTickedTime',
281
+ 'GetMapTimeLeft',
282
+ 'GetMapTimeLimit',
283
+ 'ExtendMapTimeLimit',
284
+ 'GetTickInterval',
285
+ 'OnMapTimeLeftChanged',
286
+ 'IsServerProcessing',
287
+ 'CreateDataTimer',
288
+ 'ByteCountToCells',
289
+ 'CreateArray',
290
+ 'ClearArray',
291
+ 'CloneArray',
292
+ 'ResizeArray',
293
+ 'GetArraySize',
294
+ 'PushArrayCell',
295
+ 'PushArrayString',
296
+ 'PushArrayArray',
297
+ 'GetArrayCell',
298
+ 'GetArrayString',
299
+ 'GetArrayArray',
300
+ 'SetArrayCell',
301
+ 'SetArrayString',
302
+ 'SetArrayArray',
303
+ 'ShiftArrayUp',
304
+ 'RemoveFromArray',
305
+ 'SwapArrayItems',
306
+ 'FindStringInArray',
307
+ 'FindValueInArray',
308
+ 'ProcessTargetString',
309
+ 'ReplyToTargetError',
310
+ 'MultiTargetFilter',
311
+ 'AddMultiTargetFilter',
312
+ 'RemoveMultiTargetFilter',
313
+ 'OnBanClient',
314
+ 'OnBanIdentity',
315
+ 'OnRemoveBan',
316
+ 'BanClient',
317
+ 'BanIdentity',
318
+ 'RemoveBan',
319
+ 'CreateTrie',
320
+ 'SetTrieValue',
321
+ 'SetTrieArray',
322
+ 'SetTrieString',
323
+ 'GetTrieValue',
324
+ 'GetTrieArray',
325
+ 'GetTrieString',
326
+ 'RemoveFromTrie',
327
+ 'ClearTrie',
328
+ 'GetTrieSize',
329
+ 'GetFunctionByName',
330
+ 'CreateGlobalForward',
331
+ 'CreateForward',
332
+ 'GetForwardFunctionCount',
333
+ 'AddToForward',
334
+ 'RemoveFromForward',
335
+ 'RemoveAllFromForward',
336
+ 'Call_StartForward',
337
+ 'Call_StartFunction',
338
+ 'Call_PushCell',
339
+ 'Call_PushCellRef',
340
+ 'Call_PushFloat',
341
+ 'Call_PushFloatRef',
342
+ 'Call_PushArray',
343
+ 'Call_PushArrayEx',
344
+ 'Call_PushString',
345
+ 'Call_PushStringEx',
346
+ 'Call_Finish',
347
+ 'Call_Cancel',
348
+ 'NativeCall',
349
+ 'CreateNative',
350
+ 'ThrowNativeError',
351
+ 'GetNativeStringLength',
352
+ 'GetNativeString',
353
+ 'SetNativeString',
354
+ 'GetNativeCell',
355
+ 'GetNativeCellRef',
356
+ 'SetNativeCellRef',
357
+ 'GetNativeArray',
358
+ 'SetNativeArray',
359
+ 'FormatNativeString',
360
+ 'OnRebuildAdminCache',
361
+ 'DumpAdminCache',
362
+ 'AddCommandOverride',
363
+ 'GetCommandOverride',
364
+ 'UnsetCommandOverride',
365
+ 'CreateAdmGroup',
366
+ 'FindAdmGroup',
367
+ 'SetAdmGroupAddFlag',
368
+ 'GetAdmGroupAddFlag',
369
+ 'GetAdmGroupAddFlags',
370
+ 'SetAdmGroupImmuneFrom',
371
+ 'GetAdmGroupImmuneCount',
372
+ 'GetAdmGroupImmuneFrom',
373
+ 'AddAdmGroupCmdOverride',
374
+ 'GetAdmGroupCmdOverride',
375
+ 'RegisterAuthIdentType',
376
+ 'CreateAdmin',
377
+ 'GetAdminUsername',
378
+ 'BindAdminIdentity',
379
+ 'SetAdminFlag',
380
+ 'GetAdminFlag',
381
+ 'GetAdminFlags',
382
+ 'AdminInheritGroup',
383
+ 'GetAdminGroupCount',
384
+ 'GetAdminGroup',
385
+ 'SetAdminPassword',
386
+ 'GetAdminPassword',
387
+ 'FindAdminByIdentity',
388
+ 'RemoveAdmin',
389
+ 'FlagBitsToBitArray',
390
+ 'FlagBitArrayToBits',
391
+ 'FlagArrayToBits',
392
+ 'FlagBitsToArray',
393
+ 'FindFlagByName',
394
+ 'FindFlagByChar',
395
+ 'FindFlagChar',
396
+ 'ReadFlagString',
397
+ 'CanAdminTarget',
398
+ 'CreateAuthMethod',
399
+ 'SetAdmGroupImmunityLevel',
400
+ 'GetAdmGroupImmunityLevel',
401
+ 'SetAdminImmunityLevel',
402
+ 'GetAdminImmunityLevel',
403
+ 'FlagToBit',
404
+ 'BitToFlag',
405
+ 'ServerCommand',
406
+ 'ServerCommandEx',
407
+ 'InsertServerCommand',
408
+ 'ServerExecute',
409
+ 'ClientCommand',
410
+ 'FakeClientCommand',
411
+ 'FakeClientCommandEx',
412
+ 'PrintToServer',
413
+ 'PrintToConsole',
414
+ 'ReplyToCommand',
415
+ 'GetCmdReplySource',
416
+ 'SetCmdReplySource',
417
+ 'IsChatTrigger',
418
+ 'ShowActivity2',
419
+ 'ShowActivity',
420
+ 'ShowActivityEx',
421
+ 'FormatActivitySource',
422
+ 'SrvCmd',
423
+ 'RegServerCmd',
424
+ 'ConCmd',
425
+ 'RegConsoleCmd',
426
+ 'RegAdminCmd',
427
+ 'GetCmdArgs',
428
+ 'GetCmdArg',
429
+ 'GetCmdArgString',
430
+ 'CreateConVar',
431
+ 'FindConVar',
432
+ 'ConVarChanged',
433
+ 'HookConVarChange',
434
+ 'UnhookConVarChange',
435
+ 'GetConVarBool',
436
+ 'SetConVarBool',
437
+ 'GetConVarInt',
438
+ 'SetConVarInt',
439
+ 'GetConVarFloat',
440
+ 'SetConVarFloat',
441
+ 'GetConVarString',
442
+ 'SetConVarString',
443
+ 'ResetConVar',
444
+ 'GetConVarDefault',
445
+ 'GetConVarFlags',
446
+ 'SetConVarFlags',
447
+ 'GetConVarBounds',
448
+ 'SetConVarBounds',
449
+ 'GetConVarName',
450
+ 'QueryClientConVar',
451
+ 'GetCommandIterator',
452
+ 'ReadCommandIterator',
453
+ 'CheckCommandAccess',
454
+ 'CheckAccess',
455
+ 'IsValidConVarChar',
456
+ 'GetCommandFlags',
457
+ 'SetCommandFlags',
458
+ 'FindFirstConCommand',
459
+ 'FindNextConCommand',
460
+ 'SendConVarValue',
461
+ 'AddServerTag',
462
+ 'RemoveServerTag',
463
+ 'CommandListener',
464
+ 'AddCommandListener',
465
+ 'RemoveCommandListener',
466
+ 'TF2_IgnitePlayer',
467
+ 'TF2_RespawnPlayer',
468
+ 'TF2_RegeneratePlayer',
469
+ 'TF2_AddCondition',
470
+ 'TF2_RemoveCondition',
471
+ 'TF2_SetPlayerPowerPlay',
472
+ 'TF2_DisguisePlayer',
473
+ 'TF2_RemovePlayerDisguise',
474
+ 'TF2_StunPlayer',
475
+ 'TF2_MakeBleed',
476
+ 'TF2_GetResourceEntity',
477
+ 'TF2_GetClass',
478
+ 'TF2_CalcIsAttackCritical',
479
+ 'TF2_OnIsHolidayActive',
480
+ 'TF2_IsPlayerInDuel',
481
+ 'TF2_OnConditionAdded',
482
+ 'TF2_OnConditionRemoved',
483
+ 'TF2_OnWaitingForPlayersStart',
484
+ 'TF2_OnWaitingForPlayersEnd',
485
+ 'SQL_Connect',
486
+ 'SQL_DefConnect',
487
+ 'SQL_ConnectCustom',
488
+ 'SQLite_UseDatabase',
489
+ 'SQL_CheckConfig',
490
+ 'SQL_GetDriver',
491
+ 'SQL_ReadDriver',
492
+ 'SQL_GetDriverIdent',
493
+ 'SQL_GetDriverProduct',
494
+ 'SQL_GetAffectedRows',
495
+ 'SQL_GetInsertId',
496
+ 'SQL_GetError',
497
+ 'SQL_EscapeString',
498
+ 'SQL_QuoteString',
499
+ 'SQL_FastQuery',
500
+ 'SQL_Query',
501
+ 'SQL_PrepareQuery',
502
+ 'SQL_FetchMoreResults',
503
+ 'SQL_HasResultSet',
504
+ 'SQL_GetRowCount',
505
+ 'SQL_GetFieldCount',
506
+ 'SQL_FieldNumToName',
507
+ 'SQL_FieldNameToNum',
508
+ 'SQL_FetchRow',
509
+ 'SQL_MoreRows',
510
+ 'SQL_Rewind',
511
+ 'SQL_FetchString',
512
+ 'SQL_FetchFloat',
513
+ 'SQL_FetchInt',
514
+ 'SQL_IsFieldNull',
515
+ 'SQL_FetchSize',
516
+ 'SQL_BindParamInt',
517
+ 'SQL_BindParamFloat',
518
+ 'SQL_BindParamString',
519
+ 'SQL_Execute',
520
+ 'SQL_LockDatabase',
521
+ 'SQL_UnlockDatabase',
522
+ 'SQLTCallback',
523
+ 'SQL_IsSameConnection',
524
+ 'SQL_TConnect',
525
+ 'SQL_TQuery',
526
+ 'CloseHandle',
527
+ 'CloneHandle',
528
+ 'MenuHandler',
529
+ 'CreateMenu',
530
+ 'DisplayMenu',
531
+ 'DisplayMenuAtItem',
532
+ 'AddMenuItem',
533
+ 'InsertMenuItem',
534
+ 'RemoveMenuItem',
535
+ 'RemoveAllMenuItems',
536
+ 'GetMenuItem',
537
+ 'GetMenuSelectionPosition',
538
+ 'GetMenuItemCount',
539
+ 'SetMenuPagination',
540
+ 'GetMenuPagination',
541
+ 'GetMenuStyle',
542
+ 'SetMenuTitle',
543
+ 'GetMenuTitle',
544
+ 'CreatePanelFromMenu',
545
+ 'GetMenuExitButton',
546
+ 'SetMenuExitButton',
547
+ 'GetMenuExitBackButton',
548
+ 'SetMenuExitBackButton',
549
+ 'SetMenuNoVoteButton',
550
+ 'CancelMenu',
551
+ 'GetMenuOptionFlags',
552
+ 'SetMenuOptionFlags',
553
+ 'IsVoteInProgress',
554
+ 'CancelVote',
555
+ 'VoteMenu',
556
+ 'VoteMenuToAll',
557
+ 'VoteHandler',
558
+ 'SetVoteResultCallback',
559
+ 'CheckVoteDelay',
560
+ 'IsClientInVotePool',
561
+ 'RedrawClientVoteMenu',
562
+ 'GetMenuStyleHandle',
563
+ 'CreatePanel',
564
+ 'CreateMenuEx',
565
+ 'GetClientMenu',
566
+ 'CancelClientMenu',
567
+ 'GetMaxPageItems',
568
+ 'GetPanelStyle',
569
+ 'SetPanelTitle',
570
+ 'DrawPanelItem',
571
+ 'DrawPanelText',
572
+ 'CanPanelDrawFlags',
573
+ 'SetPanelKeys',
574
+ 'SendPanelToClient',
575
+ 'GetPanelTextRemaining',
576
+ 'GetPanelCurrentKey',
577
+ 'SetPanelCurrentKey',
578
+ 'RedrawMenuItem',
579
+ 'InternalShowMenu',
580
+ 'GetMenuVoteInfo',
581
+ 'IsNewVoteAllowed',
582
+ 'PrefetchSound',
583
+ 'EmitAmbientSound',
584
+ 'FadeClientVolume',
585
+ 'StopSound',
586
+ 'EmitSound',
587
+ 'EmitSentence',
588
+ 'GetDistGainFromSoundLevel',
589
+ 'AmbientSHook',
590
+ 'NormalSHook',
591
+ 'AddAmbientSoundHook',
592
+ 'AddNormalSoundHook',
593
+ 'RemoveAmbientSoundHook',
594
+ 'RemoveNormalSoundHook',
595
+ 'EmitSoundToClient',
596
+ 'EmitSoundToAll',
597
+ 'ATTN_TO_SNDLEVEL',
598
+ 'strlen',
599
+ 'StrContains',
600
+ 'strcmp',
601
+ 'strncmp',
602
+ 'StrEqual',
603
+ 'strcopy',
604
+ 'Format',
605
+ 'FormatEx',
606
+ 'VFormat',
607
+ 'StringToInt',
608
+ 'StringToIntEx',
609
+ 'IntToString',
610
+ 'StringToFloat',
611
+ 'StringToFloatEx',
612
+ 'FloatToString',
613
+ 'BreakString',
614
+ 'TrimString',
615
+ 'SplitString',
616
+ 'ReplaceString',
617
+ 'ReplaceStringEx',
618
+ 'GetCharBytes',
619
+ 'IsCharAlpha',
620
+ 'IsCharNumeric',
621
+ 'IsCharSpace',
622
+ 'IsCharMB',
623
+ 'IsCharUpper',
624
+ 'IsCharLower',
625
+ 'StripQuotes',
626
+ 'CharToUpper',
627
+ 'CharToLower',
628
+ 'FindCharInString',
629
+ 'StrCat',
630
+ 'ExplodeString',
631
+ 'ImplodeStrings',
632
+ 'GetVectorLength',
633
+ 'GetVectorDistance',
634
+ 'GetVectorDotProduct',
635
+ 'GetVectorCrossProduct',
636
+ 'NormalizeVector',
637
+ 'GetAngleVectors',
638
+ 'GetVectorAngles',
639
+ 'GetVectorVectors',
640
+ 'AddVectors',
641
+ 'SubtractVectors',
642
+ 'ScaleVector',
643
+ 'NegateVector',
644
+ 'MakeVectorFromPoints',
645
+ 'BaseComm_IsClientGagged',
646
+ 'BaseComm_IsClientMuted',
647
+ 'BaseComm_SetClientGag',
648
+ 'BaseComm_SetClientMute',
649
+ 'FormatUserLogText',
650
+ 'FindPluginByFile',
651
+ 'FindTarget',
652
+ 'AcceptEntityInput',
653
+ 'SetVariantBool',
654
+ 'SetVariantString',
655
+ 'SetVariantInt',
656
+ 'SetVariantFloat',
657
+ 'SetVariantVector3D',
658
+ 'SetVariantPosVector3D',
659
+ 'SetVariantColor',
660
+ 'SetVariantEntity',
661
+ 'GameRules_GetProp',
662
+ 'GameRules_SetProp',
663
+ 'GameRules_GetPropFloat',
664
+ 'GameRules_SetPropFloat',
665
+ 'GameRules_GetPropEnt',
666
+ 'GameRules_SetPropEnt',
667
+ 'GameRules_GetPropVector',
668
+ 'GameRules_SetPropVector',
669
+ 'GameRules_GetPropString',
670
+ 'GameRules_SetPropString',
671
+ 'GameRules_GetRoundState',
672
+ 'OnClientConnect',
673
+ 'OnClientConnected',
674
+ 'OnClientPutInServer',
675
+ 'OnClientDisconnect',
676
+ 'OnClientDisconnect_Post',
677
+ 'OnClientCommand',
678
+ 'OnClientSettingsChanged',
679
+ 'OnClientAuthorized',
680
+ 'OnClientPreAdminCheck',
681
+ 'OnClientPostAdminFilter',
682
+ 'OnClientPostAdminCheck',
683
+ 'GetMaxClients',
684
+ 'GetClientCount',
685
+ 'GetClientName',
686
+ 'GetClientIP',
687
+ 'GetClientAuthString',
688
+ 'GetClientUserId',
689
+ 'IsClientConnected',
690
+ 'IsClientInGame',
691
+ 'IsClientInKickQueue',
692
+ 'IsClientAuthorized',
693
+ 'IsFakeClient',
694
+ 'IsClientSourceTV',
695
+ 'IsClientReplay',
696
+ 'IsClientObserver',
697
+ 'IsPlayerAlive',
698
+ 'GetClientInfo',
699
+ 'GetClientTeam',
700
+ 'SetUserAdmin',
701
+ 'GetUserAdmin',
702
+ 'AddUserFlags',
703
+ 'RemoveUserFlags',
704
+ 'SetUserFlagBits',
705
+ 'GetUserFlagBits',
706
+ 'CanUserTarget',
707
+ 'RunAdminCacheChecks',
708
+ 'NotifyPostAdminCheck',
709
+ 'CreateFakeClient',
710
+ 'SetFakeClientConVar',
711
+ 'GetClientHealth',
712
+ 'GetClientModel',
713
+ 'GetClientWeapon',
714
+ 'GetClientMaxs',
715
+ 'GetClientMins',
716
+ 'GetClientAbsAngles',
717
+ 'GetClientAbsOrigin',
718
+ 'GetClientArmor',
719
+ 'GetClientDeaths',
720
+ 'GetClientFrags',
721
+ 'GetClientDataRate',
722
+ 'IsClientTimingOut',
723
+ 'GetClientTime',
724
+ 'GetClientLatency',
725
+ 'GetClientAvgLatency',
726
+ 'GetClientAvgLoss',
727
+ 'GetClientAvgChoke',
728
+ 'GetClientAvgData',
729
+ 'GetClientAvgPackets',
730
+ 'GetClientOfUserId',
731
+ 'KickClient',
732
+ 'KickClientEx',
733
+ 'ChangeClientTeam',
734
+ 'GetClientSerial',
735
+ 'GetClientFromSerial',
736
+ 'FindStringTable',
737
+ 'GetNumStringTables',
738
+ 'GetStringTableNumStrings',
739
+ 'GetStringTableMaxStrings',
740
+ 'GetStringTableName',
741
+ 'FindStringIndex',
742
+ 'ReadStringTable',
743
+ 'GetStringTableDataLength',
744
+ 'GetStringTableData',
745
+ 'SetStringTableData',
746
+ 'AddToStringTable',
747
+ 'LockStringTables',
748
+ 'AddFileToDownloadsTable',
749
+ 'GetEntityFlags',
750
+ 'SetEntityFlags',
751
+ 'GetEntityMoveType',
752
+ 'SetEntityMoveType',
753
+ 'GetEntityRenderMode',
754
+ 'SetEntityRenderMode',
755
+ 'GetEntityRenderFx',
756
+ 'SetEntityRenderFx',
757
+ 'SetEntityRenderColor',
758
+ 'GetEntityGravity',
759
+ 'SetEntityGravity',
760
+ 'SetEntityHealth',
761
+ 'GetClientButtons',
762
+ 'EntityOutput',
763
+ 'HookEntityOutput',
764
+ 'UnhookEntityOutput',
765
+ 'HookSingleEntityOutput',
766
+ 'UnhookSingleEntityOutput',
767
+ 'SMC_CreateParser',
768
+ 'SMC_ParseFile',
769
+ 'SMC_GetErrorString',
770
+ 'SMC_ParseStart',
771
+ 'SMC_SetParseStart',
772
+ 'SMC_ParseEnd',
773
+ 'SMC_SetParseEnd',
774
+ 'SMC_NewSection',
775
+ 'SMC_KeyValue',
776
+ 'SMC_EndSection',
777
+ 'SMC_SetReaders',
778
+ 'SMC_RawLine',
779
+ 'SMC_SetRawLine',
780
+ 'BfWriteBool',
781
+ 'BfWriteByte',
782
+ 'BfWriteChar',
783
+ 'BfWriteShort',
784
+ 'BfWriteWord',
785
+ 'BfWriteNum',
786
+ 'BfWriteFloat',
787
+ 'BfWriteString',
788
+ 'BfWriteEntity',
789
+ 'BfWriteAngle',
790
+ 'BfWriteCoord',
791
+ 'BfWriteVecCoord',
792
+ 'BfWriteVecNormal',
793
+ 'BfWriteAngles',
794
+ 'BfReadBool',
795
+ 'BfReadByte',
796
+ 'BfReadChar',
797
+ 'BfReadShort',
798
+ 'BfReadWord',
799
+ 'BfReadNum',
800
+ 'BfReadFloat',
801
+ 'BfReadString',
802
+ 'BfReadEntity',
803
+ 'BfReadAngle',
804
+ 'BfReadCoord',
805
+ 'BfReadVecCoord',
806
+ 'BfReadVecNormal',
807
+ 'BfReadAngles',
808
+ 'BfGetNumBytesLeft',
809
+ 'CreateProfiler',
810
+ 'StartProfiling',
811
+ 'StopProfiling',
812
+ 'GetProfilerTime',
813
+ 'OnPluginStart',
814
+ 'AskPluginLoad2',
815
+ 'OnPluginEnd',
816
+ 'OnPluginPauseChange',
817
+ 'OnGameFrame',
818
+ 'OnMapStart',
819
+ 'OnMapEnd',
820
+ 'OnConfigsExecuted',
821
+ 'OnAutoConfigsBuffered',
822
+ 'OnAllPluginsLoaded',
823
+ 'GetMyHandle',
824
+ 'GetPluginIterator',
825
+ 'MorePlugins',
826
+ 'ReadPlugin',
827
+ 'GetPluginStatus',
828
+ 'GetPluginFilename',
829
+ 'IsPluginDebugging',
830
+ 'GetPluginInfo',
831
+ 'FindPluginByNumber',
832
+ 'SetFailState',
833
+ 'ThrowError',
834
+ 'GetTime',
835
+ 'FormatTime',
836
+ 'LoadGameConfigFile',
837
+ 'GameConfGetOffset',
838
+ 'GameConfGetKeyValue',
839
+ 'GetSysTickCount',
840
+ 'AutoExecConfig',
841
+ 'RegPluginLibrary',
842
+ 'LibraryExists',
843
+ 'GetExtensionFileStatus',
844
+ 'OnLibraryAdded',
845
+ 'OnLibraryRemoved',
846
+ 'ReadMapList',
847
+ 'SetMapListCompatBind',
848
+ 'OnClientFloodCheck',
849
+ 'OnClientFloodResult',
850
+ 'CanTestFeatures',
851
+ 'GetFeatureStatus',
852
+ 'RequireFeature',
853
+ 'LoadFromAddress',
854
+ 'StoreToAddress',
855
+ 'CreateStack',
856
+ 'PushStackCell',
857
+ 'PushStackString',
858
+ 'PushStackArray',
859
+ 'PopStackCell',
860
+ 'PopStackString',
861
+ 'PopStackArray',
862
+ 'IsStackEmpty',
863
+ 'PopStack',
864
+ 'OnPlayerRunCmd',
865
+ 'BuildPath',
866
+ 'OpenDirectory',
867
+ 'ReadDirEntry',
868
+ 'OpenFile',
869
+ 'DeleteFile',
870
+ 'ReadFileLine',
871
+ 'ReadFile',
872
+ 'ReadFileString',
873
+ 'WriteFile',
874
+ 'WriteFileString',
875
+ 'WriteFileLine',
876
+ 'ReadFileCell',
877
+ 'WriteFileCell',
878
+ 'IsEndOfFile',
879
+ 'FileSeek',
880
+ 'FilePosition',
881
+ 'FileExists',
882
+ 'RenameFile',
883
+ 'DirExists',
884
+ 'FileSize',
885
+ 'FlushFile',
886
+ 'RemoveDir',
887
+ 'CreateDirectory',
888
+ 'GetFileTime',
889
+ 'LogToOpenFile',
890
+ 'LogToOpenFileEx',
891
+ 'SetNextMap',
892
+ 'GetNextMap',
893
+ 'ForceChangeLevel',
894
+ 'GetMapHistorySize',
895
+ 'GetMapHistory',
896
+ 'GeoipCode2',
897
+ 'GeoipCode3',
898
+ 'GeoipCountry',
899
+ 'MarkNativeAsOptional',
900
+ 'RegClientCookie',
901
+ 'FindClientCookie',
902
+ 'SetClientCookie',
903
+ 'GetClientCookie',
904
+ 'SetAuthIdCookie',
905
+ 'AreClientCookiesCached',
906
+ 'OnClientCookiesCached',
907
+ 'CookieMenuHandler',
908
+ 'SetCookiePrefabMenu',
909
+ 'SetCookieMenuItem',
910
+ 'ShowCookieMenu',
911
+ 'GetCookieIterator',
912
+ 'ReadCookieIterator',
913
+ 'GetCookieAccess',
914
+ 'GetClientCookieTime',
915
+ 'LoadTranslations',
916
+ 'SetGlobalTransTarget',
917
+ 'GetClientLanguage',
918
+ 'GetServerLanguage',
919
+ 'GetLanguageCount',
920
+ 'GetLanguageInfo',
921
+ 'SetClientLanguage',
922
+ 'GetLanguageByCode',
923
+ 'GetLanguageByName',
924
+ 'CS_OnBuyCommand',
925
+ 'CS_OnCSWeaponDrop',
926
+ 'CS_OnGetWeaponPrice',
927
+ 'CS_OnTerminateRound',
928
+ 'CS_RespawnPlayer',
929
+ 'CS_SwitchTeam',
930
+ 'CS_DropWeapon',
931
+ 'CS_TerminateRound',
932
+ 'CS_GetTranslatedWeaponAlias',
933
+ 'CS_GetWeaponPrice',
934
+ 'CS_GetClientClanTag',
935
+ 'CS_SetClientClanTag',
936
+ 'LogToGame',
937
+ 'SetRandomSeed',
938
+ 'GetRandomFloat',
939
+ 'GetRandomInt',
940
+ 'IsMapValid',
941
+ 'IsDedicatedServer',
942
+ 'GetEngineTime',
943
+ 'GetGameTime',
944
+ 'GetGameTickCount',
945
+ 'GetGameDescription',
946
+ 'GetGameFolderName',
947
+ 'GetCurrentMap',
948
+ 'PrecacheModel',
949
+ 'PrecacheSentenceFile',
950
+ 'PrecacheDecal',
951
+ 'PrecacheGeneric',
952
+ 'IsModelPrecached',
953
+ 'IsDecalPrecached',
954
+ 'IsGenericPrecached',
955
+ 'PrecacheSound',
956
+ 'IsSoundPrecached',
957
+ 'CreateDialog',
958
+ 'GuessSDKVersion',
959
+ 'PrintToChat',
960
+ 'PrintToChatAll',
961
+ 'PrintCenterText',
962
+ 'PrintCenterTextAll',
963
+ 'PrintHintText',
964
+ 'PrintHintTextToAll',
965
+ 'ShowVGUIPanel',
966
+ 'CreateHudSynchronizer',
967
+ 'SetHudTextParams',
968
+ 'SetHudTextParamsEx',
969
+ 'ShowSyncHudText',
970
+ 'ClearSyncHud',
971
+ 'ShowHudText',
972
+ 'ShowMOTDPanel',
973
+ 'DisplayAskConnectBox',
974
+ 'EntIndexToEntRef',
975
+ 'EntRefToEntIndex',
976
+ 'MakeCompatEntRef',
977
+ 'SetClientViewEntity',
978
+ 'SetLightStyle',
979
+ 'GetClientEyePosition',
980
+ 'CreateDataPack',
981
+ 'WritePackCell',
982
+ 'WritePackFloat',
983
+ 'WritePackString',
984
+ 'ReadPackCell',
985
+ 'ReadPackFloat',
986
+ 'ReadPackString',
987
+ 'ResetPack',
988
+ 'GetPackPosition',
989
+ 'SetPackPosition',
990
+ 'IsPackReadable',
991
+ 'LogMessage',
992
+ 'LogMessageEx',
993
+ 'LogToFile',
994
+ 'LogToFileEx',
995
+ 'LogAction',
996
+ 'LogError',
997
+ 'OnLogAction',
998
+ 'GameLogHook',
999
+ 'AddGameLogHook',
1000
+ 'RemoveGameLogHook',
1001
+ 'FindTeamByName',
1002
+ 'StartPrepSDKCall',
1003
+ 'PrepSDKCall_SetVirtual',
1004
+ 'PrepSDKCall_SetSignature',
1005
+ 'PrepSDKCall_SetFromConf',
1006
+ 'PrepSDKCall_SetReturnInfo',
1007
+ 'PrepSDKCall_AddParameter',
1008
+ 'EndPrepSDKCall',
1009
+ 'SDKCall']
1010
+
1011
+ if __name__ == '__main__':
1012
+ import pprint
1013
+ import re
1014
+ import sys
1015
+ import urllib
1016
+
1017
+ # urllib ends up wanting to import a module called 'math' -- if
1018
+ # pygments/lexers is in the path, this ends badly.
1019
+ for i in range(len(sys.path)-1, -1, -1):
1020
+ if sys.path[i].endswith('/lexers'):
1021
+ del sys.path[i]
1022
+
1023
+ def get_version():
1024
+ f = urllib.urlopen('http://docs.sourcemod.net/api/index.php')
1025
+ r = re.compile(r'SourceMod v\.<b>([\d\.]+)</td>')
1026
+ for line in f:
1027
+ m = r.search(line)
1028
+ if m is not None:
1029
+ return m.groups()[0]
1030
+
1031
+ def get_sm_functions():
1032
+ f = urllib.urlopen('http://docs.sourcemod.net/api/SMfuncs.js')
1033
+ r = re.compile(r'SMfunctions\[\d+\] = Array \("(?:public )?([^,]+)",".+"\);')
1034
+ functions = []
1035
+ for line in f:
1036
+ m = r.match(line)
1037
+ if m is not None:
1038
+ functions.append(m.groups()[0])
1039
+ return functions
1040
+
1041
+ def regenerate(filename, natives):
1042
+ f = open(filename)
1043
+ try:
1044
+ content = f.read()
1045
+ finally:
1046
+ f.close()
1047
+
1048
+ header = content[:content.find('FUNCTIONS = [')]
1049
+ footer = content[content.find("if __name__ == '__main__':"):]
1050
+
1051
+
1052
+ f = open(filename, 'w')
1053
+ f.write(header)
1054
+ f.write('FUNCTIONS = %s\n\n' % pprint.pformat(natives))
1055
+ f.write(footer)
1056
+ f.close()
1057
+
1058
+ def run():
1059
+ version = get_version()
1060
+ print '> Downloading function index for SourceMod %s' % version
1061
+ functions = get_sm_functions()
1062
+ print '> %d functions found:' % len(functions)
1063
+
1064
+ functionlist = []
1065
+ for full_function_name in functions:
1066
+ print '>> %s' % full_function_name
1067
+ functionlist.append(full_function_name)
1068
+
1069
+ regenerate(__file__, functionlist)
1070
+
1071
+
1072
+ run()