2010-03-31 20:27:09 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* =============================================================================
|
|
|
|
* SourcePawn GeSHi Syntax File
|
|
|
|
* Copyright (C) 2010 AlliedModders LLC
|
|
|
|
* INC parser originally by Zach "theY4Kman" Kanzler,
|
|
|
|
* ported to perl and enhanced by Nicholas "psychonic" Hastings
|
|
|
|
* =============================================================================
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it under
|
|
|
|
* the terms of the GNU General Public License, version 3.0, as published by the
|
|
|
|
* Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
|
|
* details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with
|
|
|
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
$language_data = array(
|
2010-04-19 17:08:23 +02:00
|
|
|
'LANG_NAME' => 'SourcePawn',
|
|
|
|
'COMMENT_SINGLE' => array(1 => '//'),
|
|
|
|
'COMMENT_MULTI' => array("/*" => "*/"),
|
|
|
|
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
|
|
|
|
'QUOTEMARKS' => array('"','\''),
|
|
|
|
'ESCAPE_CHAR' => '\\',
|
|
|
|
'ESCAPE_REGEXP' => array(
|
|
|
|
1 => "#\\\\x[\da-fA-F]{1,2}#",
|
|
|
|
2 => "#\\\\b[01]{1,8}#",
|
|
|
|
3 => "#%[%sdif%NLbxXtTc]#",
|
|
|
|
),
|
|
|
|
'SYMBOLS' => array(
|
|
|
|
0 => array(';'),
|
2010-03-31 20:27:09 +02:00
|
|
|
// Assignment operators
|
2010-04-19 17:08:23 +02:00
|
|
|
1 => array('=', '+=', '-=', '/=', '*=', '&=', '|=', '~=', '^='),
|
2010-03-31 20:27:09 +02:00
|
|
|
// Comparison and logical operators
|
2010-04-19 17:08:23 +02:00
|
|
|
2 => array('==', '!=', '&&', '||', '>', '<', '<=', '>='),
|
2010-03-31 20:27:09 +02:00
|
|
|
// Other operators
|
2010-04-19 17:08:23 +02:00
|
|
|
3 => array('+', '-', '*', '/', '|', '&', '~', '++', '--', '^', '%%', '!'),
|
2010-03-31 20:27:09 +02:00
|
|
|
),
|
2010-04-19 17:08:23 +02:00
|
|
|
'KEYWORDS' => array(
|
2010-03-31 20:27:09 +02:00
|
|
|
// Reserved words
|
|
|
|
1 => array(
|
2010-04-19 17:08:23 +02:00
|
|
|
'for', 'if', 'else', 'do', 'while', 'switch', 'case', 'return',
|
|
|
|
'break', 'continue', 'new', 'decl', 'public', 'stock', 'const',
|
|
|
|
'enum', 'forward', 'static', 'funcenum', 'functag', 'native',
|
2010-05-09 03:31:32 +02:00
|
|
|
'sizeof', 'true', 'false', 'default',
|
2010-03-31 20:27:09 +02:00
|
|
|
),
|
|
|
|
// Tags
|
|
|
|
2 => array(
|
2010-04-19 17:08:23 +02:00
|
|
|
'Action', 'bool', 'Float', 'Plugin', 'String', 'any',
|
2010-05-09 03:31:32 +02:00
|
|
|
'AdminFlag','OverrideType','OverrideRule','ImmunityType','GroupId','AdminId','AdmAccessMode','AdminCachePart','CookieAccess','CookieMenu','CookieMenuAction','NetFlow','ConVarBounds','QueryCookie','ReplySource','ConVarQueryResult','ConVarQueryFinished','Function','Action','Identity','PluginStatus','PluginInfo','DBResult','DBBindType','DBPriority','PropType','PropFieldType','MoveType','RenderMode','RenderFx','EventHookMode','EventHook','FileType','FileTimeMode','PathType','ParamType','ExecType','DialogType','Handle','KvDataTypes','NominateResult','MapChange','MenuStyle','MenuAction','MenuSource','RegexError','SDKCallType','SDKLibrary','SDKFuncConfSource','SDKType','SDKPassMethod','RayType','TraceEntityFilter','ListenOverride','SortOrder','SortType','SortFunc2D','APLRes','FeatureType','FeatureStatus','SMCResult','SMCError','TFClassType','TFTeam','TFCond','TFResourceType','Timer','TopMenuAction','TopMenuObjectType','TopMenuPosition','TopMenuObject','UserMsg',
|
2010-03-31 20:27:09 +02:00
|
|
|
),
|
|
|
|
// Natives
|
|
|
|
3 => array(
|
2010-05-09 03:31:32 +02:00
|
|
|
'DumpAdminCache','AddCommandOverride','GetCommandOverride','UnsetCommandOverride','CreateAdmGroup','FindAdmGroup','SetAdmGroupAddFlag','GetAdmGroupAddFlag','GetAdmGroupAddFlags','SetAdmGroupImmunity','GetAdmGroupImmunity','SetAdmGroupImmuneFrom','GetAdmGroupImmuneCount','GetAdmGroupImmuneFrom','AddAdmGroupCmdOverride','GetAdmGroupCmdOverride','RegisterAuthIdentType','CreateAdmin','GetAdminUsername','BindAdminIdentity','SetAdminFlag','GetAdminFlag','GetAdminFlags','AdminInheritGroup','GetAdminGroupCount','GetAdminGroup','SetAdminPassword','GetAdminPassword','FindAdminByIdentity','RemoveAdmin','FlagBitsToBitArray','FlagBitArrayToBits','FlagArrayToBits','FlagBitsToArray','FindFlagByName','FindFlagByChar','ReadFlagString','CanAdminTarget','CreateAuthMethod','SetAdmGroupImmunityLevel','GetAdmGroupImmunityLevel','SetAdminImmunityLevel','GetAdminImmunityLevel','FlagToBit','BitToFlag','GetAdminTopMenu','AddTargetsToMenu','AddTargetsToMenu2','RedisplayAdminMenu','CreateArray','ClearArray','CloneArray','ResizeArray','GetArraySize','PushArrayCell','PushArrayString','PushArrayArray','GetArrayCell','GetArrayString','GetArrayArray','SetArrayCell','SetArrayString','SetArrayArray','ShiftArrayUp','RemoveFromArray','SwapArrayItems','FindStringInArray','FindValueInArray','ByteCountToCells','CreateStack','PushStackCell','PushStackString','PushStackArray','PopStackCell','PopStackString','PopStackArray','IsStackEmpty','PopStack','CreateTrie','SetTrieValue','SetTrieArray','SetTrieString','GetTrieValue','GetTrieArray','GetTrieString','RemoveFromTrie','ClearTrie','GetTrieSize','BanClient','BanIdentity','RemoveBan','BfWriteBool','BfWriteByte','BfWriteChar','BfWriteShort','BfWriteWord','BfWriteNum','BfWriteFloat','BfWriteString','BfWriteEntity','BfWriteAngle','BfWriteCoord','BfWriteVecCoord','BfWriteVecNormal','BfWriteAngles','BfReadBool','BfReadByte','BfReadChar','BfReadShort','BfReadWord','BfReadNum','BfReadFloat','BfReadString','BfReadEntity','BfReadAngle','BfReadCoord','BfReadVecCoord','BfReadVecNormal','BfReadAngles','BfGetNumBytesLeft','RegClientCookie','FindClientCookie','SetClientCookie','GetClientCookie','AreClientCookiesCached','SetCookiePrefabMenu','SetCookieMenuItem','ShowCookieMenu','GetCookieIterator','ReadCookieIterator','GetCookieAccess','GetClientCookieTime','GetMaxClients','GetClientCount','GetClientName','GetClientIP','GetClientAuthString','GetClientUserId','IsClientConnected','IsClientInGame','IsClientInKickQueue','IsClientAuthorized','IsFakeClient','IsClientObserver','IsPlayerAlive','GetClientInfo','GetClientTeam','SetUserAdmin','GetUserAdmin','AddUserFlags','RemoveUserFlags','SetUserFlagBits','GetUserFlagBits','CanUserTarget','RunAdminCacheChecks','NotifyPostAdminCheck','CreateFakeClient','SetFakeClientConVar','GetClientHealth','GetClientModel','GetClientWeapon','GetClientMaxs','GetClientMins','GetClientAbsAngles','GetClientAbsOrigin','GetClientArmor','GetClientDeaths','GetClientFrags','GetClientDataRate','IsClientTimingOut','GetClientTime','GetClientLatency','GetClientAvgLatency','GetClientAvgLoss','GetClientAvgChoke','GetClientAvgData','GetClientAvgPackets','GetClientOfUserId','KickClient','KickClientEx','ChangeClientTeam','GetClientSerial','GetClientFromSerial','IsPlayerInGame','ProcessTargetString','ReplyToTargetError','ServerCommand','InsertServerCommand','ServerExecute','ClientCommand','FakeClientCommand','FakeClientCommandEx','PrintToServer','PrintToConsole','ReplyToCommand','GetCmdReplySource','SetCmdReplySource','IsChatTrigger','ShowActivity2','ShowActivity','ShowActivityEx','FormatActivitySource','RegServerCmd','RegConsoleCmd','RegAdminCmd','GetCmdArgs','GetCmdArg','GetCmdArgString','CreateConVar','FindConVar','HookConVarChange','UnhookConVarChange','GetConVarBool','SetConVarBool','GetConVarInt','SetConVarInt','GetConVarFloat','SetConVarFloat','GetConVarString','SetConVarString','ResetConVar','GetConVarFlags','SetConVarFlags','GetConVarBounds','SetConVarBounds','GetConVarName','QueryClientConVar','GetCommandIterator','ReadCommandIterator','CheckCommandAccess','GetCommandFlags','SetCommandFlags','FindFirstConComm
|
2010-03-31 20:27:09 +02:00
|
|
|
),
|
|
|
|
// Forwards
|
|
|
|
4 => array(
|
2010-04-19 17:08:23 +02:00
|
|
|
'OnRebuildAdminCache','OnAdminMenuCreated','OnAdminMenuReady','OnBanClient','OnBanIdentity','OnRemoveBan','OnClientCookiesCached','OnClientConnect','OnClientConnected','OnClientPutInServer','OnClientDisconnect','OnClientDisconnect_Post','OnClientCommand','OnClientSettingsChanged','OnClientAuthorized','OnClientPreAdminCheck','OnClientPostAdminFilter','OnClientPostAdminCheck','OnLogAction','OnNominationRemoved','OnPlayerRunCmd','OnPluginStart','AskPluginLoad','AskPluginLoad2','OnPluginEnd','OnPluginPauseChange','OnGameFrame','OnMapStart','OnMapEnd','OnConfigsExecuted','OnAutoConfigsBuffered','OnServerCfg','OnAllPluginsLoaded','OnLibraryAdded','OnLibraryRemoved','OnClientFloodCheck','OnClientFloodResult','TF2_CalcIsAttackCritical','OnMapTimeLeftChanged',
|
2010-03-31 20:27:09 +02:00
|
|
|
),
|
|
|
|
// Defines
|
|
|
|
5 => array(
|
2010-04-19 17:08:23 +02:00
|
|
|
'MaxClients',
|
2010-05-09 03:31:32 +02:00
|
|
|
'AdminFlags_TOTAL','ADMFLAG_RESERVATION','ADMFLAG_GENERIC','ADMFLAG_KICK','ADMFLAG_BAN','ADMFLAG_UNBAN','ADMFLAG_SLAY','ADMFLAG_CHANGEMAP','ADMFLAG_CONVARS','ADMFLAG_CONFIG','ADMFLAG_CHAT','ADMFLAG_VOTE','ADMFLAG_PASSWORD','ADMFLAG_RCON','ADMFLAG_CHEATS','ADMFLAG_ROOT','ADMFLAG_CUSTOM1','ADMFLAG_CUSTOM2','ADMFLAG_CUSTOM3','ADMFLAG_CUSTOM4','ADMFLAG_CUSTOM5','ADMFLAG_CUSTOM6','AUTHMETHOD_STEAM','AUTHMETHOD_IP','AUTHMETHOD_NAME','Admin_Reservation','Admin_Generic','Admin_Kick','Admin_Ban','Admin_Unban','Admin_Slay','Admin_Changemap','Admin_Convars','Admin_Config','Admin_Chat','Admin_Vote','Admin_Password','Admin_RCON','Admin_Cheats','Admin_Root','Admin_Custom1','Admin_Custom2','Admin_Custom3','Admin_Custom4','Admin_Custom5','Admin_Custom6','Override_Command','Override_CommandGroup','Command_Deny','Command_Allow','Immunity_Default','Immunity_Global','INVALID_GROUP_ID','INVALID_ADMIN_ID','Access_Real','Access_Effective','AdminCache_Overrides','AdminCache_Groups','AdminCache_Admins','TEMP_REQUIRE_EXTENSIONS','REQUIRE_EXTENSIONS','ADMINMENU_PLAYERCOMMANDS','ADMINMENU_SERVERCOMMANDS','ADMINMENU_VOTINGCOMMANDS','BANFLAG_AUTO','BANFLAG_IP','BANFLAG_AUTHID','BANFLAG_NOKICK','CookieAccess_Public','CookieAccess_Protected','CookieAccess_Private','CookieMenu_YesNo','CookieMenu_YesNo_Int','CookieMenu_OnOff','CookieMenu_OnOff_Int','CookieMenuAction_DisplayOption','CookieMenuAction_SelectOption','MAXPLAYERS','MAX_NAME_LENGTH','NetFlow_Outgoing','NetFlow_Incoming','NetFlow_Both','MAX_TARGET_LENGTH','COMMAND_FILTER_ALIVE','COMMAND_FILTER_DEAD','COMMAND_FILTER_CONNECTED','COMMAND_FILTER_NO_IMMUNITY','COMMAND_FILTER_NO_MULTI','COMMAND_FILTER_NO_BOTS','COMMAND_TARGET_NONE','COMMAND_TARGET_NOT_ALIVE','COMMAND_TARGET_NOT_DEAD','COMMAND_TARGET_NOT_IN_GAME','COMMAND_TARGET_IMMUNE','COMMAND_TARGET_EMPTY_FILTER','COMMAND_TARGET_NOT_HUMAN','COMMAND_TARGET_AMBIGUOUS','INVALID_FCVAR_FLAGS','FCVAR_NONE','FCVAR_UNREGISTERED','FCVAR_LAUNCHER','FCVAR_GAMEDLL','FCVAR_CLIENTDLL','FCVAR_MATERIAL_SYSTEM','FCVAR_PROTECTED','FCVAR_SPONLY','FCVAR_ARCHIVE','FCVAR_NOTIFY','FCVAR_USERINFO','FCVAR_PRINTABLEONLY','FCVAR_UNLOGGED','FCVAR_NEVER_AS_STRING','FCVAR_REPLICATED','FCVAR_CHEAT','FCVAR_STUDIORENDER','FCVAR_DEMO','FCVAR_DONTRECORD','FCVAR_PLUGIN','FCVAR_DATACACHE','FCVAR_TOOLSYSTEM','FCVAR_FILESYSTEM','FCVAR_NOT_CONNECTED','FCVAR_SOUNDSYSTEM','FCVAR_ARCHIVE_XBOX','FCVAR_INPUTSYSTEM','FCVAR_NETWORKSYSTEM','FCVAR_VPHYSICS','FEATURECAP_COMMANDLISTENER','ConVarBound_Upper','ConVarBound_Lower','QUERYCOOKIE_FAILED','SM_REPLY_TO_CONSOLE','SM_REPLY_TO_CHAT','ConVarQuery_Okay','ConVarQuery_NotFound','ConVarQuery_NotValid','ConVarQuery_Protected','SOURCEMOD_PLUGINAPI_VERSION','AUTOLOAD_EXTENSIONS','REQUIRE_EXTENSIONS','REQUIRE_PLUGIN','INVALID_FUNCTION','Plugin_Continue','Plugin_Changed','Plugin_Handled','Plugin_Stop','Identity_Core','Identity_Extension','Identity_Plugin','Plugin_Running','Plugin_Paused','Plugin_Error','Plugin_Loaded','Plugin_Failed','Plugin_Created','Plugin_Uncompiled','Plugin_BadLoad','PlInfo_Name','PlInfo_Author','PlInfo_Description','PlInfo_Version','PlInfo_URL','CS_TEAM_NONE','CS_TEAM_SPECTATOR','CS_TEAM_T','CS_TEAM_CT','CS_SLOT_PRIMARY','CS_SLOT_SECONDARY','CS_SLOT_GRENADE','CS_SLOT_C4','DBVal_Error','DBVal_TypeMismatch','DBVal_Null','DBVal_Data','DBBind_Int','DBBind_Float','DBBind_String','DBPrio_High','DBPrio_Normal','DBPrio_Low','FL_EDICT_CHANGED','FL_EDICT_FREE','FL_EDICT_FULL','FL_EDICT_FULLCHECK','FL_EDICT_ALWAYS','FL_EDICT_DONTSEND','FL_EDICT_PVSCHECK','FL_EDICT_PENDING_DORMANT_CHECK','FL_EDICT_DIRTY_PVS_INFORMATION','FL_FULL_EDICT_CHANGED','Prop_Send','Prop_Data','PropField_Unsupported','PropField_Integer','PropField_Float','PropField_Entity','PropField_Vector','PropField_String','PropField_String_T','IN_ATTACK','IN_JUMP','IN_DUCK','IN_FORWARD','IN_BACK','IN_USE','IN_CANCEL','IN_LEFT','IN_RIGHT','IN_MOVELEFT','IN_MOVERIGHT','IN_ATTACK2','IN_RUN','IN_RELOAD','IN_ALT1','IN_ALT2','IN_SCORE','IN_SPEED','IN_WALK','IN_ZOOM','IN_WEAPON1','IN_WEAPON2','IN_BULLRUSH','IN_GRENADE1','IN_GRENADE2','FL_ONGROUND','FL_DUCKING','FL_WATERJUMP','FL_ONTRAI
|
2010-04-19 17:08:23 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
'NUMBERS' => array(
|
|
|
|
GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_FLT_NONSCI | GESHI_NUMBER_BIN_PREFIX_0B | GESHI_NUMBER_HEX_PREFIX
|
|
|
|
),
|
|
|
|
'TAB_WIDTH' => 4,
|
|
|
|
'CASE_SENSITIVE' => array(
|
|
|
|
1 => true,
|
|
|
|
2 => true,
|
|
|
|
3 => true,
|
|
|
|
4 => true,
|
|
|
|
5 => true
|
|
|
|
),
|
|
|
|
'REGEXPS' => array(
|
|
|
|
0 => array(
|
|
|
|
GESHI_SEARCH => '(#include\s+)(<\w+>)',
|
|
|
|
GESHI_REPLACE => '\\2',
|
|
|
|
GESHI_BEFORE => '\\1',
|
|
|
|
),
|
|
|
|
1 => array(
|
|
|
|
GESHI_SEARCH => '(#\w+)(\s+)',
|
|
|
|
GESHI_REPLACE => '\\1',
|
|
|
|
GESHI_AFTER => '\\2'
|
2010-03-31 20:27:09 +02:00
|
|
|
),
|
|
|
|
),
|
2010-04-19 17:08:23 +02:00
|
|
|
'STYLES' => array(
|
|
|
|
'KEYWORDS' => array(
|
|
|
|
1 => 'color: #0000EE; font-weight: bold;',
|
|
|
|
2 => 'color: #218087; font-weight: bold;',
|
|
|
|
3 => 'color: #000040;',
|
|
|
|
4 => 'color: #000040;',
|
|
|
|
5 => 'color: #8000FF;',
|
2010-03-31 20:27:09 +02:00
|
|
|
),
|
2010-04-19 17:08:23 +02:00
|
|
|
'COMMENTS' => array(
|
|
|
|
1 => 'color: #006600; font-style: italic;',
|
|
|
|
'MULTI' => 'color: #006600; font-style: italic;',
|
2010-03-31 20:27:09 +02:00
|
|
|
),
|
2010-04-19 17:08:23 +02:00
|
|
|
'ESCAPE_CHAR' => array(
|
|
|
|
0 => 'color: #ff00ff;',
|
|
|
|
1 => 'color: #ff00ff;',
|
|
|
|
2 => 'color: #ff00ff;',
|
|
|
|
3 => 'color: #ff00ff;',
|
2010-03-31 20:27:09 +02:00
|
|
|
),
|
2010-04-19 17:08:23 +02:00
|
|
|
'SYMBOLS' => array(
|
|
|
|
0 => 'color: #1B5B00; font-weight: bold;',
|
|
|
|
1 => 'color: #1B5B00;',
|
|
|
|
2 => 'color: #1B5B00;',
|
|
|
|
3 => 'color: #1B5B00;',
|
2010-03-31 20:27:09 +02:00
|
|
|
),
|
2010-04-19 17:08:23 +02:00
|
|
|
'STRINGS' => array(
|
|
|
|
0 => 'color: #B90000;',
|
2010-03-31 20:27:09 +02:00
|
|
|
),
|
2010-04-19 17:08:23 +02:00
|
|
|
'BRACKETS' => array(
|
|
|
|
0 => 'color: #1B5B00; font-weight: bold;',
|
2010-03-31 20:27:09 +02:00
|
|
|
),
|
2010-04-19 17:08:23 +02:00
|
|
|
'NUMBERS' => array(
|
|
|
|
0 => 'color: #AE5700;',
|
2010-03-31 20:27:09 +02:00
|
|
|
),
|
2010-04-19 17:08:23 +02:00
|
|
|
'REGEXPS' => array(
|
|
|
|
0 => 'color: #B90000;',
|
|
|
|
1 => 'color: #0000aa;'
|
|
|
|
)
|
2010-03-31 20:27:09 +02:00
|
|
|
),
|
|
|
|
);
|
|
|
|
|
|
|
|
?>
|