/**
 * SyntaxHighlighter
 * http://alexgorbatchev.com/
 *
 * SyntaxHighlighter is donationware. If you are using it, please donate.
 * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
 *
 * @version
 * 2.0.320 (May 03 2009)
 * 
 * @copyright
 * Copyright (C) 2004-2009 Alex Gorbatchev.
 *
 * @license
 * This file is part of SyntaxHighlighter.
 * 
 * SyntaxHighlighter is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * SyntaxHighlighter is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with SyntaxHighlighter.  If not, see <http://www.gnu.org/copyleft/lesser.html>.
 */
SyntaxHighlighter.brushes.Arduino = function()
{
	// cc Tom Igoe. Based on http://en.myinventions.pl/index.php?page=ProcessingSyntaxHighlighting, 
	// Copyright 2009 Sebastian Korczak
	
	var keywords1 =	'abs acos asin atan atan2 ceil constrain cos degrees exp floor log map max min radians random randomSeed round sin sq sqrt tan bitRead bitWrite bitSet bitClear bit highByte lowByte analogReference analogRead analogWrite attachInterrupt detachInterrupt delay delayMicroseconds digitalWrite digitalRead interrupt  millis micros noInterrupts pinMode pulseIn shiftOut  begin end read print println available flush boolean break byte case char class continue default do double else false float for if int long new null private	protected public return short signed static switch this throw try true unsigned void while word';

	var keywords2 =	'HIGH LOW INPUT OUTPUT DEC BIN HEX OCT BYTE PI HALF_PI TWO_PI LSBFIRST MSBFIRST CHANGE FALLING RISING DEFAULT EXTERNAL INTERAL';
					
	var keywords3 =	'Serial Serial1 Serial2 Serial3 loop setup';

	this.regexList = [
		{ regex: SyntaxHighlighter.regexLib.singleLineCComments,	css: 'comments' },			// one line comments
		{ regex: SyntaxHighlighter.regexLib.multiLineCComments,		css: 'comments' },			// multiline comments
		{ regex: SyntaxHighlighter.regexLib.doubleQuotedString,		css: 'color4' },			// strings
		{ regex: SyntaxHighlighter.regexLib.singleQuotedString,		css: 'color4' },			// strings
		{ regex: /^ *#.*/gm,										css: 'preprocessor' },
		{ regex: new RegExp(this.getKeywords(keywords1), 'gm'),		css: 'color5' },
		{ regex: new RegExp(this.getKeywords(keywords2), 'gm'),		css: 'color4' },
		{ regex: new RegExp(this.getKeywords(keywords3), 'gm'),		css: 'color5 bold' }
		];
};

SyntaxHighlighter.brushes.Arduino.prototype	= new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.Arduino.aliases	= ['Arduino', 'arduino'];