/**
 * SyntaxHighlighter
 * http://alexgorbatchev.com/SyntaxHighlighter
 *
 * SyntaxHighlighter is donationware. If you are using it, please donate.
 * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
 *
 * @version
 * 3.0.83 (July 02 2010)
 * 
 * @copyright
 * Copyright (C) 2004-2010 Alex Gorbatchev.
 *
 * @license
 * Dual licensed under the MIT and GPL licenses.
 */
;(function()
{
	// CommonJS
	typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;

	function Brush()
	{
		var funcs = 'APPEND ATTRIB CD CHDIR CHKDSK CHOICE CLS COPY DEL ERASE DELTREE ' +
                    'DIR EXIT FC COMP FDISK FIND FORMAT FSUTIL HELP JOIN ' +
                    'LABEL LOADFIX MK MKDIR MEM MEMMAKER MORE MOVE MSD PCPARK ' +
                    'PRINT RD RMDIR REN SCANDISK SHARE SORT SUBST SYS ' +
                    'TIME DATE TREE TRUENAME TYPE UNDELETE VER XCOPY';
    
		var keywords = 'DO ELSE FOR IN CALL CHOICE GOTO SHIFT PAUSE ERRORLEVEL ' +
					   'IF NOT EXIST LFNFOR START SETLOCAL ENDLOCAL ECHO SET';
    
		this.regexList = [
			 {regex: new RegExp('REM.*$', 'gm'), css: 'comment'},
			 {regex: new RegExp('::.*$', 'gm'), css: 'comment'},
			 {regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string'},
			 {regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string'},
			 {regex: new RegExp('[()[\\]{}]', 'g'), css: 'delim'},
			 {regex: new RegExp('%\\w+%', 'g'), css: 'variable'},
			 {regex: new RegExp('%%\\w+', 'g'), css: 'variable'},
			 {regex: new RegExp('\\w+=', 'g'), css: 'variable'},
			 {regex: new RegExp('@\\w+', 'g'), css: 'keyword'},
			 {regex: new RegExp(':\\w+', 'g'), css: 'keyword'},
			 {regex: new RegExp('\\s/\\w+', 'g'), css: 'flag'},
			 {regex: new RegExp(this.getKeywords(funcs), 'gm'), css: 'functions'},
			 {regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword'}
		    ];

		this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
	}

	Brush.prototype	= new SyntaxHighlighter.Highlighter();
	Brush.aliases		= ['batch', 'bat', 'BAT', 'dos', 'cmd'];

	SyntaxHighlighter.brushes.Batch = Brush;

	// CommonJS
	typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
})();

