annotate runtime/syntax/rexx.vim @ 706:ef3b59af4207

updated for version 7.0213
author vimboss
date Fri, 03 Mar 2006 22:50:42 +0000
parents 3fc0f57ecb91
children 1cdd2661f34c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Rexx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Thomas Geulig <geulig@nentec.de>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2001 May 2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " URL: http://mywebpage.netscape.com/sharpPeople/vim/syntax/rexx.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " Special Thanks to Dan Sharp <dwsharp@hotmail.com> for comments and additions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " (and providing the webspace)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " A Keyword is the first symbol in a clause. A clause begins at the start
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " of a line or after a semicolon. THEN, ELSE, OTHERWISE, and colons are always
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " followed by an implied semicolon.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match rexxClause "\(^\|;\|:\|then \|else \|otherwise \)\s*\w\+" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " Considered keywords when used together in a phrase and begin a clause
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match rexxKeyword contained "\<signal\( on \(error\|failure\|halt\|notready\|novalue\|syntax\|lostdigits\)\(\s\+name\)\=\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match rexxKeyword contained "\<signal off \(error\|failure\|halt\|notready\|novalue\|syntax\|lostdigits\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match rexxKeyword contained "\<call off \(error\|failure\|halt\|notready\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match rexxKeyword contained "\<parse \(upper \)\=\(arg\|linein\|pull\|source\|var\|value\|version\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match rexxKeyword contained "\<numeric \(digits\|form \(scientific\|engineering\|value\)\|fuzz\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match rexxKeyword contained "\<\(address\|trace\)\( value\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match rexxKeyword contained "\<procedure\( expose\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match rexxKeyword contained "\<do\( forever\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " Another keyword phrase, separated to aid highlighting in rexxFunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match rexxKeyword2 contained "\<call\( on \(error\|failure\|halt\|notready\)\(\s\+name\)\=\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " Considered keywords when they begin a clause
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match rexxKeyword contained "\<\(arg\|drop\|end\|exit\|if\|interpret\|iterate\|leave\|nop\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match rexxKeyword contained "\<\(options\|pull\|push\|queue\|return\|say\|select\|trace\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " Conditional phrases
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match rexxConditional "\(^\s*\| \)\(to\|by\|for\|until\|while\|then\|when\|otherwise\|else\)\( \|\s*$\)" contains=ALLBUT,rexxConditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match rexxConditional contained "\<\(to\|by\|for\|until\|while\|then\|when\|else\|otherwise\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " Assignments -- a keyword followed by an equal sign becomes a variable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match rexxAssign "\<\w\+\s*=\s*" contains=rexxSpecialVariable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " Functions/Procedures
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match rexxFunction "\<\h\w*\(/\*\s*\*/\)*("me=e-1 contains=rexxComment,rexxConditional,rexxKeyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match rexxFunction "\<\(arg\|trace\)\(/\*\s*\*/\)*("me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match rexxFunction "\<call\( on \(error\|failure\|halt\|notready\)\(\s\+name\)\=\)\=\>\s\+\w\+\>" contains=rexxKeyword2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " String constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn region rexxString start=+"+ skip=+\\\\\|\\'+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn region rexxString start=+'+ skip=+\\\\\|\\"+ end=+'+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn match rexxCharacter +"'[^\\]'"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 " Catch errors caused by wrong parenthesis
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn region rexxParen transparent start='(' end=')' contains=ALLBUT,rexxParenError,rexxTodo,rexxUserLabel,rexxKeyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match rexxParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match rexxInParen "[\\[\\]{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn region rexxComment start="/\*" end="\*/" contains=rexxTodo,rexxComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match rexxCommentError "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword rexxTodo contained TODO FIXME XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " Highlight User Labels
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn match rexxUserLabel "\<\I\i*\s*:"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " Special Variables
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword rexxSpecialVariable sigl rc result
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn match rexxCompoundVariable "\<\w\+\.\w*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 if !exists("rexx_minlines")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 let rexx_minlines = 10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 exec "syn sync ccomment rexxComment minlines=" . rexx_minlines
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 if version >= 508 || !exists("did_rexx_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 let did_rexx_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 HiLink rexxUserLabel Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 HiLink rexxCharacter Character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 HiLink rexxParenError rexxError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 HiLink rexxInParen rexxError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 HiLink rexxCommentError rexxError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 HiLink rexxError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 HiLink rexxKeyword Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 HiLink rexxKeyword2 rexxKeyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 HiLink rexxFunction Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 HiLink rexxString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 HiLink rexxComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 HiLink rexxTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 HiLink rexxSpecialVariable Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 HiLink rexxConditional rexxKeyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 let b:current_syntax = "rexx"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 "vim: ts=8