/*
 *  $Id: shBrushHttpdApacheConf.js 163 2007-07-25 08:40:56Z HVRTWall $ 
 *  Copyright (c) 2007 Thomas Walloschke (thw@cpan.org). All rights reserved.
 *
 *  Httpd Apache Configuration File Formatter for 'dp.SyntaxHighlighter'
 *  (http://code.google.com/p/syntaxhighlighter/)
 *
 *  File is generated automatically by 'shBrushHttpdApacheConfGenerator/1.21'.
 *  Version 1.3 references to 'http://httpd.apache.org/docs/1.3/mod/index.html'.
 *  Version 2.0 references to 'http://httpd.apache.org/docs/2.0/mod/index.html'.
 *  Version 2.2 references to 'http://httpd.apache.org/docs/2.2/mod/index.html'.
 *  Generation time 2007-07-25T10:24:24 - DO NOT EDIT!
 *
 *  Supported Apache versions: 1.3, 2.0, 2.2
 */

dp.sh.Brushes.HttpdApacheConf = function()
{
	var directivesV00 = 'AcceptFilter AcceptMutex AcceptPathInfo '+
		'AccessFileName Action AddAlt AddAltByEncoding AddAltByType '+
		'AddCharset AddDefaultCharset AddDescription AddEncoding '+
		'AddHandler AddIcon AddIconByEncoding AddIconByType '+
		'AddInputFilter AddLanguage AddModuleInfo AddOutputFilter '+
		'AddOutputFilterByType AddType Alias AliasMatch Allow '+
		'AllowCONNECT AllowEncodedSlashes AllowOverride Anonymous '+
		'Anonymous_Authoritative Anonymous_LogEmail '+
		'Anonymous_MustGiveEmail Anonymous_NoUserID '+
		'Anonymous_VerifyEmail AuthAuthoritative AuthDBMAuthoritative '+
		'AuthDBMGroupFile AuthDBMType AuthDBMUserFile '+
		'AuthDigestAlgorithm AuthDigestDomain AuthDigestFile '+
		'AuthDigestNcCheck AuthDigestNonceFormat '+
		'AuthDigestNonceLifetime AuthDigestQop AuthDigestShmemSize '+
		'AuthGroupFile AuthLDAPBindDN AuthLDAPBindPassword '+
		'AuthLDAPCharsetConfig AuthLDAPCompareDNOnServer '+
		'AuthLDAPDereferenceAliases AuthLDAPGroupAttribute '+
		'AuthLDAPGroupAttributeIsDN AuthLDAPRemoteUserIsDN '+
		'AuthLDAPUrl AuthName AuthType AuthUserFile BS2000Account '+
		'BrowserMatch BrowserMatchNoCase BufferedLogs CGIMapExtension '+
		'CacheDefaultExpire CacheDirLength CacheDirLevels '+
		'CacheDisable CacheEnable CacheFile CacheForceCompletion '+
		'CacheGcInterval CacheIgnoreCacheControl CacheIgnoreHeaders '+
		'CacheIgnoreNoLastMod CacheLastModifiedFactor CacheMaxExpire '+
		'CacheMaxFileSize CacheMinFileSize CacheNegotiatedDocs '+
		'CacheRoot CacheSize CharsetDefault CharsetOptions '+
		'CharsetSourceEnc CheckSpelling ContentDigest CookieDomain '+
		'CookieExpires CookieLog CookieName CookieStyle '+
		'CookieTracking CoreDumpDirectory CustomLog Dav '+
		'DavDepthInfinity DavLockDB DavMinTimeout DefaultIcon '+
		'DefaultLanguage DefaultType DeflateBufferSize '+
		'DeflateCompressionLevel DeflateFilterNote DeflateMemLevel '+
		'DeflateWindowSize Deny DirectoryIndex DirectorySlash '+
		'DocumentRoot DumpIOInput DumpIOOutput EnableExceptionHook '+
		'EnableMMAP EnableSendfile ErrorDocument ErrorLog Example '+
		'ExpiresActive ExpiresByType ExpiresDefault ExtFilterDefine '+
		'ExtFilterOptions ExtendedStatus FileETag '+
		'ForceLanguagePriority ForceType ForensicLog Group Header '+
		'HeaderName HostnameLookups ISAPIAppendLogToErrors '+
		'ISAPIAppendLogToQuery ISAPICacheFile ISAPIFakeAsync '+
		'ISAPILogNotSupported ISAPIReadAheadBuffer IdentityCheck '+
		'ImapBase ImapDefault ImapMenu Include IndexIgnore '+
		'IndexOptions IndexOrderDefault KeepAlive KeepAliveTimeout '+
		'LDAPCacheEntries LDAPCacheTTL LDAPConnectionTimeout '+
		'LDAPOpCacheEntries LDAPOpCacheTTL LDAPSharedCacheFile '+
		'LDAPSharedCacheSize LanguagePriority LimitInternalRecursion '+
		'LimitRequestBody LimitRequestFieldSize LimitRequestFields '+
		'LimitRequestLine LimitXMLRequestBody Listen ListenBackLog '+
		'LoadFile LoadModule LockFile LogFormat LogLevel '+
		'MCacheMaxObjectCount MCacheMaxObjectSize '+
		'MCacheMaxStreamingBuffer MCacheMinObjectSize '+
		'MCacheRemovalAlgorithm MCacheSize MMapFile MaxClients '+
		'MaxKeepAliveRequests MaxMemFree MaxRequestsPerChild '+
		'MaxRequestsPerThread MaxSpareServers MaxSpareThreads '+
		'MaxThreads MetaDir MetaFiles MetaSuffix MimeMagicFile '+
		'MinSpareServers MinSpareThreads ModMimeUsePathInfo '+
		'MultiviewsMatch NWSSLTrustedCerts NWSSLUpgradeable '+
		'NameVirtualHost NoProxy Options Order PassEnv PidFile '+
		'ProtocolEcho ProxyBadHeader ProxyBlock ProxyDomain '+
		'ProxyErrorOverride ProxyIOBufferSize ProxyMaxForwards '+
		'ProxyPass ProxyPassReverse ProxyPreserveHost '+
		'ProxyReceiveBufferSize ProxyRemote ProxyRemoteMatch '+
		'ProxyRequests ProxyTimeout ProxyVia RLimitCPU RLimitMEM '+
		'RLimitNPROC ReadmeName ReceiveBufferSize Redirect '+
		'RedirectMatch RedirectPermanent RedirectTemp RemoveCharset '+
		'RemoveEncoding RemoveHandler RemoveInputFilter '+
		'RemoveLanguage RemoveOutputFilter RemoveType RequestHeader '+
		'Require RewriteBase RewriteCond RewriteEngine RewriteLock '+
		'RewriteLog RewriteLogLevel RewriteMap RewriteOptions '+
		'RewriteRule SSIEndTag SSIErrorMsg SSIStartTag SSITimeFormat '+
		'SSIUndefinedEcho SSLCACertificateFile SSLCACertificatePath '+
		'SSLCARevocationFile SSLCARevocationPath '+
		'SSLCertificateChainFile SSLCertificateFile '+
		'SSLCertificateKeyFile SSLCipherSuite SSLEngine SSLMutex '+
		'SSLOptions SSLPassPhraseDialog SSLProtocol '+
		'SSLProxyCACertificateFile SSLProxyCACertificatePath '+
		'SSLProxyCARevocationFile SSLProxyCARevocationPath '+
		'SSLProxyCipherSuite SSLProxyEngine '+
		'SSLProxyMachineCertificateFile '+
		'SSLProxyMachineCertificatePath SSLProxyProtocol '+
		'SSLProxyVerify SSLProxyVerifyDepth SSLRandomSeed SSLRequire '+
		'SSLRequireSSL SSLSessionCache SSLSessionCacheTimeout '+
		'SSLUserName SSLVerifyClient SSLVerifyDepth Satisfy '+
		'ScoreBoardFile Script ScriptAlias ScriptAliasMatch '+
		'ScriptInterpreterSource ScriptLog ScriptLogBuffer '+
		'ScriptLogLength ScriptSock SecureListen SendBufferSize '+
		'ServerAdmin ServerAlias ServerLimit ServerName ServerPath '+
		'ServerRoot ServerSignature ServerTokens SetEnv SetEnvIf '+
		'SetEnvIfNoCase SetHandler SetInputFilter SetOutputFilter '+
		'StartServers StartThreads SuexecUserGroup ThreadLimit '+
		'ThreadStackSize ThreadsPerChild TimeOut TraceEnable '+
		'TransferLog TypesConfig UnsetEnv UseCanonicalName User '+
		'UserDir VirtualDocumentRoot VirtualDocumentRootIP '+
		'VirtualScriptAlias VirtualScriptAliasIP Win32DisableAcceptEx '+
		'XBitHack';

	var directivesV13 = 'AccessConfig AddModule AgentLog '+
		'AuthDBAuthoritative AuthDBGroupFile AuthDBUserFile '+
		'BindAddress CGICommandArgs ClearModuleList CookieFormat '+
		'CookiePrefix EBCDICConvert EBCDICConvertByType EBCDICKludge '+
		'ErrorHeader FancyIndexing LimitRequestFieldsize '+
		'ListenBacklog NoCache Port ProtocolReqCheck RefererIgnore '+
		'RefererLog ResourceConfig ServerType ShmemUIDisUser';

	var directivesV20 = 'AssignUserID AuthDigestGroupFile '+
		'AuthLDAPAuthoritative AuthLDAPEnabled AuthLDAPFrontPageHack '+
		'CacheExpiryCheck CacheGcClean CacheGcDaily CacheGcMemUsage '+
		'CacheGcUnused CacheTimeMargin ChildPerUserID LDAPTrustedCA '+
		'LDAPTrustedCAType MaxThreadsPerChild NumServers';

	var directivesV22 = 'AuthBasicAuthoritative AuthBasicProvider '+
		'AuthDBDUserPWQuery AuthDBDUserRealmQuery '+
		'AuthDefaultAuthoritative AuthDigestProvider '+
		'AuthLDAPRemoteUserAttribute AuthzDBMAuthoritative '+
		'AuthzDBMType AuthzDefaultAuthoritative '+
		'AuthzGroupFileAuthoritative AuthzLDAPAuthoritative '+
		'AuthzOwnerAuthoritative AuthzUserAuthoritative '+
		'BalancerMember CacheIgnoreQueryString CacheStoreNoStore '+
		'CacheStorePrivate CheckCaseOnly DBDExptime DBDKeep DBDMax '+
		'DBDMin DBDParams DBDPersist DBDPrepareSQL DBDriver '+
		'DavGenericLockDB DumpIOLogLevel FilterChain FilterDeclare '+
		'FilterProtocol FilterProvider FilterTrace '+
		'GracefulShutdownTimeout IdentityCheckTimeout IndexStyleSheet '+
		'LDAPTrustedClientCert LDAPTrustedGlobalCert LDAPTrustedMode '+
		'LDAPVerifyServerCert ProxyPassMatch '+
		'ProxyPassReverseCookieDomain ProxyPassReverseCookiePath '+
		'SSLCADNRequestFile SSLCADNRequestPath SSLCryptoDevice '+
		'SSLHonorCipherOrder UseCanonicalPhysicalPort';

	var tagnamesV00 = 'Directory DirectoryMatch Files FilesMatch '+
		'IfDefine IfModule IfVersion Limit LimitExcept Location '+
		'LocationMatch Proxy ProxyMatch VirtualHost';

	var tagnamesV22 = 'AuthnProviderAlias';

	var argumentsV00 = 'All Allow,Deny Any Ascending Basic Block '+
		'DATE_GMT DATE_LOCAL DB DNS DOCUMENT_NAME DOCUMENT_URI '+
		'Default Deny,Allow Descending Digest Double EMail ExecCGI '+
		'Fallback Filters FollowSymLinks Full GDBM GDSF '+
		'HSE_APPEND_LOG_PARAMETER HSE_REQ_DONE_WITH_SESSION '+
		'HSE_REQ_IS_CONNECTED HSE_REQ_IS_KEEP_CONN '+
		'HSE_REQ_MAP_URL_TO_PATH HSE_REQ_SEND_RESPONSE_HEADER '+
		'HSE_REQ_SEND_RESPONSE_HEADER_EX HSE_REQ_SEND_URL '+
		'HSE_REQ_SEND_URL_REDIRECT_RESP Handlers Ignore Includes '+
		'IncludesNOEXEC Indexes Input IsError LAST_MODIFIED LRU MD5 '+
		'Major Min Minor MultiViews Mutual-failure NDBM '+
		'NegotiatedOnly None Off On Output Prefer '+
		'PreservesContentLength QUERY_STRING_UNESCAPED Ratio Registry '+
		'SDBM StartBody SymLinksIfOwnerMatch add alert always append '+
		'auth cgi cmd crit debug default emerg encoding errmsg error '+
		'fcntl file finding flock formatted full info map never '+
		'nocontent none notice of off on posixsem pthread referer '+
		'searching semiformatted set sizefmt sysvsem timefmt '+
		'unformatted unset value var virtual warn';

	var argumentsV13 = 'AuthConfig FileInfo Limit Minimal OS Options '+
		'ProductOnly REMOTE_HOST REMOTE_IDENT REMOTE_USER USER_NAME '+
		'all any authuser block bytes date dns double from gone host '+
		'ident inetd level os2sem permanent qs registry request '+
		'script seeother standalone status temp tpfcore uslock';

	var argumentsV22 = 'Mapfile circle edit menu optional uid';

	this.regexList = [
			  
	{
		regex: dp.sh.RegexLib.SingleLinePerlComments,
		css: 'comment'
	}, 
	{
		regex: dp.sh.RegexLib.DoubleQuotedString,
		css: 'string'
	}, 
	{
		regex: dp.sh.RegexLib.SingleQuotedString,
		css: 'string'
	}, 
	{
		regex: new RegExp(this.GetDirectives(directivesV00), 'gmi'),
		css: 'directive-name'
	},
	{
		regex: new RegExp(this.GetDirectives(directivesV13), 'gmi'),
		css: 'directive-name'
	},
	{
		regex: new RegExp(this.GetDirectives(directivesV20), 'gmi'),
		css: 'directive-name'
	},
	{
		regex: new RegExp(this.GetDirectives(directivesV22), 'gmi'),
		css: 'directive-name'
	},
	{
		regex: new RegExp(this.GetTagnames(tagnamesV00), 'gm'),
		css: 'tag-name'
	},
	{
		regex: new RegExp(this.GetTagnames(tagnamesV22), 'gm'),
		css: 'tag-name'
	},
	{
		regex: new RegExp(this.GetArguments(argumentsV00), 'gm'),
		css: 'argument-value'
	},
	{
		regex: new RegExp(this.GetArguments(argumentsV13), 'gm'),
		css: 'argument-value'
	},
	{
		regex: new RegExp(this.GetArguments(argumentsV22), 'gm'),
		css: 'argument-value'
	},
	{
		regex: new RegExp('/?(&gt;|>)', 'gm'),
		css: 'tag'
	},
	{
		regex: new RegExp("\\s+\\d+\\s+", 'g'),
		css: 'number'
	}
		
	];

	this.CssClass = 'dp-apache';
	this.Style =	'.dp-apache .number { color: #ff1493; } '+
			'.dp-apache .directive-name { color: maroon; '+
			'font-weight: bold; } .dp-apache .tag, '+
			'.dp-apache .tag-name { color: #069; '+
			'font-weight: bold; } .dp-apache '+
			'.argument-value { color: #ff1493; }';
}

/*
 *  ++ Local extension of 'shCore.js' ++
 *  The Apache configuration syntax defines a 'directive argument' sequence.
 *  Due to the fact that 'GetKeywords' is contextfree, it may fail sometimes.
 *  'GetDirectives' will be used instead (searches first token in line only).
 */
 
dp.sh.Highlighter.prototype.GetDirectives = function(str) 
{
    return '^\\s*(\\b' + str.replace(/\s+/g, '\\b|\\b') + '\\b)';
}

/*
 *  ++ Local extension of 'shCore.js' ++
 *  The Apache configuration syntax defines a 'directive argument' sequence.
 *  Due to the fact that 'GetKeywords' is contextfree, it may fail sometimes.
 *  'GetArguments' will be used instead (searches for a token sequence).
 */
 
dp.sh.Highlighter.prototype.GetArguments = function(str) 
{
    return '(?=\\w+\\s+)(\\b' + str.replace(/\s+/g, '\\b|\\b') + '\\b)';
}

/*
 *  ++ Local extension of 'shCore.js' ++
 *  The Apache configuration syntax defines a '<tagname ...>' .
 *  Due to the fact that 'GetKeywords' is contextfree, it may fail sometimes.
 *  'GetTagnames' will be used instead (searches <token or </token ).
 */

dp.sh.Highlighter.prototype.GetTagnames = function(str) 
{
    return '(&lt;|<)/?(\\b' + str.replace(/\s+/g, '\\b|\\b') + '\\b)';
}
 
/*
 *  Highlight 'HttpdApacheConf Files'
 */
 
dp.sh.Brushes.HttpdApacheConf.prototype  = new dp.sh.Highlighter();
dp.sh.Brushes.HttpdApacheConf.Aliases	 = [ 'apache',
					'apache-conf', 'httpdapache',
					'httpdapache-conf', 'apache13',
					'apache13-conf', 'httpdapache13',
					'httpdapache13-conf', 'apache20',
					'apache20-conf', 'httpdapache20',
					'httpdapache20-conf', 'apache22',
					'apache22-conf', 'httpdapache22',
					'httpdapache22-conf' ];

/*
 *  CAVEATS
 *  	- Beta version - not tested under all conditions
 *      - Larger files (500+ lines) may interrupt some javascript machines (IE)
 *          Workaround: Press continue... 
 *      - A single " in a directive line clashes in this version,  e. g.
 *              ErrorDocument 500 "The server made a boo boo.
 *          Workaround: Still in progress :-(
 *      - 'Allow,Deny' and 'Deny,Allow' not recognized in this version
 *          Workaround: Still in progress :-( 
 *      - No 'Apache Version' autorecognation and parsing optimation
 */
