codekingpro/portable-devtools
114k
1" MUSHcode syntax file2" Maintainer: Rick Bird <nveid@nveid.com>3" Based on vim Syntax file by: Bek Oberin <gossamer@tertius.net.au>4" Last Updated: Fri Nov 04 20:28:15 20055"6" quit when a syntax file was already loaded7if exists("b:current_syntax")8 finish9endif10 11 12" regular mush functions13 14syntax keyword mushFunction contained @@ abs accent accname acos add after align15syntax keyword mushFunction contained allof alphamax alphamin and andflags16syntax keyword mushFunction contained andlflags andlpowers andpowers ansi aposs art17syntax keyword mushFunction contained asin atan atan2 atrlock attrcnt band baseconv18syntax keyword mushFunction contained beep before blank2tilde bnand bnot bor bound19syntax keyword mushFunction contained brackets break bxor cand cansee capstr case20syntax keyword mushFunction contained caseall cat ceil center checkpass children21syntax keyword mushFunction contained chr clone cmds cnetpost comp con config conn22syntax keyword mushFunction contained controls convsecs convtime convutcsecs cor23syntax keyword mushFunction contained cos create ctime ctu dec decrypt default24syntax keyword mushFunction contained delete die dig digest dist2d dist3d div25syntax keyword mushFunction contained division divscope doing downdiv dynhelp e26syntax keyword mushFunction contained edefault edit element elements elist elock27syntax keyword mushFunction contained emit empire empower encrypt endtag entrances28syntax keyword mushFunction contained eq escape etimefmt eval exit exp extract fdiv29syntax keyword mushFunction contained filter filterbool findable first firstof30syntax keyword mushFunction contained flags flip floor floordiv fmod fold31syntax keyword mushFunction contained folderstats followers following foreach32syntax keyword mushFunction contained fraction fullname functions get get_eval grab33syntax keyword mushFunction contained graball grep grepi gt gte hasattr hasattrp34syntax keyword mushFunction contained hasattrpval hasattrval hasdivpower hasflag35syntax keyword mushFunction contained haspower haspowergroup hastype height hidden36syntax keyword mushFunction contained home host hostname html idle idlesecs37syntax keyword mushFunction contained idle_average idle_times idle_total if ifelse38syntax keyword mushFunction contained ilev iname inc index indiv indivall insert39syntax keyword mushFunction contained inum ipaddr isdaylight isdbref isint isnum40syntax keyword mushFunction contained isword itemize items iter itext last lattr41syntax keyword mushFunction contained lcon lcstr ldelete ldivisions left lemit42syntax keyword mushFunction contained level lexits lflags link list lit ljust lmath43syntax keyword mushFunction contained ln lnum loc localize locate lock loctree log44syntax keyword mushFunction contained lparent lplayers lports lpos lsearch lsearchr45syntax keyword mushFunction contained lstats lt lte lthings lvcon lvexits lvplayers46syntax keyword mushFunction contained lvthings lwho mail maildstats mailfrom47syntax keyword mushFunction contained mailfstats mailstats mailstatus mailsubject48syntax keyword mushFunction contained mailtime map match matchall max mean median49syntax keyword mushFunction contained member merge mid min mix mod modulo modulus50syntax keyword mushFunction contained money mtime mudname mul munge mwho name nand51syntax keyword mushFunction contained nattr ncon nearby neq nexits next nor not52syntax keyword mushFunction contained nplayers nsemit nslemit nsoemit nspemit53syntax keyword mushFunction contained nsremit nszemit nthings null num nvcon54syntax keyword mushFunction contained nvexits nvplayers nvthings obj objeval objid55syntax keyword mushFunction contained objmem oemit ooref open or ord orflags56syntax keyword mushFunction contained orlflags orlpowers orpowers owner parent57syntax keyword mushFunction contained parse pcreate pemit pi pickrand playermem58syntax keyword mushFunction contained pmatch poll ports pos poss power powergroups59syntax keyword mushFunction contained powers powover program prompt pueblo quitprog60syntax keyword mushFunction contained quota r rand randword recv regedit regeditall61syntax keyword mushFunction contained regeditalli regediti regmatch regmatchi62syntax keyword mushFunction contained regrab regraball regraballi regrabi regrep63syntax keyword mushFunction contained regrepi remainder remit remove repeat replace64syntax keyword mushFunction contained rest restarts restarttime reswitch65syntax keyword mushFunction contained reswitchall reswitchalli reswitchi reverse66syntax keyword mushFunction contained revwords right rjust rloc rnum room root67syntax keyword mushFunction contained round s scan scramble search secs secure sent68syntax keyword mushFunction contained set setdiff setinter setq setr setunion sha069syntax keyword mushFunction contained shl shr shuffle sign signal sin sort sortby70syntax keyword mushFunction contained soundex soundlike soundslike space spellnum71syntax keyword mushFunction contained splice sql sqlescape sqrt squish ssl72syntax keyword mushFunction contained starttime stats stddev step strcat strinsert73syntax keyword mushFunction contained stripaccents stripansi strlen strmatch74syntax keyword mushFunction contained strreplace sub subj switch switchall t table75syntax keyword mushFunction contained tag tagwrap tan tel terminfo textfile76syntax keyword mushFunction contained tilde2blank time timefmt timestring tr77syntax keyword mushFunction contained trigger trim trimpenn trimtiny trunc type u78syntax keyword mushFunction contained ucstr udefault ufun uldefault ulocal updiv79syntax keyword mushFunction contained utctime v vadd val valid vcross vdim vdot80syntax keyword mushFunction contained version visible vmag vmax vmin vmul vsub81syntax keyword mushFunction contained vtattr vtcount vtcreate vtdestroy vtlcon82syntax keyword mushFunction contained vtloc vtlocate vtmaster vtname vtref vttel83syntax keyword mushFunction contained vunit wait where width wipe wordpos words84syntax keyword mushFunction contained wrap xcon xexits xget xor xplayers xthings85syntax keyword mushFunction contained xvcon xvexits xvplayers xvthings zemit zfun86syntax keyword mushFunction contained zmwho zone zwho87 88" only highligh functions when they have an in-bracket immediately after89syntax match mushFunctionBrackets "\i*(" contains=mushFunction90"91" regular mush commands92syntax keyword mushAtCommandList contained @ALLHALT @ALLQUOTA @ASSERT @ATRCHOWN @ATRLOCK @ATTRIBUTE @BOOT 93syntax keyword mushAtCommandList contained @BREAK @CEMIT @CHANNEL @CHAT @CHOWN @CHOWNALL @CHZONE @CHZONEALL 94syntax keyword mushAtCommandList contained @CLOCK @CLONE @COBJ @COMMAND @CONFIG @CPATTR @CREATE @CRPLOG @DBCK95syntax keyword mushAtCommandList contained @DECOMPILE @DESTROY @DIG @DISABLE @DIVISION @DOING @DOLIST @DRAIN 96syntax keyword mushAtCommandList contained @DUMP @EDIT @ELOCK @EMIT @EMPOWER @ENABLE @ENTRANCES @EUNLOCK @FIND 97syntax keyword mushAtCommandList contained @FIRSTEXIT @FLAG @FORCE @FUNCTION @EDIT @GREP @HALT @HIDE @HOOK @KICK 98syntax keyword mushAtCommandList contained @LEMIT @LEVEL @LINK @LIST @LISTMOTD @LOCK @LOG @LOGWIPE @LSET @MAIL @MALIAS 99syntax keyword mushAtCommandList contained @MAP @MOTD @MVATTR @NAME @NEWPASSWORD @NOTIFY @NSCEMIT @NSEMIT @NSLEMIT 100syntax keyword mushAtCommandList contained @NSOEMIT @NSPEMIT @NSPEMIT @NSREMIT @NSZEMIT @NUKE @OEMIT @OPEN @PARENT @PASSWORD101syntax keyword mushAtCommandList contained @PCREATE @PEMIT @POLL @POOR @POWERLEVEL @PROGRAM @PROMPT @PS @PURGE @QUOTA 102syntax keyword mushAtCommandList contained @READCACHE @RECYCLE @REJECTMOTD @REMIT @RESTART @SCAN @SEARCH @SELECT @SET 103syntax keyword mushAtCommandList contained @SHUTDOWN @SITELOCK @SNOOP @SQL @SQUOTA @STATS @SWITCH @SWEEP @SWITCH @TELEPORT 104syntax keyword mushAtCommandList contained @TRIGGER @ULOCK @UNDESTROY @UNLINK @UNLOCK @UNRECYCLE @UPTIME @UUNLOCK @VERB 105syntax keyword mushAtCommandList contained @VERSION @WAIT @WALL @WARNINGS @WCHECK @WHEREIS @WIPE @ZCLONE @ZEMIT106syntax match mushCommand "@\i\I*" contains=mushAtCommandList107 108 109syntax keyword mushCommand AHELP ANEWS ATTRIB_SET BRIEF BRIEF BUY CHANGES DESERT110syntax keyword mushCommand DISMISS DROP EMPTY ENTER EXAMINE FOLLOW GET GIVE GOTO 111syntax keyword mushCommand HELP HUH_COMMAND INVENTORY INVENTORY LOOK LEAVE LOOK112syntax keyword mushCommand GOTO NEWS PAGE PAGE POSE RULES SAY SCORE SEMIPOSE 113syntax keyword mushCommand SPECIALNEWS TAKE TEACH THINK UNFOLLOW USE WHISPER WHISPER114syntax keyword mushCommand WARN_ON_MISSING WHISPER WITH115 116syntax match mushSpecial "\*\|!\|=\|-\|\\\|+"117syntax match mushSpecial2 contained "\*"118 119syn region mushString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=mushSpecial,mushSpecial2,@Spell120 121 122syntax match mushIdentifier "&[^ ]\+"123 124syntax match mushVariable "%r\|%t\|%cr\|%[A-Za-z0-9]\+\|%#\|##\|here"125 126" numbers127syntax match mushNumber +[0-9]\++128 129" A comment line starts with a or # or " at the start of the line130" or an @@131syntax keyword mushTodo contained TODO FIXME XXX132syntax cluster mushCommentGroup contains=mushTodo133syntax match mushComment "^\s*@@.*$" contains=mushTodo134syntax match mushComment "^#[^define|^ifdef|^else|^pragma|^ifndef|^echo|^elif|^undef|^warning].*$" contains=mushTodo135syntax match mushComment "^#$" contains=mushTodo136syntax region mushComment matchgroup=mushCommentStart start="/@@" end="@@/" contains=@mushCommentGroup,mushCommentStartError,mushCommentString,@Spell137syntax region mushCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+@@/+me=s-1 contains=mushCommentSkip138syntax match mushCommentSkip contained "^\s*@@\($\|\s\+\)"139 140 141syntax match mushCommentStartError display "/@@"me=e-1 contained142 143" syntax match mushComment +^".*$+ contains=mushTodo144" Work on this one145" syntax match mushComment +^#.*$+ contains=mushTodo146 147syn region mushPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=mushComment148syn match mushPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>"149 150syn cluster mushPreProcGroup contains=mushPreCondit,mushIncluded,mushInclude,mushDefine,mushSpecial,mushString,mushCommentSkip,mushCommentString,@mushCommentGroup,mushCommentStartError151 152syn region mushIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+153syn match mushIncluded display contained "<[^>]*>"154syn match mushInclude display "^\s*\(%:\|#\)\s*include\>\s*["<]" contains=mushIncluded155syn region mushDefine start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@mushPreProcGroup,@Spell156syn region mushPreProc start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@mushPreProcGroup157 158 159syntax region mushFuncBoundaries start="\[" end="\]" contains=mushFunction,mushFlag,mushAttributes,mushNumber,mushCommand,mushVariable,mushSpecial2160 161" FLAGS162syntax keyword mushFlag PLAYER ABODE BUILDER CHOWN_OK DARK FLOATING163syntax keyword mushFlag GOING HAVEN INHERIT JUMP_OK KEY LINK_OK MONITOR164syntax keyword mushFlag NOSPOOF OPAQUE QUIET STICKY TRACE UNFINDABLE VISUAL165syntax keyword mushFlag WIZARD PARENT_OK ZONE AUDIBLE CONNECTED DESTROY_OK166syntax keyword mushFlag ENTER_OK HALTED IMMORTAL LIGHT MYOPIC PUPPET TERSE167syntax keyword mushFlag ROBOT SAFE TRANSPARENT VERBOSE CONTROL_OK COMMANDS168 169syntax keyword mushAttribute aahear aclone aconnect adesc adfail adisconnect170syntax keyword mushAttribute adrop aefail aenter afail agfail ahear akill171syntax keyword mushAttribute aleave alfail alias amhear amove apay arfail172syntax keyword mushAttribute asucc atfail atport aufail ause away charges173syntax keyword mushAttribute cost desc dfail drop ealias efail enter fail174syntax keyword mushAttribute filter forwardlist gfail idesc idle infilter175syntax keyword mushAttribute inprefix kill lalias last lastsite leave lfail176syntax keyword mushAttribute listen move odesc odfail odrop oefail oenter177syntax keyword mushAttribute ofail ogfail okill oleave olfail omove opay178syntax keyword mushAttribute orfail osucc otfail otport oufail ouse oxenter179syntax keyword mushAttribute oxleave oxtport pay prefix reject rfail runout180syntax keyword mushAttribute semaphore sex startup succ tfail tport ufail181syntax keyword mushAttribute use va vb vc vd ve vf vg vh vi vj vk vl vm vn182syntax keyword mushAttribute vo vp vq vr vs vt vu vv vw vx vy vz183 184 185 186" The default methods for highlighting. Can be overridden later187hi def link mushAttribute Constant188hi def link mushCommand Function189hi def link mushNumber Number190hi def link mushSetting PreProc191hi def link mushFunction Statement192hi def link mushVariable Identifier193hi def link mushSpecial Special194hi def link mushTodo Todo195hi def link mushFlag Special196hi def link mushIdentifier Identifier197hi def link mushDefine Macro198hi def link mushPreProc PreProc199hi def link mushPreProcGroup PreProc 200hi def link mushPreCondit PreCondit201hi def link mushIncluded cString202hi def link mushInclude Include203 204 205 206" Comments207hi def link mushCommentStart mushComment208hi def link mushComment Comment209hi def link mushCommentString mushString210 211 212 213let b:current_syntax = "mush"214 215" mush: ts=17216 