/**
 * SyntaxHighlighter
 * http://alexgorbatchev.com/
 *
 * SyntaxHighlighter is donationware. If you are using it, please donate.
 * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
 *
 * @version
 * 2.1.364 (October 15 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.Mel = function()
{
	// Copyright 2010 Naughty Nathan - www.naughtynathan.co.uk
	
	var datatypes =	'int float vector string matrix ';

	var keywords =	'if in else for while break continue case default do return switch' +
					'global proc source catch alias';

	/* Maya MEL commands */
	var functions =	'about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP' +
					'advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr' +
					'align alignCtx alignCurve alignSurface allViewFit ambientLight angle' +
					'angleBetween animCone animCurveEditor animDisplay animView annotate' +
					'appendStringArray applicationName applyAttrPreset applyTake arclen' +
					'arcLenDimContext arcLengthDimension arrayMapper art3dPaintCtx artAttrCtx' +
					'artAttrPaintVertexCtx artBuildPaintMenu artUserPaintCtx assignCommand' +
					'assignInputDevice attachCurve attachDeviceAttr attachSurface' +
					'attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu' +
					'attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attributeExists' +
					'attributeInfo attributeMenu attributeQuery attrNavigationControlGrp' +
					'attrPaintCtx attrPresetEditWin autoKeyframe autoPlace' +
					
					'bakeClip bakeResults bakeSimulation basename batchRender bessel bevel' +
					'bevelPlus bindPose bindSkin blend2 blendShape blendShapeEditor' +
					'blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx' +
					'boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button' +
					'buttonManip' +
					
					'camera cameraView canCreateManip canvas capitalizeString catch catchQuiet' +
					'CBG ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox' +
					'character characterMap characterOutlineEditor chdir checkBox checkBoxGrp' +
					'choice circle circularFillet clamp clear clearCache clip clipEditor' +
					'clipEditorCurrentTimeCtx clipSchedule closeCurve closeSurface cluster' +
					'cmdFileOutput cmdList cmdShell collision color colorAtPoint colorEditor' +
					'colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp' +
					'columnLayout commandEcho commandLine commandPort commonPaintCtx' +
					'componentEditor computePolysetVolume condition cone confirmDialog' +
					'connectAttr connectControl connectDynamic connectionInfo connectJoint' +
					'constrain constrainValue constructionHistory contextInfo control' +
					'convertFromOldLayers convertSolidTx convertTessellation convertUnit' +
					'copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCollision' +
					'cpConstraint cpPanel cpProperty cpSeam cpSolver cpTool createDisplayLayer' +
					'createDrawCtx createEditor createMotionField createNewShelf createNode' +
					'createRenderLayer createSubdivRegion cross crossProduct ctxAbort' +
					'ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx' +
					'currentUnit curve curveAddPtCtx curveCVCtx curveEditorCtx curveEPCtx' +
					'curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey' +
					'cycleCheck cylinder' +
					
					'dagPose dateString defaultNavigation defineDataServer defineVirtualDevice' +
					'deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials' +
					'deleteShelfTab deleteUI deleteUnusedBrushes detachCurve detachDeviceAttr' +
					'detachSurface devicePanel dgdirty dgeval dgInfo dgtimer dimWhen' +
					'directionalLight directKeyCtx dirmap dirname disable disconnectAttr' +
					'disconnectJoint diskCache displacementToPoly displayAffected' +
					'displayAllWindows displayColor displayCull displayLevelOfDetail displayPref' +
					'displayRGBColor displaySmoothness displayStats displaySurface' +
					'distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor' +
					'dot dotProduct doubleProfileBirailSurface drag draggerContext dropoffLocator' +
					'duplicate duplicateCurve duplicateSurface dynamicLoad dynCache dynControl' +
					'dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref' +
					'dynRelEditor dynRelEdPanel' +
					
					'editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editor' +
					'editorTemplate editRenderLayerGlobals editRenderLayerMembers effector emit' +
					'emitter enableDevice encodeString env equivalent equivalentTol erf error' +
					'eval evalDeferred evalEcho event exampleUI exclusiveLightCheckBox' +
					'executeForEachObject exists exp exportComposerCurves expression' +
					'expressionEditorListen extendCurve extendSurface extrude' +
					
					'fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog' +
					'fileInfo filetest filletCurve filter filterCurve filterExpand' +
					'findAllIntersections finder findKeyframe findMenuItem findRelatedSkinCluster' +
					'fitBspline flexor floatArrayEq floatEq floatField floatFieldGrp' +
					'floatScrollBar floatSlider floatSliderButtonGrp floatSliderGrp floor flow' +
					'fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen' +
					'formatPrint formLayout fprint frameLayout fread freeFormFillet frewind' +
					'fromNativePath fwrite' +
					
					'gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr' +
					'getClassification getDefaultBrush getenv getFileList getFluidAttr' +
					'getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr' +
					'getpid globalStitch glRender glRenderEditor gmatch goal gotoBindPose' +
					'grabColor gradientControl graphDollyCtx graphSelectContext graphTrackCtx' +
					'gravity grid gridLayout group groupObjectsByName' +
					
					'hardenPointCurve hardware hardwareRenderPanel headsUpDisplay help helpLine' +
					'hermite hide hilite hotBox hotkey hotkeyCheck hsv_to_rgb hwReflectionMap' +
					'hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot' +
					
					'iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection' +
					'iconTextStaticLabel ikfkDisplayMethod ikHandle ikHandleCtx' +
					'ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo image' +
					'importComposerCurves inheritTransform insertJoint insertJointCtx' +
					'insertKeyCtx insertKnotCurve insertKnotSurface instance instancer' +
					'internalVar intersect interToUI intField intFieldGrp intScrollBar intSlider' +
					'intSliderGrp iprEngine isAnimCurve isConnected isDirty isolateSelect isTrue' +
					'itemFilter itemFilterAttr itemFilterRender itemFilterType' +
					
					'joint jointCluster jointCtx jointDisplayScale jointLattice' +
					
					'keyframe keyframeOutliner keyframeRegionCurrentTimeCtx' +
					'keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx' +
					'keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx' +
					'keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx' +
					'keyframeStats keyTangent' +
					
					'lassoContext lattice layerButton layeredShaderPort layeredTexturePort layout' +
					'lightlink lightList lightListEditor lightListPanel lineIntersection linstep' +
					'listAllMenus listAnimatable listAttr listCameras listConnections' +
					'listDeviceAttachments listerEditor listHistory listInputDeviceAxes' +
					'listInputDeviceButtons listInputDevices listMenuAnnotation listNodeTypes' +
					'listRelatives listSets listThisMenu listTransforms listUnselected loadFluid' +
					'loadNewShelf loadPlugin loadPrefObjects lockNode loft log lookThru ls' +
					'lsThroughFilter lsType lsUI' +
					
					'mag makebot makeIdentity makeLive makePaintable makeRoll manipMoveContext' +
					'manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx' +
					'manipScaleContext manipScaleLimitsCtx marker match max memory menu' +
					'menuBarLayout menuEditor menuItem menuItemToShelf messageLine min' +
					'minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel move' +
					'moveIKtoFK moveKeyCtx moveVertexAlongDirection movIn movOut' +
					'multiProfileBirailSurface mute' +
					
					'nameCommand nameField namespace namespaceInfo newPanelItems newton' +
					'nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear' +
					'normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsPlane' +
					'nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv' +
					
					'objectCenter objectLayer objectType objectTypeUI objExists obsoleteProc' +
					'offsetCurve offsetCurveOnSurface openGLExtension openMayaPref optionMenu' +
					'optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor' +
					'outlinerPanel overrideModifier' +
					
					'pairBlend palettePort panel paneLayout panelConfiguration panelHistory' +
					'paramDimContext paramDimension paramLocator parent parentConstraint particle' +
					'particleExists particleInstancer particleRenderInfo partition pasteKey' +
					'pathAnimation pause pclose percent performanceOptions pickWalk picture' +
					'pixelMove planarSrf plane play playbackOptions playblast pluginInfo' +
					'pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve' +
					'pointOnSurface pointPosition poleVectorConstraint polyAppend' +
					'polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal' +
					'polyAverageVertex polyBevel polyBlindData polyBoolOp polyChipOff' +
					'polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet' +
					'polyColorBlindData polyColorPerVertex polyCone polyCopyUV polyCreateFacet' +
					'polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder' +
					'polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex' +
					'polyDuplicateAndConnect polyEditUV polyEvaluate polyExtrudeEdge' +
					'polyExtrudeFacet polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyInfo' +
					'polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut' +
					'polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx' +
					'polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMoveEdge' +
					'polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal' +
					'polyNormalizeUV polyNormalPerVertex polyOptions polyPlanarProjection' +
					'polyPlane polyPoke polyProjection polyQuad polyQueryBlindData polyReduce' +
					'polySelectConstraint polySelectConstraintMonitor polySeparate' +
					'polySetToFaceNormal polySewEdge polySmooth polySoftEdge polySphere' +
					'polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitVertex' +
					'polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polySuperCtx' +
					'polyTorus polyToSubdiv polyTransfer polyTriangulate polyUnite polyUVSet' +
					'polyWedgeFace popen popupMenu pose pow print printMemory progressBar' +
					'progressWindow projectCurve projectionContext projectionManip projectLight' +
					'projectLightEditor projectTangent projFileViewer promptDialog propModCtx' +
					'propMove putenv puttyCtx pwd' +
					
					'querySubdiv quit' +
					
					'radial radioButton radioButtonGrp radioCollection radioMenuItemCollection' +
					'rad_to_deg rampColorPort rand rangeControl readTake rebuildCurve' +
					'rebuildSurface recordAttr recordDevice redo reference' +
					'refineSubdivSelectionList refresh refreshAE rehash reloadImage removeJoint' +
					'removeMultiInstance rename renameAttr renameSelectionList renameUI render' +
					'renderer renderGlobalsNode renderInfo renderLayerButton renderManip' +
					'renderPartition renderQualityNode renderThumbnailUpdate renderWindowEditor' +
					'renderWindowSelectContext reorder reorderDeformers requires reroot' +
					'resampleFluid resetAE resetTool resolutionNode reverseCurve reverseSurface' +
					'revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rot rotate' +
					'rotationInterpolation roundConstantRadius rowColumnLayout rowLayout' +
					'runAllShelfItems runTimeCommand runup' +
					
					'sampleImage saveAllShelves saveAttrPreset saveFluid saveImage' +
					'saveInitialState saveMenu savePrefObjects savePrefs saveShelf' +
					'saveToolSettings scale scaleConstraint scaleKey scaleKeyCtx' +
					'sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptedPanel' +
					'scriptedPanelType scriptJob scriptNode scriptTable scrollField scrollLayout' +
					'sculpt searchPathArray seed select selectContext selectedNodes' +
					'selectionConnection selectKey selectKeyCtx selectMode selectPref' +
					'selectPriority selectType separator setAttr setAttrMapping' +
					'setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe' +
					'setDynamic setEditCtx setEditor setEditPaintCtx setEscapeCtx setFluidAttr' +
					'setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyframe setKeyPath' +
					'setMenuMode setNodeTypeFlag setParent setParticleAttr setProject sets' +
					'setStartupMessage setState setToolTo setUITemplate shadingConnection' +
					'shadingGeometryRelCtx shadingGroupDialogDaemon shadingLightRelCtx' +
					'shadingNode shelfButton shelfLayout shelfTabLayout shellField' +
					'shelveAllMenuItems shelveMenuItems shelveThisMenu showHelp showHidden' +
					'showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign' +
					'simplify sin singleProfileBirailSurface size skinCluster skinPercent' +
					'smoothCurve smoothstep smoothTangentSurface snap2to2 snapKey snapMode' +
					'snapshot snapTogetherCtx soft sort sound soundControl source spaceLocator' +
					'sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt' +
					'squareSurface srtContext stackTrace stitchAndExplodeShell stitchSurface' +
					'stitchSurfacePoints strcmp stringArrayCatenate stringArrayCount' +
					'stringArrayIntersector stringArrayRemove stringArrayRemoveDuplicates strip' +
					'stroke subdAutoProjection subdCleanTopology subdCollapse' +
					'subdDuplicateAndConnect subdEditUV subdiv subdivCrease' +
					'subdivDisplaySmoothness subdListComponentConversion subdMapCut' +
					'subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly' +
					'subdTransferUVsToCache substitute substituteAllString substring superCtx' +
					'surface surfacePaintCtx surfaceShaderList swatchDisplayPort switchTable' +
					'symbolButton symbolCheckBox sysFile system' +
					
					'tabLayout tan tangentConstraint TestAllAttrEditors testAllMenuItems' +
					'testAllOptionBoxes testAttrNameSize testCmdFlags testCmdsWithObjects' +
					'testMenuAnnotation testOptionBoxesForOneMenu testThisMenu texManipContext' +
					'texMoveContext texRotateContext texScaleContext texSelectContext text' +
					'textCurves textField textFieldButtonGrp textFieldGrp textScrollList' +
					'textToShelf textureDisplacePlane texturePlacementContext textureWindow' +
					'texWinToolCtx threePointArcCtx timeControl timePort timerX toggle toggleAxis' +
					'toggleWindowVisibility tokenize tokenizeList tolerance tolower toNativePath' +
					'toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow' +
					'torus toupper trace track trackCtx transformLimits translator trim trunc' +
					'truncateFluidCache tumble tumbleCtx turbulence twoPointArcCtx' +
					
					'uiOnDemandExample uiTemplate unassignInputDevice undo undoInfo ungroup' +
					'uniform unit unloadPlugin untangleUV untrim upAxis updateAE userCtx' +
					'userPaintCtx uvLink uvSnapshot' +
					
					'validateShelfName valuePaintCtx vectorize verifyCmd view2dToolCtx viewCamera' +
					'viewClipPlane viewFit viewHeadOn viewLookAt viewPlace viewSet visor' +
					'volumeAxis vortex' +
					
					'waitCursor warning whatIs window windowPref wire wireContext workspace' +
					'wrinkle wrinkleContext writeTake wtPaintCtx' +
					
					'xbmLangPathList xform';

	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: new RegExp('(\\$|@|%)\\w+', 'g'),					css: 'variable' },
		{ regex: new RegExp(this.getKeywords(datatypes), 'gm'),		css: 'dataTypes' },
		{ regex: new RegExp(this.getKeywords(functions), 'gm'),		css: 'functions' },
		{ regex: new RegExp(this.getKeywords(keywords), 'gm'),		css: 'keyword' }
		];
};

SyntaxHighlighter.brushes.Mel.prototype	= new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.Mel.aliases	= ['mel','Mel','MEL'];
