/**
 *
 * IBM AS/400 CL/CLLE brush file.
 * Current for version V6R1
 *
 */
SyntaxHighlighter.brushes.Clp = function()
{
	var bifs = '%addr(ess)? %bin(ary)? %offset %ofs %substring %sst %switch ';

	var clstmts = 'call(prc)? chgvar(dtaara)? dcl(f)? (end)?pgm if goto monmsg sndpgmmsg sbmjob ';

	var indicators = '[&]in[01-99] [*]?(DEC|CHAR|LGL|INT|UINT|PTR)';
	var operators  = '[*](b|t)?(cat) [*](and|or|not|eq|gt|lt|ge|le|ne|ng|nl) ';
	this.getFunctions = function(list)
	{
		return "(?:" + list.replace(/\s+/g, "|") + ")\\b";
	};

	this.regexList = [
		{ regex: SyntaxHighlighter.regexLib.singleLineCComments,	css: 'comments' },			// one line comments
		{ regex: SyntaxHighlighter.regexLib.multiLineCComments,		css: 'comments' },			// multiline comments
		{ regex: SyntaxHighlighter.regexLib.doubleQuotedString,		css: 'string' },			// double quoted strings
		{ regex: SyntaxHighlighter.regexLib.singleQuotedString,		css: 'string' },			// single quoted strings
		{ regex: new RegExp(this.getKeywords(bifs), 'gmi'), css: 'functions' },
		{ regex: new RegExp(this.getKeywords(clstmts), 'gmi'), css: 'functions bold' },
		{ regex: new RegExp(this.getFunctions(indicators), 'gmi'), css: 'color2' },
		{ regex: new RegExp(this.getKeywords(operators), 'gmi'), css: 'color3' }
	];
};

SyntaxHighlighter.brushes.Clp.prototype = new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.Clp.aliases = ['cl','clp','clle'];
