1 # Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved.
2 # This program is free software; you can redistribute it and/or
3 # modify it under the same terms as Perl itself.
5 # This file was generated from the 'idconsole.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
10 #generated: Sun Feb 3 22:02:06 2008, localtime
12 package Syntax::Highlight::Engine::Kate::Quake_Script;
14 our $VERSION = '0.06';
18 use base('Syntax::Highlight::Engine::Kate::Template');
22 my $class = ref($proto) || $proto;
23 my $self = $class->SUPER::new(@_);
25 'Action' => 'Reserved',
26 'Command' => 'Keyword',
27 'Comment' => 'Comment',
30 'Identifier' => 'DataType',
32 'Normal Text' => 'Normal',
34 'String Char' => 'Char',
36 'Variable' => 'Variable',
38 $self->listAdd('Actions',
166 $self->listAdd('BindFamily',
170 $self->listAdd('Commands',
175 '_vid_default_mode_win',
176 '_vid_wait_override',
183 'allow_download_maps',
184 'allow_download_models',
185 'allow_download_skins',
186 'allow_download_sounds',
228 'cl_predict_players',
308 'gameCompleteStatus',
324 'gl_dlight_lightmap',
325 'gl_dlight_polyblend',
342 'gl_reportjunctions',
388 'joy_advancedupdate',
614 'spectator_password',
643 'sv_spectatormaxspeed',
687 'vid_describecurrentmode',
693 'vid_fullscreen_mode',
721 'windowsr_drawentities',
728 $self->listAdd('KeyTypes',
864 $self->listAdd('PrintsString',
869 $self->listAdd('Symbols',
873 $self->listAdd('Variables',
881 '_config_modem_clear',
882 '_config_modem_dialtype',
883 '_config_modem_hangup',
884 '_config_modem_init',
887 '_vid_default_mode_win',
888 '_vid_wait_override',
911 'allow_download_players',
937 'bot_forceclustering',
938 'bot_forcereachability',
942 'bot_interbreedbots',
943 'bot_interbreedchar',
944 'bot_interbreedcycle',
945 'bot_interbreedwrite',
952 'bot_reloadcharacters',
955 'bot_saveroutingcache',
961 'bot_visualizejumppads',
981 'cg_cameraOrbitDelay',
986 'cg_crosshairHealth',
990 'cg_currentSelectedPlayer',
991 'cg_currentSelectedPlayerName',
995 'cg_descriptiveText',
999 'cg_drawAmmoWarning',
1003 'cg_drawCrosshairNames',
1004 'cg_drawCrosshairPickups',
1010 'cg_drawNotifyText',
1013 'cg_drawSpreadScale',
1015 'cg_drawTeamOverlay',
1033 'cg_popupLimboMenu',
1035 'cg_quickMessageAlt',
1038 'cg_reticleBrightness',
1043 'cg_selectedPlayer',
1044 'cg_selectedPlayerName',
1049 'cg_stereoSeparation',
1050 'cg_teamChatHeight',
1053 'cg_thirdPersonAngle',
1055 'cg_thirdpersonrange',
1056 'cg_useWeapsForZoom',
1057 'cg_uselessNostalgia',
1059 'cg_voiceSpriteTime',
1060 'cg_weaponCycleDelay',
1062 'cg_zoomDefaultBinoc',
1064 'cg_zoomDefaultSniper',
1065 'cg_zoomDefaultSnooper',
1068 'cg_zoomStepSnooper',
1070 'cg_zoomstepsniper',
1088 'cl_bypassMouseInput',
1089 'cl_cacheGathering',
1090 'cl_camera_maxpitch',
1098 'cl_cshift_content',
1100 'cl_cshift_powerup',
1102 'cl_debugTranslation',
1129 'cl_observercrosshair',
1136 'cl_predict_players',
1137 'cl_predict_players2',
1143 'cl_serverStatusResendTime',
1145 'cl_showServerCommands',
1155 'cl_stereo_separation',
1164 'cl_visibleClients',
1167 'cl_wavefilerecord',
1172 'cm_playerCurveClip',
1187 'com_recommendedSet',
1243 'forwardsensitivity',
1266 'g_altStopwatchMode',
1279 'g_noTeamSwitching',
1290 'g_userAlliedRespawnTime',
1291 'g_userAxisRespawnTime',
1303 'gl_allow_software',
1313 'gl_ext_compiled_vertex_array',
1314 'gl_ext_multitexture',
1315 'gl_ext_palettedtexture',
1316 'gl_ext_pointparameters',
1317 'gl_ext_swapinterval',
1320 'gl_keeptjunctions',
1322 'gl_lightmap_align',
1323 'gl_lightmap_subimage',
1335 'gl_particle_att_a',
1336 'gl_particle_att_b',
1337 'gl_particle_att_c',
1338 'gl_particle_max_size',
1339 'gl_particle_min_size',
1345 'gl_reporttjunctions',
1347 'gl_saturatelighting',
1348 'gl_screenshot_byte_swap',
1355 'gl_subdivide_size',
1358 'gl_texturealphamode',
1360 'gl_texturesolidmode',
1388 'in_dga_mouseaccel',
1417 'joy_forwardsensitivity',
1418 'joy_forwardthreshold',
1420 'joy_pitchsensitivity',
1421 'joy_pitchthreshold',
1424 'joy_sidesensitivity',
1425 'joy_sidethreshold',
1427 'joy_upsensitivity',
1429 'joy_yawsensitivity',
1446 'joyforwardsensitivity',
1447 'joyforwardthreshold',
1449 'joypitchsensitivity',
1450 'joypitchthreshold',
1451 'joysidesensitivity',
1456 'joyyawsensitivity',
1505 'mp_autoteambalance',
1507 'mp_currentPlayerType',
1514 'mp_hostagepenalty',
1530 'net_messagetimeout',
1571 'pr_checkextensions',
1573 'pr_deadbeef_locals',
1586 'r_allowExtensions',
1587 'r_allowSoftwareGL',
1610 'r_dlight_lightmap',
1624 'r_exportCompressedModels',
1625 'r_ext_compiled_vertex_array',
1626 'r_ext_compress_textures',
1627 'r_ext_compressed_textures',
1628 'r_ext_gamma_control',
1629 'r_ext_multitexture',
1630 'r_ext_texture_env_add',
1642 'r_glIgnoreWicked3D',
1645 'r_highQualityVideo',
1652 'r_lastValidRenderer',
1655 'r_lightmap_components',
1661 'r_lowMemTextureSize',
1662 'r_lowMemTextureThreshold',
1663 'r_mapOverBrightBits',
1668 'r_measureOverdraw',
1685 'r_particles_style',
1690 'r_preloadTextures',
1691 'r_previousglDriver',
1695 'r_railSegmentLength',
1700 'r_roundImagesDown',
1836 'snd_noextraupdate',
1852 'spectator_password',
1857 'surfcacheoverride',
1862 'sv_allowAnonymous',
1871 'sv_idealpitchscale',
1893 'sv_onlyVisibleClients',
1899 'sv_privateClients',
1900 'sv_privatePassword',
1903 'sv_reconnect_limit',
1904 'sv_reconnectlimit',
1905 'sv_referencedPakNames',
1906 'sv_referencedPaks',
1912 'sv_showAverageBPS',
1919 'sv_timekick_interval',
1922 'sv_wateraccelerate',
1935 'sw_polymodelstats',
1939 'sw_surfcacheoverride',
1969 'ui_actualNetGametype',
1971 'ui_browserGameType',
1973 'ui_browserShowEmpty',
1974 'ui_browserShowFriendlyFire',
1975 'ui_browserShowFull',
1976 'ui_browserShowMaxlives',
1977 'ui_browserShowTourney',
1978 'ui_browserSortKey',
1982 'ui_ctf_capturelimit',
1995 'ui_limboObjective',
1997 'ui_limboPrevOptions',
2004 'ui_notebookCurrentPage',
2009 'ui_serverStatusTimeOut',
2010 'ui_singlePlayerActive',
2014 'ui_teamArenaFirstRun',
2015 'ui_team_fraglimit',
2017 'ui_team_timelimit',
2018 'ui_tourney_fraglimit',
2019 'ui_tourney_timelimit',
2020 'ui_userAlliedRespawnTime',
2021 'ui_userAxisRespawnTime',
2048 'vid_fullscreen_mode',
2060 'vid_windowed_mode',
2086 $self->listAdd('setFamily',
2092 $self->contextdata({
2094 callback => \&parseAliasphrase,
2095 attribute => 'Identifier',
2096 lineending => 'Normal Text',
2099 callback => \&parseArgarea,
2100 attribute => 'Normal Text',
2101 lineending => 'Normal Text',
2103 'Arg area in sub phrase' => {
2104 callback => \&parseArgareainsubphrase,
2105 attribute => 'Normal Text',
2106 lineending => 'Normal Text',
2109 callback => \&parseBindphrase,
2110 attribute => 'Normal Text',
2111 lineending => 'Normal Text',
2114 callback => \&parseComment,
2115 attribute => 'Comment',
2116 lineending => 'Normal Text',
2119 callback => \&parseEcho,
2120 attribute => 'String',
2121 lineending => 'Normal Text',
2124 callback => \&parseNormalText,
2125 attribute => 'Normal Text',
2128 callback => \&parseString,
2129 attribute => 'String',
2130 lineending => 'Normal Text',
2133 callback => \&parseSubphrase,
2134 attribute => 'Normal Text',
2135 lineending => 'Normal Text',
2138 $self->deliminators('\\s||\\(|\\)|:|\\!|<|>|\\%|\\&|\\*|;|\\?|\\^|\\{|\\||\\}|,|\\+|\\~|-|=|\\/|\\\\|\\.|\\[|\\]|\\$');
2139 $self->basecontext('Normal Text');
2140 $self->keywordscase(0);
2142 bless ($self, $class);
2147 return 'Quake Script';
2150 sub parseAliasphrase {
2151 my ($self, $text) = @_;
2152 # attribute => 'Identifier'
2154 # context => 'Sub phrase'
2155 # type => 'DetectChar'
2156 if ($self->testDetectChar($text, ' ', 0, 0, 0, undef, 0, 'Sub phrase', 'Identifier')) {
2163 my ($self, $text) = @_;
2164 # attribute => 'String'
2166 # context => 'String'
2167 # type => 'DetectChar'
2168 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
2171 # attribute => 'Float'
2172 # context => '#stay'
2174 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
2177 # attribute => 'Int'
2178 # context => '#stay'
2180 if ($self->testInt($text, 0, undef, 0, '#stay', 'Int')) {
2183 # attribute => 'Symbol'
2186 # type => 'DetectChar'
2187 if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'Symbol')) {
2190 # attribute => 'Comment'
2193 # context => 'Comment'
2194 # type => 'Detect2Chars'
2195 if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
2198 # attribute => 'Symbol'
2200 # context => 'Normal Text'
2201 # type => 'DetectChar'
2202 if ($self->testDetectChar($text, '$', 0, 0, 0, undef, 0, 'Normal Text', 'Symbol')) {
2208 sub parseArgareainsubphrase {
2209 my ($self, $text) = @_;
2210 # attribute => 'Float'
2211 # context => '#stay'
2213 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
2216 # attribute => 'Int'
2217 # context => '#stay'
2219 if ($self->testInt($text, 0, undef, 0, '#stay', 'Int')) {
2222 # attribute => 'Comment'
2225 # context => 'Comment'
2226 # type => 'Detect2Chars'
2227 if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
2230 # attribute => 'Symbol'
2233 # type => 'DetectChar'
2234 if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'Symbol')) {
2240 sub parseBindphrase {
2241 my ($self, $text) = @_;
2242 # String => 'KeyTypes'
2243 # attribute => 'Hex'
2244 # context => 'Sub phrase'
2246 if ($self->testKeyword($text, 'KeyTypes', 0, undef, 0, 'Sub phrase', 'Hex')) {
2253 my ($self, $text) = @_;
2258 my ($self, $text) = @_;
2259 # attribute => 'Symbol'
2262 # type => 'DetectChar'
2263 if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'Symbol')) {
2266 # attribute => 'Comment'
2269 # context => 'Comment'
2270 # type => 'Detect2Chars'
2271 if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
2277 sub parseNormalText {
2278 my ($self, $text) = @_;
2279 # String => 'Commands'
2280 # attribute => 'Command'
2281 # context => 'Arg area'
2283 if ($self->testKeyword($text, 'Commands', 0, undef, 0, 'Arg area', 'Command')) {
2286 # String => 'Variables'
2287 # attribute => 'Variable'
2288 # context => 'Arg area'
2290 if ($self->testKeyword($text, 'Variables', 0, undef, 0, 'Arg area', 'Variable')) {
2293 # String => 'Actions'
2294 # attribute => 'Action'
2295 # context => '#stay'
2297 if ($self->testKeyword($text, 'Actions', 0, undef, 0, '#stay', 'Action')) {
2300 # String => 'Symbols'
2301 # attribute => 'Symbol'
2302 # context => '#stay'
2304 if ($self->testKeyword($text, 'Symbols', 0, undef, 0, '#stay', 'Symbol')) {
2307 # String => 'BindFamily'
2308 # attribute => 'Command'
2309 # context => 'Bind phrase'
2311 if ($self->testKeyword($text, 'BindFamily', 0, undef, 0, 'Bind phrase', 'Command')) {
2314 # String => 'setFamily'
2315 # attribute => 'Command'
2316 # context => 'Alias phrase'
2318 if ($self->testKeyword($text, 'setFamily', 0, undef, 0, 'Alias phrase', 'Command')) {
2321 # String => 'PrintsString'
2322 # attribute => 'Command'
2325 if ($self->testKeyword($text, 'PrintsString', 0, undef, 0, 'Echo', 'Command')) {
2329 # attribute => 'Command'
2330 # context => 'Alias phrase'
2331 # insensitive => 'TRUE'
2332 # type => 'StringDetect'
2333 if ($self->testStringDetect($text, 'alias', 1, 0, 0, undef, 0, 'Alias phrase', 'Command')) {
2336 # String => 'PrintsString'
2337 # attribute => 'Command'
2340 if ($self->testKeyword($text, 'PrintsString', 0, undef, 0, 'Echo', 'Command')) {
2343 # attribute => 'Symbol'
2345 # context => '#stay'
2346 # type => 'DetectChar'
2347 if ($self->testDetectChar($text, '$', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
2350 # attribute => 'Comment'
2353 # context => 'Comment'
2354 # type => 'Detect2Chars'
2355 if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
2362 my ($self, $text) = @_;
2363 # attribute => 'String'
2366 # type => 'DetectChar'
2367 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
2373 sub parseSubphrase {
2374 my ($self, $text) = @_;
2375 # String => 'Commands'
2376 # attribute => 'Command'
2377 # context => 'Arg area in sub phrase'
2379 if ($self->testKeyword($text, 'Commands', 0, undef, 0, 'Arg area in sub phrase', 'Command')) {
2382 # String => 'Variables'
2383 # attribute => 'Variable'
2384 # context => 'Arg area in sub phrase'
2386 if ($self->testKeyword($text, 'Variables', 0, undef, 0, 'Arg area in sub phrase', 'Variable')) {
2389 # String => 'Actions'
2390 # attribute => 'Action'
2391 # context => '#stay'
2393 if ($self->testKeyword($text, 'Actions', 0, undef, 0, '#stay', 'Action')) {
2396 # String => 'Symbols'
2397 # attribute => 'Symbol'
2398 # context => '#stay'
2400 if ($self->testKeyword($text, 'Symbols', 0, undef, 0, '#stay', 'Symbol')) {
2403 # String => 'BindFamily'
2404 # attribute => 'Command'
2405 # context => 'Bind phrase'
2407 if ($self->testKeyword($text, 'BindFamily', 0, undef, 0, 'Bind phrase', 'Command')) {
2410 # String => 'setFamily'
2411 # attribute => 'Command'
2412 # context => 'Normal Text'
2414 if ($self->testKeyword($text, 'setFamily', 0, undef, 0, 'Normal Text', 'Command')) {
2417 # String => 'PrintsString'
2418 # attribute => 'Command'
2421 if ($self->testKeyword($text, 'PrintsString', 0, undef, 0, 'Echo', 'Command')) {
2425 # attribute => 'Command'
2426 # context => 'Alias phrase'
2427 # type => 'StringDetect'
2428 if ($self->testStringDetect($text, 'alias', 0, 0, 0, undef, 0, 'Alias phrase', 'Command')) {
2431 # attribute => 'Comment'
2434 # context => 'Comment'
2435 # type => 'Detect2Chars'
2436 if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
2439 # attribute => 'Symbol'
2441 # context => '#stay'
2442 # type => 'DetectChar'
2443 if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
2446 # attribute => 'Int'
2447 # context => '#stay'
2449 if ($self->testInt($text, 0, undef, 0, '#stay', 'Int')) {
2452 # attribute => 'Symbol'
2455 # type => 'DetectChar'
2456 if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'Symbol')) {
2469 Syntax::Highlight::Engine::Kate::Quake_Script - a Plugin for Quake Script syntax highlighting
2473 require Syntax::Highlight::Engine::Kate::Quake_Script;
2474 my $sh = new Syntax::Highlight::Engine::Kate::Quake_Script([
2479 Syntax::Highlight::Engine::Kate::Quake_Script is a plugin module that provides syntax highlighting
2480 for Quake Script to the Syntax::Haghlight::Engine::Kate highlighting engine.
2482 This code is generated from the syntax definition files used
2483 by the Kate project.
2484 It works quite fine, but can use refinement and optimization.
2486 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
2492 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
2498 Unknown. If you find any, please contact the author