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 'apache.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
9 #kate author Jan Janssen (medhefgo@googlemail.com)
10 #generated: Sun Feb 3 22:02:04 2008, localtime
12 package Syntax::Highlight::Engine::Kate::Apache_Configuration;
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(@_);
26 'Alternates' => 'Keyword',
27 'Attribute' => 'Others',
28 'Comment' => 'Comment',
29 'Container' => 'Function',
30 'Directives' => 'Reserved',
33 'Normal Text' => 'Normal',
37 $self->listAdd('Alternates',
103 'Proxy-Authenticate',
104 'Proxy-Authorization',
120 'SymLinksIfOwnerMatch',
171 $self->listAdd('Alternative Directives',
174 'AllowEncodedSlashes',
176 'Anonymous_Authoritative',
177 'Anonymous_LogEmail',
178 'Anonymous_MustGiveEmail',
179 'Anonymous_NoUserID',
180 'Anonymous_VerifyEmail',
182 'AuthBasicAuthoritative',
184 'AuthDBMAuthoritative',
186 'AuthDefaultAuthoritative',
187 'AuthDigestAlgorithm',
190 'AuthLDAPAuthoritative',
191 'AuthLDAPCompareDNOnServer',
192 'AuthLDAPDereferenceAliases',
194 'AuthLDAPFrontPageHack',
195 'AuthLDAPGroupAttributeIsDN',
196 'AuthLDAPRemoteUserIsDN',
198 'AuthzDBMAuthoritative',
200 'AuthzDefaultAuthoritative',
201 'AuthzGroupFileAuthoritative',
202 'AuthzLDAPAuthoritative',
203 'AuthzOwnerAuthoritative',
204 'AuthzUserAuthoritative',
207 'CacheIgnoreCacheControl',
208 'CacheIgnoreHeaders',
209 'CacheIgnoreNoLastMod',
210 'CacheNegotiatedDocs',
223 'EnableExceptionHook',
229 'ForceLanguagePriority',
231 'ISAPIAppendLogToErrors',
232 'ISAPIAppendLogToQuery',
234 'ISAPILogNotSupported',
241 'LDAPVerifyServerCert',
243 'MCacheRemovalAlgorithm',
245 'ModMimeUsePathInfo',
251 'ProxyErrorOverride',
266 'ScriptInterpreterSource',
272 $self->listAdd('Integer Directives',
275 'AuthDigestNonceLifetime',
276 'AuthDigestShmemSize',
277 'CacheDefaultExpire',
280 'CacheForceCompletion',
284 'CacheLastModifiedFactor',
299 'DeflateCompressionLevel',
302 'ISAPIReadAheadBuffer',
303 'IdentityCheckTimeout',
307 'LDAPConnectionTimeout',
308 'LDAPOpCacheEntries',
310 'LDAPSharedCacheSize',
311 'LimitInternalRecursion',
313 'LimitRequestFields',
314 'LimitRequestFieldsize',
316 'LimitXMLRequestBody',
318 'MCacheMaxObjectCount',
319 'MCacheMaxObjectSize',
320 'MCacheMaxStreamingBuffer',
321 'MCacheMinObjectSize',
324 'MaxKeepAliveRequests',
326 'MaxRequestsPerChild',
327 'MaxRequestsPerThread',
331 'MaxThreadsPerChild',
337 'ProxyReceiveBufferSize',
343 'SSLProxyVerifyDepth',
344 'SSLSessionCacheTimeout',
357 $self->listAdd('String Directives',
376 'AddOutputFilterByType',
387 'AuthDigestGroupFile',
388 'AuthDigestNonceFormat',
389 'AuthDigestProvider',
392 'AuthLDAPBindPassword',
393 'AuthLDAPCharsetConfig',
394 'AuthLDAPGroupAttribute',
400 'BrowserMatchNoCase',
452 'LDAPSharedCacheFile',
455 'LDAPTrustedClientCert',
456 'LDAPTrustedGlobalCert',
477 'ProxyPassReverseCookieDomain',
478 'ProxyPassReverseCookiePath',
491 'RemoveOutputFilter',
506 'SSLCACertificateFile',
507 'SSLCACertificatePath',
508 'SSLCADNRequestFile',
509 'SSLCADNRequestPath',
510 'SSLCARevocationFile',
511 'SSLCARevocationPath',
512 'SSLCertificateChainFile',
513 'SSLCertificateFile',
514 'SSLCertificateKeyFile',
517 'SSLHonorCiperOrder',
518 'SSLPassPhraseDialog',
519 'SSLProxyCACertificateFile',
520 'SSLProxyCACertificatePath',
521 'SSLProxyCARevocationFile',
522 'SSLProxyCARevocationPath',
523 'SSLProxyCipherSuite',
524 'SSLProxyMachineCertificateFile',
525 'SSLProxyMachineCertificatePath',
555 'VirtualDocumentRoot',
556 'VirtualDocumentRootIP',
557 'VirtualScriptAlias',
558 'VirtualScriptAliasIP',
559 'Win32DisableAcceptEx',
563 callback => \&parseAlert,
564 attribute => 'Alert',
565 lineending => '#pop',
567 'Alternative Directives' => {
568 callback => \&parseAlternativeDirectives,
569 attribute => 'Other',
570 lineending => '#pop',
573 callback => \&parseComment,
574 attribute => 'Comment',
575 lineending => '#pop',
578 callback => \&parseCommentAlert,
579 attribute => 'Normal Text',
580 lineending => '#pop',
582 'Container Close' => {
583 callback => \&parseContainerClose,
584 attribute => 'Container',
585 lineending => '#pop',
587 'Container Open' => {
588 callback => \&parseContainerOpen,
589 attribute => 'Container',
590 lineending => '#pop',
592 'Integer Directives' => {
593 callback => \&parseIntegerDirectives,
594 attribute => 'Other',
595 lineending => '#pop',
597 'String Directives' => {
598 callback => \&parseStringDirectives,
599 attribute => 'Directives',
600 lineending => '#pop',
603 callback => \&parseapache,
604 attribute => 'Normal Text',
607 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|,');
608 $self->basecontext('apache');
609 $self->keywordscase(0);
611 bless ($self, $class);
616 return 'Apache Configuration';
620 my ($self, $text) = @_;
624 sub parseAlternativeDirectives {
625 my ($self, $text) = @_;
626 # String => 'Alternates'
627 # attribute => 'Alternates'
630 if ($self->testKeyword($text, 'Alternates', 0, undef, 0, '#stay', 'Alternates')) {
633 # attribute => 'Alternates'
636 # type => 'DetectChar'
637 if ($self->testDetectChar($text, '-', 0, 0, 0, undef, 0, '#stay', 'Alternates')) {
640 # attribute => 'Alternates'
643 # type => 'DetectChar'
644 if ($self->testDetectChar($text, '+', 0, 0, 0, undef, 0, '#stay', 'Alternates')) {
647 # context => 'Comment Alert'
648 # type => 'IncludeRules'
649 if ($self->includeRules('Comment Alert', $text)) {
656 my ($self, $text) = @_;
657 # type => 'DetectSpaces'
658 if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) {
661 # context => '##Alerts'
662 # type => 'IncludeRules'
663 if ($self->includePlugin('Alerts', $text)) {
666 # type => 'DetectIdentifier'
667 if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) {
673 sub parseCommentAlert {
674 my ($self, $text) = @_;
675 # attribute => 'Alert'
678 # type => 'DetectChar'
679 if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, 'Alert', 'Alert')) {
685 sub parseContainerClose {
686 my ($self, $text) = @_;
687 # attribute => 'Container'
690 # type => 'DetectChar'
691 if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, 'Alert', 'Container')) {
697 sub parseContainerOpen {
698 my ($self, $text) = @_;
699 # attribute => 'Container'
702 # type => 'DetectChar'
703 if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, 'Alert', 'Container')) {
707 # attribute => 'Attribute'
710 if ($self->testRegExpr($text, '[^#>]*', 0, 0, 0, undef, 0, '#stay', 'Attribute')) {
713 # context => 'Comment Alert'
714 # type => 'IncludeRules'
715 if ($self->includeRules('Comment Alert', $text)) {
721 sub parseIntegerDirectives {
722 my ($self, $text) = @_;
723 # attribute => 'Float'
724 # context => 'Integer Directives'
726 if ($self->testFloat($text, 0, undef, 0, 'Integer Directives', 'Float')) {
730 # context => 'Integer Directives'
732 if ($self->testInt($text, 0, undef, 0, 'Integer Directives', 'Int')) {
735 # context => 'Comment Alert'
736 # type => 'IncludeRules'
737 if ($self->includeRules('Comment Alert', $text)) {
743 sub parseStringDirectives {
744 my ($self, $text) = @_;
746 # attribute => 'String'
749 if ($self->testRegExpr($text, '[^#]*', 0, 0, 0, undef, 0, '#stay', 'String')) {
752 # context => 'Comment Alert'
753 # type => 'IncludeRules'
754 if ($self->includeRules('Comment Alert', $text)) {
761 my ($self, $text) = @_;
762 # String => 'String Directives'
763 # context => 'String Directives'
765 if ($self->testKeyword($text, 'String Directives', 0, undef, 0, 'String Directives', undef)) {
768 # String => 'Integer Directives'
769 # attribute => 'Directives'
770 # context => 'Integer Directives'
772 if ($self->testKeyword($text, 'Integer Directives', 0, undef, 0, 'Integer Directives', 'Directives')) {
775 # String => 'Alternative Directives'
776 # attribute => 'Directives'
777 # context => 'Alternative Directives'
779 if ($self->testKeyword($text, 'Alternative Directives', 0, undef, 0, 'Alternative Directives', 'Directives')) {
783 # attribute => 'Container'
784 # beginRegion => 'Container'
785 # context => 'Container Open'
787 if ($self->testRegExpr($text, '<\\w+', 0, 0, 0, undef, 0, 'Container Open', 'Container')) {
791 # attribute => 'Container'
792 # context => 'Container Close'
793 # endRegion => 'Container'
795 if ($self->testRegExpr($text, '</\\w+', 0, 0, 0, undef, 0, 'Container Close', 'Container')) {
798 # attribute => 'Comment'
800 # context => 'Comment'
801 # firstNonSpace => 'true'
802 # type => 'DetectChar'
803 if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 1, 'Comment', 'Comment')) {
816 Syntax::Highlight::Engine::Kate::Apache_Configuration - a Plugin for Apache Configuration syntax highlighting
820 require Syntax::Highlight::Engine::Kate::Apache_Configuration;
821 my $sh = new Syntax::Highlight::Engine::Kate::Apache_Configuration([
826 Syntax::Highlight::Engine::Kate::Apache_Configuration is a plugin module that provides syntax highlighting
827 for Apache Configuration to the Syntax::Haghlight::Engine::Kate highlighting engine.
829 This code is generated from the syntax definition files used
831 It works quite fine, but can use refinement and optimization.
833 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
839 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
845 Unknown. If you find any, please contact the author