// chuck brush file for syntax highlighter
// syntax highlighter by Alex Gorbatchev : http://code.google.com/p/syntaxhighlighter/
// chuck : http://chuck.cs.princeton.edu/
// v0.1  / feb. 2008 / emoc {at} codelab.fr / http://codelab.fr


dp.sh.Brushes.Chuck = function()
{
	var funcs	=	'Gain Noise Impulse Step Phasor SinOsc PulseOsc TriOsc SqrOsc ' +
			'SawOsc Halfrec Fullrect Zerox Delayp SndBuf Pan2 bandedWG blowbotl BlowHole ' +
			'Bowed Brass Clarinet Flute Mandolin ModalBar Moog Saxofony Shakers Sitar ' +
			'StifKarp VoicForm FM BeeThree FMVoices HevyMetl PercFlut Rhodey TubeBell ' +
			'Wurley Delay DelayA DelayL Echo Envelope ADSR BiQuad Filter FilterBasic ' +
			'OnePole TwoPole OneZero TwoZero PoleZero LPF HPF BPF BRF JCRev NRev PRCRev ' +
			'ResonZ Chorus Modulate PitShift SubNoise WvIn WvOut WaveLoop UAna UAnaBlob ' +
			'Windowing FFT IFFT DCT IDCT Centroid Flux RMS RollOff NetIn NetOut MidiIn ' +
			'MidiOut MidiMsg OSC_Recv OSC_Addr OSC_Send';
					
	var keywords =	'new goto break return continue spork if else switch while for do until ' +
			'and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq';

	var datatypes = 'dur time complex polar Shred UGen Event Object int float string void';
	
	var special =  'dac adc me machine now blackhole pi fun class';

	var values =	'true false';	
					
	this.regexList = [
		{ regex: dp.sh.RegexLib.SingleLineCComments,							css: 'comment' },		// one line comments
		{ regex: dp.sh.RegexLib.MultiLineCComments,								css: 'comment' },		// multiline comments
		{ regex: dp.sh.RegexLib.DoubleQuotedString,								css: 'string' },		// strings
		{ regex: dp.sh.RegexLib.SingleQuotedString,								css: 'string' },		// strings
		{ regex: new RegExp(this.GetKeywords(funcs), 'gm'),						css: 'func' },			// functions
		{ regex: new RegExp(this.GetKeywords(keywords), 'gm'),					css: 'keyword' },		// keyword
		{ regex: new RegExp(this.GetKeywords(datatypes), 'gm'),					css: 'datatype' },		// datatype
		{ regex: new RegExp(this.GetKeywords(special), 'gm'),					css: 'special' },		// special
		{ regex: new RegExp(this.GetKeywords(values), 'gmi'),					css: 'value' },			// value
		{ regex: new RegExp('\\b[\\d\\.]+\\b', 'g'),							css: 'number' }		// numbers 12345
		];

	this.CssClass = 'dp-ck';
	this.Style =	'.dp-ck .comment { color: #009900; font-style: italic; }' +
					'.dp-ck .blockcomment { color: #3f5fbf; }' +
					'.dp-ck .func { color: #ff0000; font-weight: bold;}' +
					'.dp-ck .datatype { color: #0033ff; }' +
					'.dp-ck .keyword { color: #0033ff; }' +
					'.dp-ck .value { color: #333333; }' +
					'.dp-ck .special { color: #f36600; font-weight: bold; }' +
					'.dp-ck .number { color: #8b008b; font-weight: bold; }';
}

dp.sh.Brushes.Chuck.prototype	= new dp.sh.Highlighter();
dp.sh.Brushes.Chuck.Aliases	= ['ck', 'chuck', 'Chuck'];




