/**
 * SyntaxHighlighter
 * http://alexgorbatchev.com/
 *
 * SyntaxHighlighter is donationware. If you are using it, please donate.
 * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
 *
 * @version
 * 2.0.296 (March 01 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 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/licenses/>.
 */
SyntaxHighlighter.brushes.MEL = function()
{
	// Copyright 2009 Rudy Cortes
	
	var datatypes =	'float int string vector matrix';

	var keywords =	'columnLayout if joint global local proc return rowColumnLayout then window' ;
					
	var functions =	'about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP ' +
	'addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint ' +
	'air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle '+
	'angleBetween animCurveEditor animDisplay animLayer animView annotate appendStringArray applicationNAme '+
	'applyAttrPreset applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx '+
        'artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluiddAttrCtx artPuttyCtx artSelectCtx '+
        'artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignNSolver assignViewportFactories attachCurve '+
        'attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp '+
        'attrFieldGroup attrFieldSliderGrp arrtNavigationControlGrp attrPresetEditWin attributeExists attributeInfo attributeMenu '+
        'attributeName attributeQuery autoKeyframe autoPlace '+
        // B
        'bakeClip bakeFluidShading bakePartialHistory bakeResults basename basenameEx batchRender bessel bevel bevelPlus binMembership '+
        'bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDateType boneLattice boundary boxDollyCtx boxZoomCtx '+
        'bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip '+
         // C
        'CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch '+
        'catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor '+
        'characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache '+
        'clearParticleStartState clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve '+
        'closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision '+
        'color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine '+
        'commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl '+
        'connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containerAutopublishRoot containerProxy '+
        'containerTemplate containerView containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx '+
        'convertTessellation convertUnit copyArray copyAttr copyFlexor copyKey copySkinWeights cos createCurveField createDisplayLayer createDrawCtx '+
        'createEditor createHairCurveNode createLayeredPsdFile createMotionField createNConstraint createNewShelf createNode createRenderLayer '+
        'createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit '+
        'curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder '+
        // D
        'dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAllContainers '+
        'deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface '+
	'deviceEditor devicePanel dgInfo dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint '+
        'diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayNClothMesh displayPref displayRGBColor '+
        'displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot '+
        'dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynCache '+
        'dynConnectToTime dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor '+
        'dynamicConstraintMembership dynamicLoad '+
         // E
        'editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers '+
        'editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred '+
        'evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp expression expressionEditorListen extendCurve '+
        'extendSurface extrude '+
         // G
        'gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getCurrentContainer getDefaultBrush getFileList getFluidAttr '+
        'getInputDeviceRange getLastError getLastError getMayaPanelTypes getModifiers getNextFreeMultiIndex getNextFreeMultiIndexForSource getPanel '+
        'getParticleAttr getPluginResource getProcArguments getSelectedNObjs getenv getpid glRender glRenderEditor globalStitch gmatch goal '+ 
        'gotoBindPose  grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName '+
        // H
        'HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS '+
        'HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnassignAS hardenPointCurve hardware hardwareRenderPanel '+
        'headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton '+
	'hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot '+
         // L
        'ls '+  
         // P
         ' print '+
         // S
         'select setAttr';

	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' },	// strings
		{ regex: SyntaxHighlighter.regexLib.singleQuotedString,		css: 'string' },	// strings
		{ regex: /^ *#.*/gm,						css: 'preprocessor' },
                { regex: /-\D\w*([^;]|[^;\n])/gm,				css: 'preprocessor bold' }, //flag
                { regex: /\d+(\.\d+)*/gm,				        css: 'color2' },      //numbers
                { regex: /\$\D\w+(\.\w+)*/gm,			 	        css: 'variable' },    //variables
		{ regex: new RegExp(this.getKeywords(datatypes), 'gm'),		css: 'color1 bold' },
		{ regex: new RegExp(this.getKeywords(functions), 'gm'),		css: 'functions bold' },
		{ regex: new RegExp(this.getKeywords(keywords), 'gm'),		css: 'keyword bold' }
		];
};

SyntaxHighlighter.brushes.MEL.prototype	= new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.MEL.aliases	= ['MEL', 'mel'];
