diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-04-11 21:38:50 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-04-11 21:38:50 +0000 |
commit | 4c3f536f472c7443ed4f672ae6d35a28805d7641 (patch) | |
tree | 18d0d8df6d45ff21449a017068aea2ba0931bd57 /runtime/syntax | |
parent | 779b74b2a23643aaac026341a4ed8bd6e04371e6 (diff) | |
download | vim-git-4c3f536f472c7443ed4f672ae6d35a28805d7641.tar.gz |
updated for version 7.0d01v7.0d01
Diffstat (limited to 'runtime/syntax')
-rw-r--r-- | runtime/syntax/cl.vim | 9 | ||||
-rw-r--r-- | runtime/syntax/dtd.vim | 4 | ||||
-rw-r--r-- | runtime/syntax/kconfig.vim | 728 | ||||
-rw-r--r-- | runtime/syntax/ocaml.vim | 6 | ||||
-rw-r--r-- | runtime/syntax/progress.vim | 102 | ||||
-rw-r--r-- | runtime/syntax/rexx.vim | 153 | ||||
-rw-r--r-- | runtime/syntax/xml.vim | 10 |
7 files changed, 927 insertions, 85 deletions
diff --git a/runtime/syntax/cl.vim b/runtime/syntax/cl.vim index 3c6f41ba8..30308e12a 100644 --- a/runtime/syntax/cl.vim +++ b/runtime/syntax/cl.vim @@ -1,8 +1,9 @@ " Vim syntax file " Language: cl ("Clever Language" by Multibase, http://www.mbase.com.au) " Filename extensions: *.ent, *.eni -" Maintainer: Philip Uren <philu@system77.com> -" Last update: Wed May 2 10:30:30 EST 2001 +" Maintainer: Philip Uren <philuSPAX@ieee.org> - Remove SPAX spam block +" Last update: Tue Apr 11 10:19:01 EST 2006 +" $Id$ " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -28,12 +29,15 @@ syn match clifError "\<elsif\>" syn match clifError "\<else\>" syn match clifError "\<endif\>" +syn match clSpaceError "\s\+$" + " If and while regions syn region clLoop transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure syn region clIf transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>" contains=ALLBUT,clBreak,clProcedure " Make those TODO notes and debugging stand out! syn keyword clTodo contained TODO BUG DEBUG FIX +syn match clNeedsWork contained "NEED[S]*\s\s*WORK" syn keyword clDebug contained debug syn match clComment "#.*$" contains=clTodo,clNeedsWork @@ -77,6 +81,7 @@ if version >= 508 || !exists("did_cl_syntax_inits") endif HiLink clifError Error + HiLink clSpaceError Error HiLink clWhile Repeat HiLink clConditional Conditional HiLink clDebug Debug diff --git a/runtime/syntax/dtd.vim b/runtime/syntax/dtd.vim index 0f80e199c..76778ba88 100644 --- a/runtime/syntax/dtd.vim +++ b/runtime/syntax/dtd.vim @@ -52,11 +52,11 @@ endif " if this is a html like comment hightlight also " the opening <! and the closing > as Comment. -syn region dtdComment start=+<![ \t]*--+ end=+-->+ contains=dtdTodo +syn region dtdComment start=+<![ \t]*--+ end=+-->+ contains=dtdTodo,@Spell " proper DTD comment -syn region dtdComment contained start=+--+ end=+--+ contains=dtdTodo +syn region dtdComment contained start=+--+ end=+--+ contains=dtdTodo,@Spell " Start tags (keywords). This is contained in dtdFunction. diff --git a/runtime/syntax/kconfig.vim b/runtime/syntax/kconfig.vim new file mode 100644 index 000000000..f7910144b --- /dev/null +++ b/runtime/syntax/kconfig.vim @@ -0,0 +1,728 @@ +" Vim syntax file +" Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2006-04-11 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +if exists("g:kconfig_syntax_heavy") + +syn match kconfigBegin '^' nextgroup=kconfigKeyword + \ skipwhite + +syn keyword kconfigTodo contained TODO FIXME XXX NOTE + +syn match kconfigComment display '#.*$' contains=kconfigTodo + +syn keyword kconfigKeyword config nextgroup=kconfigSymbol + \ skipwhite + +syn keyword kconfigKeyword menuconfig nextgroup=kconfigSymbol + \ skipwhite + +syn keyword kconfigKeyword comment menu mainmenu + \ nextgroup=kconfigKeywordPrompt + \ skipwhite + +syn keyword kconfigKeyword choice + \ nextgroup=@kconfigConfigOptions + \ skipwhite skipnl + +syn keyword kconfigKeyword endmenu endchoice + +syn keyword kconfigPreProc source + \ nextgroup=kconfigPath + \ skipwhite + +" TODO: This is a hack. The who .*Expr stuff should really be generated so +" that we can reuse it for various nextgroups. +syn keyword kconfigConditional if endif + \ nextgroup=@kconfigConfigOptionIfExpr + \ skipwhite + +syn match kconfigKeywordPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=@kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigPath '"[^"\\]*\%(\\.[^"\\]*\)*"\|\S\+' + \ contained + +syn match kconfigSymbol '\<\k\+\>' + \ contained + \ nextgroup=@kconfigConfigOptions + \ skipwhite skipnl + +" FIXME: There is – probably – no reason to cluster these instead of just +" defining them in the same group. +syn cluster kconfigConfigOptions contains=kconfigTypeDefinition, + \ kconfigInputPrompt, + \ kconfigDefaultValue, + \ kconfigDependencies, + \ kconfigReverseDependencies, + \ kconfigNumericalRanges, + \ kconfigHelpText, + \ kconfigDefBool, + \ kconfigOptional + +syn keyword kconfigTypeDefinition bool boolean tristate string hex int + \ contained + \ nextgroup=kconfigTypeDefPrompt, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigTypeDefPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigTypeDefPrompt "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn keyword kconfigInputPrompt prompt + \ contained + \ nextgroup=kconfigPromptPrompt + \ skipwhite + +syn match kconfigPromptPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigPromptPrompt "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn keyword kconfigDefaultValue default + \ contained + \ nextgroup=@kconfigConfigOptionExpr + \ skipwhite + +syn match kconfigDependencies 'depends on\|requires' + \ contained + \ nextgroup=@kconfigConfigOptionIfExpr + \ skipwhite + +syn keyword kconfigReverseDependencies select + \ contained + \ nextgroup=@kconfigRevDepSymbol + \ skipwhite + +syn cluster kconfigRevDepSymbol contains=kconfigRevDepCSymbol, + \ kconfigRevDepNCSymbol + +syn match kconfigRevDepCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigRevDepCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigRevDepNCSymbol '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn keyword kconfigNumericalRanges range + \ contained + \ nextgroup=@kconfigRangeSymbol + \ skipwhite + +syn cluster kconfigRangeSymbol contains=kconfigRangeCSymbol, + \ kconfigRangeNCSymbol + +syn match kconfigRangeCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=@kconfigRangeSymbol2 + \ skipwhite skipnl + +syn match kconfigRangeCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=@kconfigRangeSymbol2 + \ skipwhite skipnl + +syn match kconfigRangeNCSymbol '\<\k\+\>' + \ contained + \ nextgroup=@kconfigRangeSymbol2 + \ skipwhite skipnl + +syn cluster kconfigRangeSymbol2 contains=kconfigRangeCSymbol2, + \ kconfigRangeNCSymbol2 + +syn match kconfigRangeCSymbol2 "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigRangeNCSymbol2 '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn region kconfigHelpText contained + \ matchgroup=kconfigConfigOption + \ start='\%(help\|---help---\)\s*\n\ze\z(\s\+\)' + \ skip='^$' + \ end='^\z1\@!' + \ nextgroup=@kconfigConfigOptions + \ skipwhite skipnl + +" XXX: Undocumented +syn keyword kconfigDefBool def_bool + \ contained + \ nextgroup=@kconfigDefBoolSymbol + \ skipwhite + +syn cluster kconfigDefBoolSymbol contains=kconfigDefBoolCSymbol, + \ kconfigDefBoolNCSymbol + +syn match kconfigDefBoolCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigDefBoolCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigDefBoolNCSymbol '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +" XXX: This is actually only a valid option for “choice”, but treating it +" specially would require a lot of extra groups. +syn keyword kconfigOptional optional + \ contained + \ nextgroup=@kconfigConfigOptions + \ skipwhite skipnl + +syn keyword kconfigConfigOptionIf if + \ contained + \ nextgroup=@kconfigConfigOptionIfExpr + \ skipwhite + +syn cluster kconfigConfigOptionIfExpr contains=@kconfigConfOptIfExprSym, + \ kconfigConfOptIfExprNeg, + \ kconfigConfOptIfExprGroup + +syn cluster kconfigConfOptIfExprSym contains=kconfigConfOptIfExprCSym, + \ kconfigConfOptIfExprNCSym + +syn match kconfigConfOptIfExprCSym '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=@kconfigConfigOptions, + \ kconfigConfOptIfExprAnd, + \ kconfigConfOptIfExprOr, + \ kconfigConfOptIfExprEq, + \ kconfigConfOptIfExprNEq + \ skipwhite skipnl + +syn match kconfigConfOptIfExprCSym "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=@kconfigConfigOptions, + \ kconfigConfOptIfExprAnd, + \ kconfigConfOptIfExprOr, + \ kconfigConfOptIfExprEq, + \ kconfigConfOptIfExprNEq + \ skipwhite skipnl + +syn match kconfigConfOptIfExprNCSym '\<\k\+\>' + \ contained + \ nextgroup=@kconfigConfigOptions, + \ kconfigConfOptIfExprAnd, + \ kconfigConfOptIfExprOr, + \ kconfigConfOptIfExprEq, + \ kconfigConfOptIfExprNEq + \ skipwhite skipnl + +syn cluster kconfigConfOptIfExprSym2 contains=kconfigConfOptIfExprCSym2, + \ kconfigConfOptIfExprNCSym2 + +syn match kconfigConfOptIfExprEq '=' + \ contained + \ nextgroup=@kconfigConfOptIfExprSym2 + \ skipwhite + +syn match kconfigConfOptIfExprNEq '!=' + \ contained + \ nextgroup=@kconfigConfOptIfExprSym2 + \ skipwhite + +syn match kconfigConfOptIfExprCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=@kconfigConfigOptions, + \ kconfigConfOptIfExprAnd, + \ kconfigConfOptIfExprOr + \ skipwhite skipnl + +syn match kconfigConfOptIfExprNCSym2 '\<\k\+\>' + \ contained + \ nextgroup=@kconfigConfigOptions, + \ kconfigConfOptIfExprAnd, + \ kconfigConfOptIfExprOr + \ skipwhite skipnl + +syn match kconfigConfOptIfExprNeg '!' + \ contained + \ nextgroup=@kconfigConfigOptionIfExpr + \ skipwhite + +syn match kconfigConfOptIfExprAnd '&&' + \ contained + \ nextgroup=@kconfigConfigOptionIfExpr + \ skipwhite + +syn match kconfigConfOptIfExprOr '||' + \ contained + \ nextgroup=@kconfigConfigOptionIfExpr + \ skipwhite + +syn match kconfigConfOptIfExprGroup '(' + \ contained + \ nextgroup=@kconfigConfigOptionIfGExp + \ skipwhite + +" TODO: hm, this kind of recursion doesn't work right. We need another set of +" expressions that have kconfigConfigOPtionIfGExp as nextgroup and a matcher +" for '(' that sets it all off. +syn cluster kconfigConfigOptionIfGExp contains=@kconfigConfOptIfGExpSym, + \ kconfigConfOptIfGExpNeg, + \ kconfigConfOptIfExprGroup + +syn cluster kconfigConfOptIfGExpSym contains=kconfigConfOptIfGExpCSym, + \ kconfigConfOptIfGExpNCSym + +syn match kconfigConfOptIfGExpCSym '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=@kconfigConfigIf, + \ kconfigConfOptIfGExpAnd, + \ kconfigConfOptIfGExpOr, + \ kconfigConfOptIfGExpEq, + \ kconfigConfOptIfGExpNEq + \ skipwhite skipnl + +syn match kconfigConfOptIfGExpCSym "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=@kconfigConfigIf, + \ kconfigConfOptIfGExpAnd, + \ kconfigConfOptIfGExpOr, + \ kconfigConfOptIfGExpEq, + \ kconfigConfOptIfGExpNEq + \ skipwhite skipnl + +syn match kconfigConfOptIfGExpNCSym '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfOptIfExprGrpE, + \ kconfigConfOptIfGExpAnd, + \ kconfigConfOptIfGExpOr, + \ kconfigConfOptIfGExpEq, + \ kconfigConfOptIfGExpNEq + \ skipwhite skipnl + +syn cluster kconfigConfOptIfGExpSym2 contains=kconfigConfOptIfGExpCSym2, + \ kconfigConfOptIfGExpNCSym2 + +syn match kconfigConfOptIfGExpEq '=' + \ contained + \ nextgroup=@kconfigConfOptIfGExpSym2 + \ skipwhite + +syn match kconfigConfOptIfGExpNEq '!=' + \ contained + \ nextgroup=@kconfigConfOptIfGExpSym2 + \ skipwhite + +syn match kconfigConfOptIfGExpCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfOptIfExprGrpE, + \ kconfigConfOptIfGExpAnd, + \ kconfigConfOptIfGExpOr + \ skipwhite skipnl + +syn match kconfigConfOptIfGExpCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfOptIfExprGrpE, + \ kconfigConfOptIfGExpAnd, + \ kconfigConfOptIfGExpOr + \ skipwhite skipnl + +syn match kconfigConfOptIfGExpNCSym2 '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfOptIfExprGrpE, + \ kconfigConfOptIfGExpAnd, + \ kconfigConfOptIfGExpOr + \ skipwhite skipnl + +syn match kconfigConfOptIfGExpNeg '!' + \ contained + \ nextgroup=@kconfigConfigOptionIfGExp + \ skipwhite + +syn match kconfigConfOptIfGExpAnd '&&' + \ contained + \ nextgroup=@kconfigConfigOptionIfGExp + \ skipwhite + +syn match kconfigConfOptIfGExpOr '||' + \ contained + \ nextgroup=@kconfigConfigOptionIfGExp + \ skipwhite + +syn match kconfigConfOptIfExprGrpE ')' + \ contained + \ nextgroup=@kconfigConfigOptions, + \ kconfigConfOptIfExprAnd, + \ kconfigConfOptIfExprOr + \ skipwhite skipnl + + +syn cluster kconfigConfigOptionExpr contains=@kconfigConfOptExprSym, + \ kconfigConfOptExprNeg, + \ kconfigConfOptExprGroup + +syn cluster kconfigConfOptExprSym contains=kconfigConfOptExprCSym, + \ kconfigConfOptExprNCSym + +syn match kconfigConfOptExprCSym '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ kconfigConfOptExprAnd, + \ kconfigConfOptExprOr, + \ kconfigConfOptExprEq, + \ kconfigConfOptExprNEq, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigConfOptExprCSym "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ kconfigConfOptExprAnd, + \ kconfigConfOptExprOr, + \ kconfigConfOptExprEq, + \ kconfigConfOptExprNEq, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigConfOptExprNCSym '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ kconfigConfOptExprAnd, + \ kconfigConfOptExprOr, + \ kconfigConfOptExprEq, + \ kconfigConfOptExprNEq, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn cluster kconfigConfOptExprSym2 contains=kconfigConfOptExprCSym2, + \ kconfigConfOptExprNCSym2 + +syn match kconfigConfOptExprEq '=' + \ contained + \ nextgroup=@kconfigConfOptExprSym2 + \ skipwhite + +syn match kconfigConfOptExprNEq '!=' + \ contained + \ nextgroup=@kconfigConfOptExprSym2 + \ skipwhite + +syn match kconfigConfOptExprCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ kconfigConfOptExprAnd, + \ kconfigConfOptExprOr, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigConfOptExprCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ kconfigConfOptExprAnd, + \ kconfigConfOptExprOr, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigConfOptExprNCSym2 '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ kconfigConfOptExprAnd, + \ kconfigConfOptExprOr, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigConfOptExprNeg '!' + \ contained + \ nextgroup=@kconfigConfigOptionExpr + \ skipwhite + +syn match kconfigConfOptExprAnd '&&' + \ contained + \ nextgroup=@kconfigConfigOptionExpr + \ skipwhite + +syn match kconfigConfOptExprOr '||' + \ contained + \ nextgroup=@kconfigConfigOptionExpr + \ skipwhite + +syn match kconfigConfOptExprGroup '(' + \ contained + \ nextgroup=@kconfigConfigOptionGExp + \ skipwhite + +syn cluster kconfigConfigOptionGExp contains=@kconfigConfOptGExpSym, + \ kconfigConfOptGExpNeg, + \ kconfigConfOptGExpGroup + +syn cluster kconfigConfOptGExpSym contains=kconfigConfOptGExpCSym, + \ kconfigConfOptGExpNCSym + +syn match kconfigConfOptGExpCSym '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfOptExprGrpE, + \ kconfigConfOptGExpAnd, + \ kconfigConfOptGExpOr, + \ kconfigConfOptGExpEq, + \ kconfigConfOptGExpNEq + \ skipwhite skipnl + +syn match kconfigConfOptGExpCSym "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfOptExprGrpE, + \ kconfigConfOptGExpAnd, + \ kconfigConfOptGExpOr, + \ kconfigConfOptGExpEq, + \ kconfigConfOptGExpNEq + \ skipwhite skipnl + +syn match kconfigConfOptGExpNCSym '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfOptExprGrpE, + \ kconfigConfOptGExpAnd, + \ kconfigConfOptGExpOr, + \ kconfigConfOptGExpEq, + \ kconfigConfOptGExpNEq + \ skipwhite skipnl + +syn cluster kconfigConfOptGExpSym2 contains=kconfigConfOptGExpCSym2, + \ kconfigConfOptGExpNCSym2 + +syn match kconfigConfOptGExpEq '=' + \ contained + \ nextgroup=@kconfigConfOptGExpSym2 + \ skipwhite + +syn match kconfigConfOptGExpNEq '!=' + \ contained + \ nextgroup=@kconfigConfOptGExpSym2 + \ skipwhite + +syn match kconfigConfOptGExpCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfOptExprGrpE, + \ kconfigConfOptGExpAnd, + \ kconfigConfOptGExpOr + \ skipwhite skipnl + +syn match kconfigConfOptGExpCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfOptExprGrpE, + \ kconfigConfOptGExpAnd, + \ kconfigConfOptGExpOr + \ skipwhite skipnl + +syn match kconfigConfOptGExpNCSym2 '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfOptExprGrpE, + \ kconfigConfOptGExpAnd, + \ kconfigConfOptGExpOr + \ skipwhite skipnl + +syn match kconfigConfOptGExpNeg '!' + \ contained + \ nextgroup=@kconfigConfigOptionGExp + \ skipwhite + +syn match kconfigConfOptGExpAnd '&&' + \ contained + \ nextgroup=@kconfigConfigOptionGExp + \ skipwhite + +syn match kconfigConfOptGExpOr '||' + \ contained + \ nextgroup=@kconfigConfigOptionGExp + \ skipwhite + +syn match kconfigConfOptExprGrpE ')' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ kconfigConfOptExprAnd, + \ kconfigConfOptExprOr + \ skipwhite skipnl + +hi def link kconfigTodo Todo +hi def link kconfigComment Comment +hi def link kconfigKeyword Keyword +hi def link kconfigPreProc PreProc +hi def link kconfigConditional Conditional +hi def link kconfigPrompt String +hi def link kconfigKeywordPrompt kconfigPrompt +hi def link kconfigPath String +hi def link kconfigSymbol String +hi def link kconfigConstantSymbol Constant +hi def link kconfigConfigOption Type +hi def link kconfigTypeDefinition kconfigConfigOption +hi def link kconfigTypeDefPrompt kconfigPrompt +hi def link kconfigInputPrompt kconfigConfigOption +hi def link kconfigPromptPrompt kconfigPrompt +hi def link kconfigDefaultValue kconfigConfigOption +hi def link kconfigDependencies kconfigConfigOption +hi def link kconfigReverseDependencies kconfigConfigOption +hi def link kconfigRevDepCSymbol kconfigConstantSymbol +hi def link kconfigRevDepNCSymbol kconfigSymbol +hi def link kconfigNumericalRanges kconfigConfigOption +hi def link kconfigRangeCSymbol kconfigConstantSymbol +hi def link kconfigRangeNCSymbol kconfigSymbol +hi def link kconfigRangeCSymbol2 kconfigConstantSymbol +hi def link kconfigRangeNCSymbol2 kconfigSymbol +hi def link kconfigHelpText Normal +hi def link kconfigDefBool kconfigConfigOption +hi def link kconfigDefBoolCSymbol kconfigConstantSymbol +hi def link kconfigDefBoolNCSymbol kconfigSymbol +hi def link kconfigOptional kconfigConfigOption +hi def link kconfigConfigOptionIf Conditional +hi def link kconfigConfOptIfExprCSym kconfigConstantSymbol +hi def link kconfigConfOptIfExprNCSym kconfigSymbol +hi def link kconfigOperator Operator +hi def link kconfigConfOptIfExprEq kconfigOperator +hi def link kconfigConfOptIfExprNEq kconfigOperator +hi def link kconfigConfOptIfExprCSym2 kconfigConstantSymbol +hi def link kconfigConfOptIfExprNCSym2 kconfigSymbol +hi def link kconfigConfOptIfExprNeg kconfigOperator +hi def link kconfigConfOptIfExprAnd kconfigOperator +hi def link kconfigConfOptIfExprOr kconfigOperator +hi def link kconfigDelimiter Delimiter +hi def link kconfigConfOptIfExprGroup kconfigDelimiter +hi def link kconfigConfOptIfGExpCSym kconfigConstantSymbol +hi def link kconfigConfOptIfGExpNCSym kconfigSymbol +hi def link kconfigConfOptIfGExpEq kconfigOperator +hi def link kconfigConfOptIfGExpNEq kconfigOperator +hi def link kconfigConfOptIfGExpCSym2 kconfigConstantSymbol +hi def link kconfigConfOptIfGExpNCSym2 kconfigSymbol +hi def link kconfigConfOptIfGExpNeg kconfigOperator +hi def link kconfigConfOptIfGExpAnd kconfigOperator +hi def link kconfigConfOptIfGExpOr kconfigOperator +hi def link kconfigConfOptIfExprGrpE kconfigDelimiter +hi def link kconfigConfOptExprCSym kconfigConstantSymbol +hi def link kconfigConfOptExprNCSym kconfigSymbol +hi def link kconfigConfOptExprEq kconfigOperator +hi def link kconfigConfOptExprNEq kconfigOperator +hi def link kconfigConfOptExprCSym2 kconfigConstantSymbol +hi def link kconfigConfOptExprNCSym2 kconfigSymbol +hi def link kconfigConfOptExprNeg kconfigOperator +hi def link kconfigConfOptExprAnd kconfigOperator +hi def link kconfigConfOptExprOr kconfigOperator +hi def link kconfigConfOptExprGroup kconfigDelimiter +hi def link kconfigConfOptGExpCSym kconfigConstantSymbol +hi def link kconfigConfOptGExpNCSym kconfigSymbol +hi def link kconfigConfOptGExpEq kconfigOperator +hi def link kconfigConfOptGExpNEq kconfigOperator +hi def link kconfigConfOptGExpCSym2 kconfigConstantSymbol +hi def link kconfigConfOptGExpNCSym2 kconfigSymbol +hi def link kconfigConfOptGExpNeg kconfigOperator +hi def link kconfigConfOptGExpAnd kconfigOperator +hi def link kconfigConfOptGExpOr kconfigOperator +hi def link kconfigConfOptExprGrpE kconfigConfOptIfExprGroup + +else + +syn keyword kconfigTodo contained TODO FIXME XXX NOTE + +syn match kconfigComment display '#.*$' contains=kconfigTodo + +syn keyword kconfigKeyword config menuconfig comment menu mainmenu + +syn keyword kconfigConditional choice endchoice if endif + +syn keyword kconfigPreProc source + \ nextgroup=kconfigPath + \ skipwhite + +syn match kconfigSpecialChar contained '\\.' + +syn region kconfigPath matchgroup=kconfigPath + \ start=+"+ skip=+\\\\\|\\\"+ end=+"+ + \ contains=kconfigSpecialChar + +syn region kconfigPath matchgroup=kconfigPath + \ start=+'+ skip=+\\\\\|\\\'+ end=+'+ + \ contains=kconfigSpecialChar + +syn match kconfigPath '\S\+' + \ contained + +syn region kconfigString matchgroup=kconfigString + \ start=+"+ skip=+\\\\\|\\\"+ end=+"+ + \ contains=kconfigSpecialChar + +syn region kconfigString matchgroup=kconfigString + \ start=+'+ skip=+\\\\\|\\\'+ end=+'+ + \ contains=kconfigSpecialChar + +syn keyword kconfigType bool boolean tristate string hex int + +syn keyword kconfigOption prompt default requires select range + \ optional +syn match kconfigOption 'depends\%( on\)' + +syn keyword kconfigMacro def_bool def_tristate + +syn region kconfigHelpText contained + \ matchgroup=kconfigConfigOption + \ start='\%(help\|---help---\)\s*\n\ze\z(\s\+\)' + \ skip='^$' + \ end='^\z1\@!' + +hi def link kconfigTodo Todo +hi def link kconfigComment Comment +hi def link kconfigKeyword Keyword +hi def link kconfigConditional Conditional +hi def link kconfigPreProc PreProc +hi def link kconfigSpecialChar SpecialChar +hi def link kconfigPath String +hi def link kconfigString String +hi def link kconfigType Type +hi def link kconfigOption Identifier +hi def link kconfigHelpText Normal +hi def link kconfigmacro Macro + +endif + +let b:current_syntax = "kconfig" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/ocaml.vim b/runtime/syntax/ocaml.vim index d95a3c8d4..cdef8c38b 100644 --- a/runtime/syntax/ocaml.vim +++ b/runtime/syntax/ocaml.vim @@ -5,9 +5,9 @@ " Karl-Heinz Sylla <Karl-Heinz.Sylla@gmd.de> " Issac Trotts <ijtrotts@ucdavis.edu> " URL: http://www.ocaml.info/vim/syntax/ocaml.vim -" Last Change: 2005 May 18 - Added 'NOTE' to highlighted comment words (MM) +" Last Change: 2006 Apr 11 - Fixed an initialization bug (MM) +" 2005 May 18 - Added 'NOTE' to highlighted comment words (MM) " 2005 Apr 14 - Fixed a small bug concerning 'include' (MM) -" 2005 Mar 15 - Added a patch from David Baelde (MM) " A minor patch was applied to the official version so that object/end " can be distinguished from begin/end, which is used for indentation, @@ -17,7 +17,7 @@ " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear -elseif exists("b:current_syntax") && b:current_syntax != "ocaml" +elseif exists("b:current_syntax") && b:current_syntax == "ocaml" finish endif diff --git a/runtime/syntax/progress.vim b/runtime/syntax/progress.vim index dd29310ad..576042397 100644 --- a/runtime/syntax/progress.vim +++ b/runtime/syntax/progress.vim @@ -3,12 +3,12 @@ " Filename extensions: *.p (collides with Pascal), " *.i (collides with assembler) " *.w (collides with cweb) -" Maintainer: Philip Uren <philu@computer.org> -" Contributors: Chris Ruprecht <chrup@mac.com> -" Philip Uren <philu@computer.org> +" Maintainer: Philip Uren <philuSPAX@ieee.org> Remove "SPAX" spam block +" Contributors: Chris Ruprecht <chrup@mac.com> " Mikhail Kuperblum <mikhail@whasup.com> -" URL: http://www.zeta.org.au/~philu/vim/progress.vim -" Last Change: Thu May 3 08:49:47 EST 2001 +" John Florian <jflorian@voyager.net> +" Last Change: Tue Apr 11 10:18:23 EST 2006 +" $Id$ " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -24,6 +24,9 @@ else set iskeyword=@,48-57,_,-,!,#,$,% endif +" The Progress editor doesn't cope with tabs very well. +set expandtab + syn case ignore " Progress Blocks of code and mismatched "end." errors. @@ -31,7 +34,7 @@ syn match ProgressEndError "\<end\>" syn region ProgressDoBlock transparent matchgroup=ProgressDo start="\<do\>" matchgroup=ProgressDo end="\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction syn region ProgressForBlock transparent matchgroup=ProgressFor start="\<for\>" matchgroup=ProgressFor end="\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction syn region ProgressRepeatBlock transparent matchgroup=ProgressRepeat start="\<repeat\>" matchgroup=ProgressRepeat end="\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction -syn region ProgressCaseBlock transparent matchgroup=ProgressCase start="\<case\>" matchgroup=ProgressCase end="\<end\scase\>" contains=ALLBUT,ProgressProcedure,ProgressFunction +syn region ProgressCaseBlock transparent matchgroup=ProgressCase start="\<case\>" matchgroup=ProgressCase end="\<end\scase\>\|\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction " These are Progress reserved words, " and they could go in ProgressReserved, @@ -43,14 +46,23 @@ syn keyword ProgressFor each where syn keyword ProgressTodo contained TODO BUG FIX syn keyword ProgressDebug contained DEBUG syn keyword ProgressDebug debugger - -syn keyword ProgressFunction procedure function +syn match ProgressTodo contained "NEED[S]*\s\s*WORK" + +" If you like to highlight the whole line of +" the start and end of procedures +" to make the whole block of code stand out: +syn match ProgressProcedure "^\s*procedure.*" +syn match ProgressProcedure "^\s*end\s\s*procedure.*" +syn match ProgressFunction "^\s*function.*" +syn match ProgressFunction "^\s*end\s\s*function.*" +" ... otherwise use this: +" syn keyword ProgressFunction procedure function syn keyword ProgressReserved accum[ulate] active-window add alias all alter ambig[uous] analyz[e] and any apply as asc[ending] assign at attr[-space] syn keyword ProgressReserved authorization auto-ret[urn] avail[able] back[ground] before-h[ide] begins bell between blank break btos by call can-do can-find -syn keyword ProgressReserved center[ed] check chr clear clipboard col colon color col[umn] column-lab[el] col[umns] compiler connected control count-of +syn keyword ProgressReserved center[ed] character check chr clear clipboard col colon color col[umn] column-lab[el] col[umns] compiler connected control count-of syn keyword ProgressReserved cpstream create ctos current current-changed current-lang[uage] current-window current_date curs[or] database dataservers -syn keyword ProgressReserved dbcodepage dbcollation dbname dbrest[rictions] dbtaskid dbtype dbvers[ion] dde deblank debug-list debugger decimals declare +syn keyword ProgressReserved dbcodepage dbcollation dbname dbrest[rictions] dbtaskid dbtype dbvers[ion] dde deblank debug-list debugger decimal decimals declare syn keyword ProgressReserved def default default-noxl[ate] default-window def[ine] delete delimiter desc[ending] dict[ionary] disable discon[nect] disp syn keyword ProgressReserved disp[lay] distinct dos down drop editing enable encode entry error-stat[us] escape etime except exclusive syn keyword ProgressReserved exclusive[-lock] exclusive-web-us[er] exists export false fetch field field[s] file-info[rmation] fill find find-case-sensitive @@ -58,7 +70,7 @@ syn keyword ProgressReserved find-global find-next-occurrence find-prev-occurren syn keyword ProgressReserved fram[e] frame-col frame-db frame-down frame-field frame-file frame-inde[x] frame-line frame-name frame-row frame-val[ue] syn keyword ProgressReserved from from-c[hars] from-p[ixels] gateway[s] get-byte get-codepage[s] get-coll[ations] get-key-val[ue] getbyte global go-on syn keyword ProgressReserved go-pend[ing] grant graphic-e[dge] group having header help hide import in index indicator input input-o[utput] insert -syn keyword ProgressReserved into is is-attr[-space] join kblabel key-code key-func[tion] key-label keycode keyfunc[tion] keylabel keys keyword label +syn keyword ProgressReserved integer into is is-attr[-space] join kblabel key-code key-func[tion] key-label keycode keyfunc[tion] keylabel keys keyword label syn keyword ProgressReserved last last-even[t] last-key last-of lastkey ldbname leave library like line-count[er] listi[ng] locked lookup machine-class syn keyword ProgressReserved map member message message-lines mouse mpe new next next-prompt no no-attr[-space] no-error no-f[ill] no-help no-hide no-label[s] syn keyword ProgressReserved no-lock no-map no-mes[sage] no-pause no-prefe[tch] no-undo no-val[idate] no-wait not null num-ali[ases] num-dbs num-entries @@ -70,39 +82,51 @@ syn keyword ProgressReserved release reposition retain retry return return-val[u syn keyword ProgressReserved scroll sdbname search seek select self session set setuser[id] share[-lock] shared show-stat[s] skip some space status stream syn keyword ProgressReserved stream-io string-xref system-dialog table term term[inal] text text-cursor text-seg[-growth] this-procedure time title syn keyword ProgressReserved to today top-only trans trans[action] trigger triggers trim true underl[ine] undo unform[atted] union unique unix up update -syn keyword ProgressReserved use-index use-revvideo use-underline user user[id] using v6frame value values view view-as vms wait-for web-con[text] +syn keyword ProgressReserved use-index use-revvideo use-underline user user[id] using v6frame value values variable view view-as vms wait-for web-con[text] syn keyword ProgressReserved window window-maxim[ized] window-minim[ized] window-normal with work-tab[le] workfile write xcode xref yes _cbit -syn keyword ProgressReserved _control _list _memory _msg _pcontrol _serial[-num] _trace +syn keyword ProgressReserved _control _list _memory _msg _pcontrol _serial[-num] _trace " Strings. Handles embedded quotes. " Note that, for some reason, Progress doesn't use the backslash, "\" " as the escape character; it uses tilde, "~". -syn region ProgressString matchgroup=ProgressQuote start=+"+ end=+"+ skip=+\~"+ -syn region ProgressString matchgroup=ProgressQuote start=+'+ end=+'+ skip=+\~'+ +syn region ProgressString matchgroup=ProgressQuote start=+"+ end=+"+ skip=+\~'\|\~\~+ +syn region ProgressString matchgroup=ProgressQuote start=+'+ end=+'+ skip=+\~'\|\~\~+ -syn match ProgressIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>()" +syn match ProgressIdentifier "\<[a-zA-Z_%#]+\>()" " syn match ProgressDelimiter "()" -" syn match ProgressMatrixDelimiter "[][]" - +syn match ProgressMatrixDelimiter "[][]" " If you prefer you can highlight the range "syn match ProgressMatrixDelimiter "[\d\+\.\.\d\+]" -syn match ProgressNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +syn match ProgressNumber "\<\-\=\d\+\(u\=l\=\|lu\|f\)\>" syn match ProgressByte "\$[0-9a-fA-F]\+" -" If you don't like tabs: -"syn match ProgressShowTab "\t" -"syn match ProgressShowTabc "\t" +" More values: Logicals, and Progress's unknown value, ?. +syn match ProgressNumber "?" +syn keyword ProgressNumber true false yes no -syn region ProgressComment start="/\*" end="\*/" contains=ProgressComment,ProgressTodo,ProgressDebug -syn match ProgressInclude "^[ ]*[{].*\.i[}]" +" If you don't like tabs: +syn match ProgressShowTab "\t" -syn match ProgressSubstitute "^[ ]*[{].*[^i][}]" -syn match ProgressPreProc "^[ ]*&.*" +" If you don't like white space on the end of lines: +" syn match ProgressSpaceError "\s\+$" -syn match ProgressOperator "[!;|)(:.><+*=-]" +syn region ProgressComment start="/\*" end="\*/" contains=ProgressComment,ProgressTodo,ProgressDebug +syn region ProgressInclude start="^[ ]*[{][^&]" end="[}]" contains=ProgressPreProc,ProgressOperator,ProgressString,ProgressComment +syn region ProgressPreProc start="&" end="\>" contained + +" This next line works reasonably well. +" syn match ProgressOperator "[!;|)(:.><+*=-]" +" +" Progress allows a '-' to be part of an identifier. To be considered +" the subtraction/negation operation operator it needs a non-word +" character on either side. Also valid are cases where the minus +" operation appears at the beginning or end of a line. +" This next line trips up on "no-undo" etc. +" syn match ProgressOperator "[!;|)(:.><+*=]\|\W-\W\|^-\W\|\W-$" +syn match ProgressOperator "[!;|)(:.><+*=]\|\s-\s\|^-\s\|\s-$" syn keyword ProgressOperator <= <> >= abs[olute] accelerator across add-first add-last advise alert-box allow-replication ansi-only anywhere append appl-alert[-boxes] application as-cursor ask-overwrite syn keyword ProgressOperator attach[ment] auto-end-key auto-endkey auto-go auto-ind[ent] auto-resize auto-z[ap] available-formats ave[rage] avg backward[s] base-key batch[-mode] bgc[olor] binary @@ -114,7 +138,7 @@ syn keyword ProgressOperator column-label-bgc[olor] column-label-dcolor column-l syn keyword ProgressOperator connect constrained contents context context-pop[up] control-containe[r] c[ontrol-form] convert-to-offse[t] convert count cpcase cpcoll cpint[ernal] cplog syn keyword ProgressOperator cpprint cprcodein cprcodeout cpterm crc-val[ue] c[reate-control] create-result-list-entry create-test-file current-column current-environm[ent] current-iteration syn keyword ProgressOperator current-result-row current-row-modified current-value cursor-char cursor-line cursor-offset data-entry-retur[n] data-t[ype] date date-f[ormat] day db-references -syn keyword ProgressOperator dcolor dde-error dde-i[d] dde-item dde-name dde-topic debu[g] dec[imal] default-b[utton] default-extensio[n] defer-lob-fetch defined delete-char delete-current-row +syn keyword ProgressOperator dcolor dde-error dde-i[d] dde-item dde-name dde-topic debu[g] dec[imal] default-b[utton] default-extensio[n] defer-lob-fetch define defined delete-char delete-current-row syn keyword ProgressOperator delete-line delete-selected-row delete-selected-rows deselect-focused-row deselect-rows deselect-selected-row d[esign-mode] dialog-box dialog-help dir disabled display-message syn keyword ProgressOperator display-t[ype] double drag-enabled drop-down drop-down-list dump dynamic echo edge edge[-chars] edge-p[ixels] editor empty end-key endkey entered eq error error-col[umn] syn keyword ProgressOperator error-row event-t[ype] event[s] exclusive-id execute exp expand extended extent external extract fetch-selected-row fgc[olor] file file-name file-off[set] file-type @@ -174,38 +198,30 @@ if version >= 508 || !exists("did_progress_syntax_inits") endif " The default methods for highlighting. Can be overridden later. - HiLink ProgressByte Number + HiLink ProgressByte Number HiLink ProgressCase Repeat - HiLink ProgressComment StatusLine + HiLink ProgressComment Comment HiLink ProgressConditional Conditional HiLink ProgressDebug Debug HiLink ProgressDo Repeat HiLink ProgressEndError Error HiLink ProgressFor Repeat HiLink ProgressFunction Procedure + HiLink ProgressIdentifier Identifier HiLink ProgressInclude Include - HiLink ProgressLabel Label HiLink ProgressMatrixDelimiter Identifier - HiLink ProgressModifier Type HiLink ProgressNumber Number - HiLink ProgressOperator Function + HiLink ProgressOperator Operator HiLink ProgressPreProc PreProc HiLink ProgressProcedure Procedure HiLink ProgressQuote Delimiter HiLink ProgressRepeat Repeat - HiLink ProgressReserved Identifier + HiLink ProgressReserved Statement + HiLink ProgressSpaceError Error HiLink ProgressString String - HiLink ProgressStructure Structure - HiLink ProgressSubstitute PreProc HiLink ProgressTodo Todo HiLink ProgressType Statement - HiLink ProgressUnclassified Statement - - " Optional highlighting - " HiLink ProgressDelimiter Identifier - " HiLink ProgressShowTab Error - " HiLink ProgressShowTabc Error - " HiLink ProgressIdentifier Identifier + HiLink ProgressShowTab Error delcommand HiLink endif diff --git a/runtime/syntax/rexx.vim b/runtime/syntax/rexx.vim index ef4b058b5..179e453c9 100644 --- a/runtime/syntax/rexx.vim +++ b/runtime/syntax/rexx.vim @@ -1,11 +1,15 @@ " Vim syntax file " Language: Rexx " Maintainer: Thomas Geulig <geulig@nentec.de> -" Last Change: 2001 May 2 -" URL: http://mywebpage.netscape.com/sharpPeople/vim/syntax/rexx.vim +" Last Change: 2005 Dez 9, added some <http://www.ooRexx.org>-coloring, +" line comments, do *over*, messages, directives, +" highlighting classes, methods, routines and requires +" Rony G. Flatscher <rony.flatscher@wu-wien.ac.at> " -" Special Thanks to Dan Sharp <dwsharp@hotmail.com> for comments and additions -" (and providing the webspace) +" URL: http://www.geulig.de/vim/rexx.vim +" +" Special Thanks to Dan Sharp <dwsharp@hotmail.com> and Rony G. Flatscher +" <Rony.Flatscher@wu-wien.ac.at> for comments and additions " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -17,65 +21,126 @@ endif syn case ignore +" add to valid identifier chars +setlocal iskeyword+=. +setlocal iskeyword+=! +setlocal iskeyword+=? + +" ---rgf, position important: must be before comments etc. ! +syn match rexxOperator "[-=|\/\\\+\*\[\],;<>&\~]" + +syn match rexxIdentifier "\<[a-zA-Z\!\?_]\([a-zA-Z0-9._?!]\)*\>" +syn match rexxEnvironmentSymbol "\<\.\+\([a-zA-Z0-9._?!]\)*\>" + + " A Keyword is the first symbol in a clause. A clause begins at the start " of a line or after a semicolon. THEN, ELSE, OTHERWISE, and colons are always " followed by an implied semicolon. -syn match rexxClause "\(^\|;\|:\|then \|else \|otherwise \)\s*\w\+" contains=ALL +syn match rexxClause "\(^\|;\|:\|then \|else \|otherwise \)\s*\w\+" contains=ALLBUT,rexxParse2,rexxRaise2 + " Considered keywords when used together in a phrase and begin a clause -syn match rexxKeyword contained "\<signal\( on \(error\|failure\|halt\|notready\|novalue\|syntax\|lostdigits\)\(\s\+name\)\=\)\=\>" -syn match rexxKeyword contained "\<signal off \(error\|failure\|halt\|notready\|novalue\|syntax\|lostdigits\)\>" -syn match rexxKeyword contained "\<call off \(error\|failure\|halt\|notready\)\>" -syn match rexxKeyword contained "\<parse \(upper \)\=\(arg\|linein\|pull\|source\|var\|value\|version\)\>" +syn match rexxParse "\<parse\s*\(\(upper\|lower\|caseless\)\s*\)\=\(arg\|linein\|pull\|source\|var\|\<value\>\|version\)\>" +syn match rexxParse2 "\<with\>" contained containedin=rexxParse + + syn match rexxKeyword contained "\<numeric \(digits\|form \(scientific\|engineering\|value\)\|fuzz\)\>" syn match rexxKeyword contained "\<\(address\|trace\)\( value\)\=\>" -syn match rexxKeyword contained "\<procedure\( expose\)\=\>" -syn match rexxKeyword contained "\<do\( forever\)\=\>" +syn match rexxKeyword contained "\<procedure\(\s*expose\)\=\>" +syn match rexxKeyword contained "\<do\>\(\s*forever\)\=\>" +syn match rexxKeyword contained "\<use\>\s*\<arg\>" " Another keyword phrase, separated to aid highlighting in rexxFunction -syn match rexxKeyword2 contained "\<call\( on \(error\|failure\|halt\|notready\)\(\s\+name\)\=\)\=\>" +syn match rexxKeyword contained "\<signal\(\s*\(on\|off\)\s*\(any\|error\|failure\|halt\|lostdigits\|nomethod\|nostring\|notready\|novalue\|syntax\|user\s*\k*\)\(\s\+name\)\=\)\=\>" +syn match rexxKeyword2 contained "\<call\(\s*\(on\|off\)\s*\(any\|error\|failure\|halt\|notready\|user\s*\k*\)\(\s\+name\)\=\)\=\>" + " Considered keywords when they begin a clause -syn match rexxKeyword contained "\<\(arg\|drop\|end\|exit\|if\|interpret\|iterate\|leave\|nop\)\>" -syn match rexxKeyword contained "\<\(options\|pull\|push\|queue\|return\|say\|select\|trace\)\>" +syn match rexxKeyword contained "\<\(arg\|do\|drop\|end\|exit\|expose\|forward\|if\|interpret\|iterate\|leave\|nop\)\>" +syn match rexxKeyword contained "\<\(options\|pull\|push\|queue\|raise\|reply\|return\|say\|select\|trace\)\>" " Conditional phrases -syn match rexxConditional "\(^\s*\| \)\(to\|by\|for\|until\|while\|then\|when\|otherwise\|else\)\( \|\s*$\)" contains=ALLBUT,rexxConditional -syn match rexxConditional contained "\<\(to\|by\|for\|until\|while\|then\|when\|else\|otherwise\)\>" +syn match rexxConditional "\(^\s*\| \)\(to\|by\|for\|until\|while\|then\|when\|otherwise\|else\|over\)\( \|\s*$\)" +syn match rexxConditional contained "\<\(to\|by\|for\|until\|while\|then\|when\|otherwise\|else\|over\)\>" + +" must be after Conditional phrases! +syn match rexxKeyword ".*\<\(then\|else\)\s*\<do\>" -" Assignments -- a keyword followed by an equal sign becomes a variable -syn match rexxAssign "\<\w\+\s*=\s*" contains=rexxSpecialVariable +" Raise statement +syn match rexxRaise "\(^\|;\|:\)\s\+\<raise\>\s*\<\(propagate\|error\|failure\|syntax\|user\)\>\=" +syn match rexxRaise2 "\<\(additional\|array\|description\|exit\|return\)\>" contained containedin=rexxRaise + +" Forward statement keywords +syn match rexxForward "\(^\|;\|:\)\<forward\>\s*" +syn match rexxForward2 "\<\(arguments\|array\|continue\|message\|class\|to\)\>" contained containedin=rexxForward " Functions/Procedures -syn match rexxFunction "\<\h\w*\(/\*\s*\*/\)*("me=e-1 contains=rexxComment,rexxConditional,rexxKeyword -syn match rexxFunction "\<\(arg\|trace\)\(/\*\s*\*/\)*("me=e-1 -syn match rexxFunction "\<call\( on \(error\|failure\|halt\|notready\)\(\s\+name\)\=\)\=\>\s\+\w\+\>" contains=rexxKeyword2 +syn match rexxFunction "\<\w*\(/\*\s*\*/\)*("me=e-1 contains=rexxComment,rexxConditional,rexxKeyword,rexxIdentifier +syn match rexxFunction "\<\<[a-zA-Z\!\?_]\([a-zA-Z0-9._?!]\)*\>("me=e-1 +syn match rexxFunction "\<call\s\+\k\+\>" contains=rexxKeyword2 +syn match rexxFunction "[()]" " String constants -syn region rexxString start=+"+ skip=+\\\\\|\\'+ end=+"+ -syn region rexxString start=+'+ skip=+\\\\\|\\"+ end=+'+ -syn match rexxCharacter +"'[^\\]'"+ +syn region rexxString start=+"+ skip=+""+ end=+"\(x\|b\)\=+ oneline +syn region rexxString start=+'+ skip=+''+ end=+'\(x\|b\)\=+ oneline " Catch errors caused by wrong parenthesis -syn region rexxParen transparent start='(' end=')' contains=ALLBUT,rexxParenError,rexxTodo,rexxUserLabel,rexxKeyword +syn region rexxParen transparent start='(' end=')' contains=ALLBUT,rexxParenError,rexxTodo,rexxLabel,rexxKeyword syn match rexxParenError ")" syn match rexxInParen "[\\[\\]{}]" " Comments syn region rexxComment start="/\*" end="\*/" contains=rexxTodo,rexxComment syn match rexxCommentError "\*/" +syn match rexxLineComment /--.*/ syn keyword rexxTodo contained TODO FIXME XXX + +" ooRexx messages +syn region rexxMessageOperator start="\(\~\|\~\~\)" end="\(\S\|\s\)"me=e-1 +syn match rexxMessage "\(\~\|\~\~\)\s*\<\.*[a-zA-Z]\([a-zA-Z0-9._?!]\)*\>" contains=rexxMessageOperator + " Highlight User Labels -syn match rexxUserLabel "\<\I\i*\s*:"me=e-1 +syn match rexxLabel "^\s*\k*\s*:"me=e-1 + +syn match rexxLineContinue ",\ze\s*\(--.*\|\/\*.*\)*$" +" the following is necessary, otherwise three consecutive dashes will cause it to highlight the first one +syn match rexxLineContinue "-\ze\(\s+--.*\|\s*\/\*.*\)*$" " Special Variables -syn keyword rexxSpecialVariable sigl rc result -syn match rexxCompoundVariable "\<\w\+\.\w*\>" +syn keyword rexxSpecialVariable sigl rc result self super + +" Constants +syn keyword rexxConst .true .false .nil + +" ooRexx builtin classes, first define dot to be o.k. in keywords +syn keyword rexxBuiltinClass .object .class .method .message +syn keyword rexxBuiltinClass .monitor .alarm +syn keyword rexxBuiltinClass .stem .stream .string +syn keyword rexxBuiltinClass .mutablebuffer +syn keyword rexxBuiltinClass .array .list .queue .directory .table .set +syn keyword rexxBuiltinClass .relation .bag .supplier .regularExpressions + +" Windows-only classes +syn keyword rexxBuiltinClass .OLEObject .MenuObject .WindowsClipboard .WindowsEventLog +syn keyword rexxBuiltinClass .WindowsManager .WindowObject .WindowsProgramManager + + +" ooRexx directives, ---rgf location important, otherwise directives in top of +" file not matched! +syn region rexxClass start="::\s*class\s*"ms=e+1 end="\ze\(\s\|;\|$\)" +syn region rexxMethod start="::\s*method\s*"ms=e+1 end="\ze\(\s\|;\|$\)" +syn region rexxRequires start="::\s*requires\s*"ms=e+1 end="\ze\(\s\|;\|$\)" +syn region rexxRoutine start="::\s*routine\s*"ms=e+1 end="\ze\(\s\|;\|$\)" + +syn region rexxDirective start="\(^\|;\)\s*::\s*\w\+" end="\($\|;\)" contains=rexxString,rexxComment,rexxLineComment,rexxClass,rexxMethod,rexxRoutine,rexxRequires keepend + + if !exists("rexx_minlines") - let rexx_minlines = 10 +" let rexx_minlines = 10 + let rexx_minlines = 500 endif exec "syn sync ccomment rexxComment minlines=" . rexx_minlines @@ -90,7 +155,7 @@ if version >= 508 || !exists("did_rexx_syn_inits") command -nargs=+ HiLink hi def link <args> endif - HiLink rexxUserLabel Function + HiLink rexxLabel Function HiLink rexxCharacter Character HiLink rexxParenError rexxError HiLink rexxInParen rexxError @@ -105,6 +170,34 @@ if version >= 508 || !exists("did_rexx_syn_inits") HiLink rexxSpecialVariable Special HiLink rexxConditional rexxKeyword + HiLink rexxOperator Operator + HiLink rexxMessageOperator rexxOperator + HiLink rexxLineComment RexxComment + + HiLink rexxLineContinue WildMenu + + HiLink rexxDirective rexxKeyword + HiLink rexxClass Type + HiLink rexxMethod rexxFunction + HiLink rexxRequires Include + HiLink rexxRoutine rexxFunction + + HiLink rexxConst Constant + HiLink rexxTypeSpecifier Type + HiLink rexxBuiltinClass rexxTypeSpecifier + + HiLink rexxEnvironmentSymbol rexxConst + HiLink rexxMessage rexxFunction + + HiLink rexxParse rexxKeyword + HiLink rexxParse2 rexxParse + + HiLink rexxRaise rexxKeyword + HiLink rexxRaise2 rexxRaise + + HiLink rexxForward rexxKeyword + HiLink rexxForward2 rexxForward + delcommand HiLink endif diff --git a/runtime/syntax/xml.vim b/runtime/syntax/xml.vim index 288ea54aa..8f8e15590 100644 --- a/runtime/syntax/xml.vim +++ b/runtime/syntax/xml.vim @@ -58,8 +58,8 @@ syn match xmlError "[<&]" " " <tag foo.attribute = "value"> " ^^^^^^^ -syn region xmlString contained start=+"+ end=+"+ contains=xmlEntity display -syn region xmlString contained start=+'+ end=+'+ contains=xmlEntity display +syn region xmlString contained start=+"+ end=+"+ contains=xmlEntity,@Spell display +syn region xmlString contained start=+'+ end=+'+ contains=xmlEntity,@Spell display " punctuation (within attributes) e.g. <tag xml:foo.attribute ...> @@ -183,7 +183,7 @@ if exists('g:xml_syntax_folding') \ end=+</\z1\_\s\{-}>+ \ matchgroup=xmlEndTag end=+/>+ \ fold - \ contains=xmlTag,xmlEndTag,xmlCdata,xmlRegion,xmlComment,xmlEntity,xmlProcessing,@xmlRegionHook + \ contains=xmlTag,xmlEndTag,xmlCdata,xmlRegion,xmlComment,xmlEntity,xmlProcessing,@xmlRegionHook,@Spell \ keepend \ extend @@ -239,7 +239,7 @@ syn region xmlCommentPart \ start=+--+ \ end=+--+ \ contained - \ contains=xmlTodo,@xmlCommentHook + \ contains=xmlTodo,@xmlCommentHook,@Spell " CData sections @@ -249,7 +249,7 @@ syn region xmlCommentPart syn region xmlCdata \ start=+<!\[CDATA\[+ \ end=+]]>+ - \ contains=xmlCdataStart,xmlCdataEnd,@xmlCdataHook + \ contains=xmlCdataStart,xmlCdataEnd,@xmlCdataHook,@Spell \ keepend \ extend |