annotate runtime/syntax/rexx.vim @ 2451:0b8612c2814d vim73

Fix: changing case of a character removed combining characters.
author Bram Moolenaar <bram@vim.org>
date Sun, 01 Aug 2010 14:22:48 +0200
parents 18ee39301b82
children c3036f1dca68
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>
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
4 " Last Change: 2005 Dez 9, added some <http://www.ooRexx.org>-coloring,
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
5 " line comments, do *over*, messages, directives,
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
6 " highlighting classes, methods, routines and requires
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
7 " 2007 Oct 17, added support for new ooRexx 3.2 features
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
8 " Rony G. Flatscher <rony.flatscher@wu-wien.ac.at>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 "
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
10 " URL: http://www.geulig.de/vim/rexx.vim
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
11 "
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
12 " Special Thanks to Dan Sharp <dwsharp@hotmail.com> and Rony G. Flatscher
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
13 " <Rony.Flatscher@wu-wien.ac.at> for comments and additions
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
25 " add to valid identifier chars
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
26 setlocal iskeyword+=.
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
27 setlocal iskeyword+=!
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
28 setlocal iskeyword+=?
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
29
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
30 " ---rgf, position important: must be before comments etc. !
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
31 syn match rexxOperator "[=|\/\\\+\*\[\],;:<>&\~%\-]"
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
32
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
33 " rgf syn match rexxIdentifier "\<[a-zA-Z\!\?_]\([a-zA-Z0-9._?!]\)*\>"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
34 syn match rexxIdentifier "\<\K\k*\>"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
35 syn match rexxEnvironmentSymbol "\<\.\k\+\>"
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
36
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 " 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
38 " of a line or after a semicolon. THEN, ELSE, OTHERWISE, and colons are always
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " followed by an implied semicolon.
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
40 syn match rexxClause "\(^\|;\|:\|then \|else \|when \|otherwise \)\s*\S*" contains=ALLBUT,rexxParse2,rexxRaise2,rexxForward2
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " Considered keywords when used together in a phrase and begin a clause
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
43 syn match rexxParse "\<parse\s*\(\(upper\|lower\|caseless\)\s*\)\?\(arg\|linein\|pull\|source\|var\|\<value\>\|version\)\>" containedin=rexxClause contains=rexxParse2
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
44 syn match rexxParse2 "\<with\>" containedin=rexxParse
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
45
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match rexxKeyword contained "\<numeric \(digits\|form \(scientific\|engineering\|value\)\|fuzz\)\>"
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
47 syn match rexxKeyword contained "\<\(address\|trace\)\( value\)\?\>"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
48 syn match rexxKeyword contained "\<procedure\(\s*expose\)\?\>"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
49
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
50 syn match rexxKeyword contained "\<\(do\|loop\)\>\(\s\+label\s\+\k*\)\?\(\s\+forever\)\?\>"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
51 syn match rexxKeyword contained "\<use\>\s*\(strict\s*\)\?\<arg\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " Another keyword phrase, separated to aid highlighting in rexxFunction
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
54 syn match rexxRegularCallSignal contained "\<\(call\|signal\)\s\(\s*on\>\|\s*off\>\)\@!\(\k\+\ze\|\ze(\)\(\s*\|;\|$\|(\)"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
55 syn region rexxLabel contained start="\<\(call\|signal\)\>\s*\zs\(\k*\|(\)" end="\ze\(\s*\|;\|$\|(\)" containedin=rexxRegularCallSignal
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
56
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
57 syn match rexxExceptionHandling contained "\<\(call\|signal\)\>\s\+\<\(on\|off\)\>.*\(;\|$\)"
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
58
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
59 " hilite label given after keyword "name"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
60 syn match rexxLabel "name\s\+\zs\k\+\ze" containedin=rexxExceptionHandling
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
61 " hilite condition name (serves as label)
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
62 syn match rexxLabel "\<\(call\|signal\)\>\s\+\<\(on\|off\)\>\s*\zs\k\+\ze\s*\(;\|$\)" containedin=rexxExceptionHandling
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
63 " user exception handling, hilite user defined name
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
64 syn region rexxLabel contained start="user\s\+\zs\k" end="\ze\(\s\|;\|$\)" containedin=rexxExceptionHandling
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 " Considered keywords when they begin a clause
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
67 syn match rexxKeywordStatements "\<\(arg\|catch\|do\|drop\|end\|exit\|expose\|finally\|forward\|if\|interpret\|iterate\|leave\|loop\|nop\)\>"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
68 syn match rexxKeywordStatements "\<\(options\|pull\|push\|queue\|raise\|reply\|return\|say\|select\|trace\)\>"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
69
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
70 " Conditional keywords starting a new statement
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
71 syn match rexxConditional "\<\(then\|else\|when\|otherwise\)\(\s*\|;\|\_$\|\)\>" contains=rexxKeywordStatements
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " Conditional phrases
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
74 syn match rexxLoopKeywords "\<\(to\|by\|for\|until\|while\|over\)\>" containedin=doLoopSelectLabelRegion
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
75
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
76 " must be after Conditional phrases!
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
77 syn match doLoopSelectLabelRegion "\<\(do\|loop\|select\)\>\s\+\(label\s\+\)\?\(\s\+\k\+\s\+\zs\<over\>\)\?\k*\(\s\+forever\)\?\(\s\|;\|$\)"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
78
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
79 " color label's name
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
80 syn match rexxLabel2 "\<\(do\|loop\|select\)\>\s\+label\s\+\zs\k*\ze" containedin=doLoopSelectLabelRegion
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
81
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
82 " make sure control variable is normal
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
83 syn match rexxControlVariable "\<\(do\|loop\)\>\(\s\+label\s\+\k*\)\?\s\+\zs.*\ze\s\+\<over\>" containedin=doLoopSelectLabelRegion
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
84
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
85 " make sure control variable assignment is normal
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
86 syn match rexxStartValueAssignment "\<\(do\|loop\)\>\(\s\+label\s\+\k*\)\?\s\+\zs.*\ze\(=.*\)\?\s\+\<to\>" containedin=doLoopSelectLabelRegion
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
87
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
88 " highlight label name
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
89 syn match endIterateLeaveLabelRegion "\<\(end\|leave\|iterate\)\>\(\s\+\K\k*\)" contains=rexxLabel2
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
90 syn match rexxLabel2 "\<\(end\|leave\|iterate\)\>\s\+\zs\k*\ze" containedin=endIterateLeaveLabelRegion
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
91
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
92 " Guard statement
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
93 syn match rexxGuard "\(^\|;\|:\)\s*\<guard\>\s\+\<\(on\|off\)\>"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
94
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
95 " Trace statement
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
96 syn match rexxTrace "\(^\|;\|:\)\s*\<trace\>\s\+\<\K\k*\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
98 " Raise statement
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
99 syn match rexxRaise "\(^\|;\|:\)\s\+\<raise\>\s*\<\(propagate\|error\|failure\|syntax\|user\)\>\?" contains=rexxRaise2
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
100 syn match rexxRaise2 "\<\(additional\|array\|description\|exit\|propagate\|return\)\>" containedin=rexxRaise
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
101
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
102 " Forward statement
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
103 syn match rexxForward "\(^\|;\|:\)\<forward\>\s*" contains=rexxForward2
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
104 syn match rexxForward2 "\<\(arguments\|array\|continue\|message\|class\|to\)\>" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 " Functions/Procedures
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
107 syn match rexxFunction "\<\<[a-zA-Z\!\?_]\k*\>("me=e-1
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
108 syn match rexxFunction "[()]"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 " String constants
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
111 syn region rexxString start=+"+ skip=+""+ end=+"\(x\|b\)\?+ oneline
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
112 syn region rexxString start=+'+ skip=+''+ end=+'\(x\|b\)\?+ oneline
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
114 syn region rexxParen transparent start='(' end=')' contains=ALLBUT,rexxParenError,rexxTodo,rexxLabel,rexxKeyword
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 " Catch errors caused by wrong parenthesis
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn match rexxParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 syn match rexxInParen "[\\[\\]{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 " Comments
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
120 syn region rexxComment start="/\*" end="\*/" contains=rexxTodo,rexxComment
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
121 syn match rexxCommentError "\*/"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
122 syn region rexxLineComment start="--" end="\_$" oneline
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
123
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
124 " Highlight User Labels
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
125 " check for labels between comments, labels stated in a statement in the middle of a line
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
126 syn match rexxLabel "\(\_^\|;\)\s*\(\/\*.*\*\/\)*\s*\k\+\s*\(\/\*.*\*\/\)*\s*:"me=e-1 contains=rexxTodo,rexxComment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 syn keyword rexxTodo contained TODO FIXME XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
130 " ooRexx messages
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
131 syn region rexxMessageOperator start="\(\~\|\~\~\)" end="\(\S\|\s\)"me=e-1
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
132 syn match rexxMessage "\(\~\|\~\~\)\s*\<\.*[a-zA-Z]\([a-zA-Z0-9._?!]\)*\>" contains=rexxMessageOperator
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
133
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
134 " line continuations, take care of (line-)comments after it
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
135 syn match rexxLineContinue ",\ze\s*\(--.*\|\/\*.*\)*$"
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
136
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
137 " the following is necessary, otherwise three consecutive dashes will cause it to highlight the first one
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
138 syn match rexxLineContinue "-\ze-\@!\s*\(--.*\|\s*\/\*.*\)\?$"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 " Special Variables
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
141 syn keyword rexxSpecialVariable sigl rc result self super
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
142 syn keyword rexxSpecialVariable .environment .error .input .local .methods .output .rs .stderr .stdin .stdout .stdque
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
143
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
144 " Constants
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
145 syn keyword rexxConst .true .false .nil .endOfLine .line
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
146
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
147 syn match rexxNumber "\(-\|+\)\?\s*\zs\<\(\d\+\.\?\|\d*\.\d\+\(E\(+\|-\)\d\{2,2}\)\?\)\?\>"
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
148
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
149 " ooRexx builtin classes (as of version 3.2.0, fall 2007), first define dot to be o.k. in keywords
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
150 syn keyword rexxBuiltinClass .Alarm .ArgUtil .Array .Bag .CaselessColumnComparator
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
151 syn keyword rexxBuiltinClass .CaselessComparator .CaselessDescendingComparator .CircularQueue
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
152 syn keyword rexxBuiltinClass .Class .Collection .ColumnComparator .Comparable .Comparator
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
153 syn keyword rexxBuiltinClass .DateTime .DescendingComparator .Directory .InputOutputStream
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
154 syn keyword rexxBuiltinClass .InputStream .InvertingComparator .List .MapCollection
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
155 syn keyword rexxBuiltinClass .Message .Method .Monitor .MutableBuffer .Object
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
156 syn keyword rexxBuiltinClass .OrderedCollection .OutputStream .Properties .Queue
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
157 syn keyword rexxBuiltinClass .Relation .RexxQueue .Set .SetCollection .Stem .Stream
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
158 syn keyword rexxBuiltinClass .StreamSupplier .String .Supplier .Table .TimeSpan
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
159
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
160 " Windows-only classes
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
161 syn keyword rexxBuiltinClass .AdvancedControls .AnimatedButton .BaseDialog .ButtonControl
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
162 syn keyword rexxBuiltinClass .CategoryDialog .CheckBox .CheckList .ComboBox .DialogControl
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
163 syn keyword rexxBuiltinClass .DialogExtensions .DlgArea .DlgAreaU .DynamicDialog
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
164 syn keyword rexxBuiltinClass .EditControl .InputBox .IntegerBox .ListBox .ListChoice
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
165 syn keyword rexxBuiltinClass .ListControl .MenuObject .MessageExtensions .MultiInputBox
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
166 syn keyword rexxBuiltinClass .MultiListChoice .PasswordBox .PlainBaseDialog .PlainUserDialog
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
167 syn keyword rexxBuiltinClass .ProgressBar .ProgressIndicator .PropertySheet .RadioButton
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
168 syn keyword rexxBuiltinClass .RcDialog .ResDialog .ScrollBar .SingleSelection .SliderControl
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
169 syn keyword rexxBuiltinClass .StateIndicator .StaticControl .TabControl .TimedMessage
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
170 syn keyword rexxBuiltinClass .TreeControl .UserDialog .VirtualKeyCodes .WindowBase
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
171 syn keyword rexxBuiltinClass .WindowExtensions .WindowObject .WindowsClassesBase .WindowsClipboard
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
172 syn keyword rexxBuiltinClass .WindowsEventLog .WindowsManager .WindowsProgramManager .WindowsRegistry
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
173
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
174 " ooRexx directives, ---rgf location important, otherwise directives in top of file not matched!
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
175 syn region rexxClassDirective start="::\s*class\s*"ms=e+1 end="\ze\(\s\|;\|$\)"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
176 syn region rexxMethodDirective start="::\s*method\s*"ms=e+1 end="\ze\(\s\|;\|$\)"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
177 syn region rexxRequiresDirective start="::\s*requires\s*"ms=e+1 end="\ze\(\s\|;\|$\)"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
178 syn region rexxRoutineDirective start="::\s*routine\s*"ms=e+1 end="\ze\(\s\|;\|$\)"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
179 syn region rexxAttributeDirective start="::\s*attribute\s*"ms=e+1 end="\ze\(\s\|;\|$\)"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
180
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
181 syn region rexxDirective start="\(^\|;\)\s*::\s*\w\+" end="\($\|;\)" contains=rexxString,rexxComment,rexxLineComment,rexxClassDirective,rexxMethodDirective,rexxRoutineDirective,rexxRequiresDirective,rexxAttributeDirective keepend
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
182
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
183 syn region rexxVariable start="\zs\<\(\.\)\@!\K\k\+\>\ze\s*\(=\|,\|)\|%\|\]\|\\\||\|&\|+=\|-=\|<\|>\)" end="\(\_$\|.\)"me=e-1
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
184 syn match rexxVariable "\(=\|,\|)\|%\|\]\|\\\||\|&\|+=\|-=\|<\|>\)\s*\zs\K\k*\ze"
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
185
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
186 " rgf, 2007-07-22: unfortunately, the entire region is colored (not only the
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
187 " patterns), hence useless (vim 7.0)! (syntax-docs hint that that should work)
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
188 " attempt: just colorize the parenthesis in matching colors, keep content
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
189 " transparent to keep the formatting already done to it!
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
190 " syn region par1 matchgroup=par1 start="(" matchgroup=par1 end=")" transparent contains=par2
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
191 " syn region par2 matchgroup=par2 start="(" matchgroup=par2 end=")" transparent contains=par3 contained
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
192 " syn region par3 matchgroup=par3 start="(" matchgroup=par3 end=")" transparent contains=par4 contained
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
193 " syn region par4 matchgroup=par4 start="(" matchgroup=par4 end=")" transparent contains=par5 contained
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
194 " syn region par5 matchgroup=par5 start="(" matchgroup=par5 end=")" transparent contains=par1 contained
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
195
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
196 " this will colorize the entire region, removing any colorizing already done!
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
197 " syn region par1 matchgroup=par1 start="(" end=")" contains=par2
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
198 " syn region par2 matchgroup=par2 start="(" end=")" contains=par3 contained
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
199 " syn region par3 matchgroup=par3 start="(" end=")" contains=par4 contained
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
200 " syn region par4 matchgroup=par4 start="(" end=")" contains=par5 contained
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
201 " syn region par5 matchgroup=par5 start="(" end=")" contains=par1 contained
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
202
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
203 hi par1 ctermfg=red guifg=red
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
204 hi par2 ctermfg=blue guifg=blue
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
205 hi par3 ctermfg=darkgreen guifg=darkgreen
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
206 hi par4 ctermfg=darkyellow guifg=darkyellow
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
207 hi par5 ctermfg=darkgrey guifg=darkgrey
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
209 " line continuation (trailing comma or single dash)
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
210 syn sync linecont "\(,\|-\ze-\@!\)\ze\s*\(--.*\|\/\*.*\)*$"
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
211
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
212 " if !exists("rexx_minlines")
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
213 " let rexx_minlines = 500
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
214 " endif
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
215 " exec "syn sync ccomment rexxComment minlines=" . rexx_minlines
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
216
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
217 " always scan from start, PCs are powerful enough for that in 2007 !
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
218 exec "syn sync fromstart"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 " 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
223 if version >= 508 || !exists("did_rexx_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 let did_rexx_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
231 " make binary and hex strings stand out
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
232 hi rexxStringConstant term=bold,underline ctermfg=5 cterm=bold guifg=darkMagenta gui=bold
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
233
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
234 HiLink rexxLabel2 Function
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
235 HiLink doLoopSelectLabelRegion rexxKeyword
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
236 HiLink endIterateLeaveLabelRegion rexxKeyword
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
237 HiLink rexxLoopKeywords rexxKeyword " Todo
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
238
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
239 HiLink rexxNumber Normal
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
240 " HiLink rexxIdentifier DiffChange
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
241
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
242 HiLink rexxRegularCallSignal Statement
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
243 HiLink rexxExceptionHandling Statement
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
244
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
245 HiLink rexxLabel Function
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 HiLink rexxCharacter Character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 HiLink rexxParenError rexxError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 HiLink rexxInParen rexxError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 HiLink rexxCommentError rexxError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 HiLink rexxError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 HiLink rexxKeyword Statement
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
252 HiLink rexxKeywordStatements Statement
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
253
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 HiLink rexxFunction Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 HiLink rexxString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 HiLink rexxComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257 HiLink rexxTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 HiLink rexxSpecialVariable Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 HiLink rexxConditional rexxKeyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
261 HiLink rexxOperator Operator
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
262 HiLink rexxMessageOperator rexxOperator
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
263 HiLink rexxLineComment Comment
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
264
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
265 HiLink rexxLineContinue WildMenu
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
266
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
267 HiLink rexxDirective rexxKeyword
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
268 HiLink rexxClassDirective Type
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
269 HiLink rexxMethodDirective rexxFunction
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
270 HiLink rexxAttributeDirective rexxFunction
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
271 HiLink rexxRequiresDirective Include
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
272 HiLink rexxRoutineDirective rexxFunction
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
273
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
274 HiLink rexxConst Constant
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
275 HiLink rexxTypeSpecifier Type
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
276 HiLink rexxBuiltinClass rexxTypeSpecifier
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
277
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
278 HiLink rexxEnvironmentSymbol rexxConst
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
279 HiLink rexxMessage rexxFunction
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
280
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
281 HiLink rexxParse rexxKeyword
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
282 HiLink rexxParse2 rexxParse
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
283
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
284 HiLink rexxGuard rexxKeyword
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
285 HiLink rexxTrace rexxKeyword
18ee39301b82 updated for version 7.2a
vimboss
parents: 826
diff changeset
286
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
287 HiLink rexxRaise rexxKeyword
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
288 HiLink rexxRaise2 rexxRaise
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
289
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
290 HiLink rexxForward rexxKeyword
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
291 HiLink rexxForward2 rexxForward
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 7
diff changeset
292
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
293 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
294 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
295
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
296 let b:current_syntax = "rexx"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
297
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
298 "vim: ts=8