/**
 * 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.Mugen = function()
{

    // Contributed by Ryan Corradini

    var triggers = 'alive anim animelem animelemno animelemtime animexist ' +
        'animtime authorname backedgebodydist backedgedist canrecover command ' +
        'const ctrl drawgame facing frontedgebodydist frontedgedist fvar gametime ' +
        'gethitvar hitcount hitdefattr hitfall hitover hitpausetime hitshakeover ' +
        'hitvel id ishelper ishometeam life lose matchno matchover movecontact ' +
        'moveguarded movehit movetype name numenemy numexplod numhelper ' +
        'numpartner numproj numprojid numtarget p1name p2bodydist p2dist ' +
        'p2life p2movetype p2name p2stateno p2statetype p3name p4name palno ' +
        'parentdist playeridexist pos prevstateno projcanceltime projcontact ' +
        'projcontacttime projguarded projguardedtime projhit projhittime random ' +
        'rootdist roundno roundsexisted roundstate screenpos selfanimexist ' +
        'stateno statetype sysfvar sysvar teammode teamside tickspersecond ' +
        'time timemod uniqhitcount var vel win';

    var redirects = 'parent root helper target partner enemy enemynear playerid';

    var stateCtrls = 'afterimage afterimagetime allpalfx angleadd angledraw anglemul ' +
        'angleset appendtoclipboard assertspecial attackdist attackmulset bgpalfx ' +
        'bindtoparent bindtoroot bindtotarget changeanim changeanim2 changestate ' +
        'clearclipboard ctrlset defencemulset destroyself displaytoclipboard envshake ' +
        'explod explodbindtime fallenvshake forcefeedback gamemakeanim gravity helper ' +
        'hitadd hitby hitdef hitfalldamage hitfallset hitfallvel hitoverride hitvelset ' +
        'lifeadd lifeset makedust modifyexplod movehitreset nothitby null offset palfx ' +
        'parentvaradd parentvarset pause playerpush playsnd posadd posfreeze posset ' +
        'poweradd powerset projectile removeexplod reversaldef screenbound selfstate ' +
        'sndpan sprpriority statetypeset stopsnd superpause targetbind targetdrop ' +
        'targetfacing targetlifeadd targetpoweradd targetstate targetveladd targetvelset ' +
        'turn varadd varrandom varrangeset varset veladd velmul velset width';

    var stateParams = 'type movetype physics velset poweradd juggle facep2 guard ' +
        'projid projanim projhitanim projremanim projcancelanim ' +
        'hitdefpersist movehitpersist hitcountpersist sprpriority dodge hit miss accel ' +
        'air.velocity animtype attr bindtime channel damage darken fall flag forceair ' +
        'framegap freq fv globalnoshadow ground.hittime ground.slidetime ground.type ' +
        'ground.velocity guardflag guardsound helpertype hitflag hitsound ignorehitpause ' +
        'intro invisible keyctrl kill length loop lowpriority movecamera nobg nofg noairguard ' +
        'noautoturn nobardisplay nocrouchguard nojugglecheck nokoslow nokosnd nomusic noshadow ' +
        'nostandguard nowalk numhits ontop ownpal p1stateno p2facing palbrightpalcolor ' +
        'palinvertall pausemovetime pausetime persistent phase postype priority removeongethit ' +
        'removetime roundnotover scale shadow size.ground.back size.ground.front slot sound ' +
        'sparkno sparkxy supermove supermovetime timerfreeze trans trigger1 trigger2 trigger3 ' +
        'trigger4 trigger5 trigger6 trigger7 trigger8 triggerall type unguardable v value ' +
        'velocity volume x xscale y yscale';

    var mathOps = 'abs acos asin atan ceil cos e exp floor ifelse ln log pi sin tan';

    var keywords = 'begin action clsn1default clsn2default clsn1 clsn2';

    this.regexList = [
        { regex: SyntaxHighlighter.regexLib.doubleQuotedString,     css: 'string' },            // double quoted strings
        { regex: SyntaxHighlighter.regexLib.singleQuotedString,     css: 'string' },            // single quoted strings
        { regex: /f?v([0-9]+)/g,                                    css: 'variable' },          // variables
        { regex: /;.*$/gm,                                          css: 'comments' },          // comments
        { regex: new RegExp(this.getKeywords(triggers), 'gmi'),     css: 'value' },             // triggers
        { regex: new RegExp(this.getKeywords(redirects), 'gmi'),    css: 'preprocessor' },      // trigger redirects
        { regex: new RegExp(this.getKeywords(keywords), 'gmi'),     css: 'keyword' },           // keyword
        { regex: new RegExp(this.getKeywords(stateCtrls), 'gmi'),   css: 'constants' },         // state controllers
        { regex: new RegExp(this.getKeywords(stateParams), 'gmi'),  css: 'color1' },            // statedef params
        { regex: new RegExp(this.getKeywords(mathOps), 'gmi'),      css: 'functions' }          // math operators
    ];
};

SyntaxHighlighter.brushes.Mugen.prototype = new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.Mugen.aliases   = ['mugen'];

