author | dessaya
<dessaya> 2005-03-10 14:47:46 UTC |
committer | dessaya
<dessaya> 2005-03-10 14:47:46 UTC |
parent | 629d95f8bc71373e0b8f1280cf903264b52fd29d |
stuff/vimsyntax/syntax/fpstates.vim | +44 | -39 |
diff --git a/stuff/vimsyntax/syntax/fpstates.vim b/stuff/vimsyntax/syntax/fpstates.vim index 5cae7e1..feb1a40 100644 --- a/stuff/vimsyntax/syntax/fpstates.vim +++ b/stuff/vimsyntax/syntax/fpstates.vim @@ -1,9 +1,9 @@ " Vim syntax file " Language: FreePrince states description files (main.conf, titles.conf) " Maintainer: Diego Essaya <dessaya@fi.uba.ar> -" Last Change: $Date: 2005-03-10 02:58:37 $ +" Last Change: $Date: 2005-03-10 14:47:46 $ " URL: http://www.fp.princed.com.ar/ -" $Revision: 1.3 $ +" $Revision: 1.4 $ " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -15,12 +15,23 @@ endif syntax case ignore +syntax sync minlines=50 + syntax match fpError /\S[^#]*.*/ contained contains=fpComment +syntax match fpErrorLine /\s*\S\+/ contains=fpError +highlight link fpError Error + syntax match fpEndLine /\s*.*/ contained contains=fpError -syntax match fpErrorLine /\s*\S\+/ contains=fpError +syntax match fpIdent /\w\+/ contained +highlight link fpIdent Identifier +syntax match fpIdentLine /^\t\t\t\w\+/ contained contains=fpIdent nextgroup=fpEndLine +syntax match fpLastIdent /\w\+/ contained contains=fpIdent nextgroup=fpEndLine -syntax match fpIdent /^\t\t\t\w\+/ contained nextgroup=fpEndLine +"------------------- + +syntax match fpCreateLine /^create\s\+exit/ nextgroup=fpLastIdent skipwhite +highlight link fpCreateLine Keyword "------------------- @@ -30,8 +41,10 @@ syntax match fpAnimVMove /\s[@]-\=\d\+\>/ contained contains=fpNumber,fpOp syntax match fpAnimHMove /\s[$]-\=\d\+\>/ contained contains=fpNumber,fpOp syntax match fpAnimHMove /\s[$]-\=\d\+\>/ contained contains=fpNumber,fpOp syntax match fpAnimFlags /\<[xdpsufh]\+\>/ contained contains=fpNumber,fpOp +highlight link fpAnimFlags Operator syntax match fpAnimLine /^\t\t\t.*/ contained nextgroup=fpEndLine contains=fpAnimNumber,fpAnimRange,fpAnimVMove,fpAnimHMove,fpAnimFlags,fpError syntax match fpAnim /^\t\tanimation/ contained nextgroup=fpEndLine +highlight link fpAnim Keyword syntax region fpAnimList start=/^\t\tanimation/ end=/^\t\{,2}\S/me=s-1 contains=fpAnim,fpAnimLine,fpError @@ -39,7 +52,10 @@ syntax region fpAnimList start=/^\t\tanimation/ end=/^\t\{,2}\S/me=s-1 contains= syntax match fpStepNumber /[+-]\=\d\+/ contained nextgroup=fpEndLine contains=fpOp,fpNumber syntax match fpStepsLine /^\t\t\t\(relative\(Turn\)\=\|absoluteOn\(Start\|Stop\)\)/ contained nextgroup=fpStepNumber skipwhite +highlight link fpStepsLine Keyword + syntax match fpSteps /^\t\tsteps/ contained nextgroup=fpEndLine +highlight link fpSteps Keyword syntax region fpStepsList start=/^\t\tsteps/ end=/^\t\{,2}\S/me=s-1 contains=fpSteps,fpStepsLine,fpError @@ -47,6 +63,7 @@ syntax region fpStepsList start=/^\t\tsteps/ end=/^\t\{,2}\S/me=s-1 contains=fpS syntax match fpGSLine contained /^\t\t\t\d\+/ contains=fpNumber nextgroup=fpEndLine syntax match fpGuardSkill /^\t\tguardskill/ contained nextgroup=fpEndLine +highlight link fpGuardSkill Keyword syntax region fpGSList start=/^\t\tguardskill/ end=/^\t\{,2}\S/me=s-1 contains=fpGuardSkill,fpGSLine,fpError @@ -54,84 +71,72 @@ syntax region fpGSList start=/^\t\tguardskill/ end=/^\t\{,2}\S/me=s-1 contains=f syntax match fpLevelLine contained /^\t\t\t\d\+/ contains=fpNumber nextgroup=fpEndLine syntax match fpLevel /^\t\tlevel/ contained nextgroup=fpEndLine +highlight link fpLevel Keyword syntax region fpLevelList start=/^\t\tlevel/ end=/^\t\{,2}\S/me=s-1 contains=fpLevel,fpLevelLine,fpError "------------------- syntax match fpMark /^\t\tmark/ contained nextgroup=fpEndLine +highlight link fpMark Keyword -syntax region fpMarkList start=/^\t\tmark/ end=/^\t\{,2}\S/me=s-1 contains=fpMark,fpIdent,fpError +syntax region fpMarkList start=/^\t\tmark/ end=/^\t\{,2}\S/me=s-1 contains=fpMark,fpIdentLine,fpError "------------------- +syntax match fpExitLine /^\t\t\texit/ contained nextgroup=fpLastIdent skipwhite +highlight link fpExitLine Keyword syntax match fpNext /^\t\tnext/ contained nextgroup=fpEndLine +highlight link fpNext Keyword -syntax region fpNextList start=/^\t\tnext/ end=/^\t\{,2}\S/me=s-1 contains=fpNext,fpIdent,fpError +syntax region fpNextList start=/^\t\tnext/ end=/^\t\{,2}\S/me=s-1 contains=fpNext,fpIdentLine,fpError,fpExitLine "------------------- syntax match fpMapCond /^\t\t\tMap\(Not\)\=\(On\|Up\|Down\|Forward\|Back\)\+\>/ contained nextgroup=fpMapState skipwhite +highlight link fpMapCond Keyword syntax keyword fpMapState contained walkable exitdoor potion space block spikes nextgroup=fpEndLine +highlight link fpMapState Constant syntax match fpKeyCond /^\t\t\tKey\(Up\|Forward\|Back\|Down\|Shift\)\+\>/ contained nextgroup=fpKeyState skipwhite +highlight link fpKeyCond Keyword syntax keyword fpKeyState contained pressed nextgroup=fpEndLine +highlight link fpKeyState Constant syntax match fpNoneCond contained /^\t\t\tnone/ nextgroup=fpEndLine +highlight link fpNoneCond Keyword syntax match fpOtherCond contained /^\t\t\tForwardTileNearerThan\s\+\d\+/ contains=fpNumber nextgroup=fpEndLine +highlight link fpOtherCond Keyword syntax match fpCondition /^\t\tconditions\=/ nextgroup=fpEndLine +highlight link fpCondition Keyword syntax region fpCondList start=/^\t\tconditions\=/ end=/^\t\{,2}\S/me=s-1 contains=fpCondition,fpMapCond,fpKeyCond,fpNoneCond,fpOtherCond,fpError + "------------------- syntax match fpAction /^\taction\>/ nextgroup=fpTitle skipwhite syntax match fpTitle /.*/ contained contains=fpComment +highlight link fpAction Function +highlight link fpTitle String "------------------- -syntax match fpState /^\w\+:/ contains=fpOp nextgroup=fpEndLine +syntax match fpState /^\w\+:/ contains=fpIdent,fpOp nextgroup=fpEndLine "------------------- syntax match fpNumber /\d\+/ contains=fpOp contained +highlight link fpNumber Constant + syntax match fpOp /[:;\-+()*&^%$@!~.,/]/ contained +highlight link fpOp Operator syntax match fpComment /#.*$/ contains=fpTodo contained -syntax match fpTodo /\<TODO\>/ contained - syntax match fpCommentedLine /\s*#.*$/ contains=fpComment - highlight link fpComment Comment -highlight link fpState Label -highlight link fpAction Keyword - -highlight link fpCondition Keyword -highlight link fpNoneCond Identifier -highlight link fpOtherCond Identifier -highlight link fpKeyCond Identifier -highlight link fpKeyState Constant -highlight link fpMapCond Identifier -highlight link fpMapState Constant - -highlight link fpNext Keyword - -highlight link fpMark Keyword - -highlight link fpSteps Keyword -highlight link fpStepsLine Identifier - -highlight link fpAnim Keyword -highlight link fpAnimFlags Operator - -highlight link fpLevel Keyword - -highlight link fpGuardSkill Keyword -highlight link fpIdent Identifier -highlight link fpNumber Constant -highlight link fpOp Operator -highlight link fpTitle Function +syntax match fpTodo /\<TODO\>/ contained highlight link fpTodo Todo -highlight link fpError Error +