annotate runtime/syntax/sdl.vim @ 3848:a2fe24ec6a0d v7.3.681

updated for version 7.3.681 Problem: List of distributed files picks up backup files. Solution: Make tutor patterns more specific.
author Bram Moolenaar <bram@vim.org>
date Wed, 03 Oct 2012 21:48:43 +0200
parents 91e53bcb7946
children 43efa4f5a8ea
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: SDL
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
3 " Maintainer: Michael Piefel <entwurf@piefel.de>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2 May 2001
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 if !exists("sdl_2000")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syntax case ignore
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 " A bunch of useful SDL keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword sdlStatement task else nextstate
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword sdlStatement in out with from interface
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword sdlStatement to via env and use
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword sdlStatement process procedure block system service type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword sdlStatement endprocess endprocedure endblock endsystem
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword sdlStatement package endpackage connection endconnection
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword sdlStatement channel endchannel connect
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword sdlStatement synonym dcl signal gate timer signallist signalset
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword sdlStatement create output set reset call
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword sdlStatement operators literals
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword sdlStatement active alternative any as atleast constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword sdlStatement default endalternative endmacro endoperator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword sdlStatement endselect endsubstructure external
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword sdlStatement if then fi for import macro macrodefinition
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword sdlStatement macroid mod nameclass nodelay not operator or
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword sdlStatement parent provided referenced rem
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword sdlStatement select spelling substructure xor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword sdlNewState state endstate
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword sdlInput input start stop return none save priority
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword sdlConditional decision enddecision join
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword sdlVirtual virtual redefined finalized adding inherits
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword sdlExported remote exported export
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 if !exists("sdl_no_96")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword sdlStatement all axioms constant endgenerator endrefinement endservice
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword sdlStatement error fpar generator literal map noequality ordering
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword sdlStatement refinement returns revealed reverse service signalroute
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword sdlStatement view viewed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword sdlExported imported
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 if exists("sdl_2000")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword sdlStatement abstract aggregation association break choice composition
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword sdlStatement continue endmethod handle method
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword sdlStatement ordered private protected public
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword sdlException exceptionhandler endexceptionhandler onexception
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword sdlException catch new raise
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 " The same in uppercase
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword sdlStatement TASK ELSE NEXTSTATE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword sdlStatement IN OUT WITH FROM INTERFACE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword sdlStatement TO VIA ENV AND USE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword sdlStatement PROCESS PROCEDURE BLOCK SYSTEM SERVICE TYPE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword sdlStatement ENDPROCESS ENDPROCEDURE ENDBLOCK ENDSYSTEM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword sdlStatement PACKAGE ENDPACKAGE CONNECTION ENDCONNECTION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword sdlStatement CHANNEL ENDCHANNEL CONNECT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword sdlStatement SYNONYM DCL SIGNAL GATE TIMER SIGNALLIST SIGNALSET
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword sdlStatement CREATE OUTPUT SET RESET CALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn keyword sdlStatement OPERATORS LITERALS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword sdlStatement ACTIVE ALTERNATIVE ANY AS ATLEAST CONSTANTS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword sdlStatement DEFAULT ENDALTERNATIVE ENDMACRO ENDOPERATOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword sdlStatement ENDSELECT ENDSUBSTRUCTURE EXTERNAL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn keyword sdlStatement IF THEN FI FOR IMPORT MACRO MACRODEFINITION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword sdlStatement MACROID MOD NAMECLASS NODELAY NOT OPERATOR OR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword sdlStatement PARENT PROVIDED REFERENCED REM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword sdlStatement SELECT SPELLING SUBSTRUCTURE XOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword sdlNewState STATE ENDSTATE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn keyword sdlInput INPUT START STOP RETURN NONE SAVE PRIORITY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn keyword sdlConditional DECISION ENDDECISION JOIN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword sdlVirtual VIRTUAL REDEFINED FINALIZED ADDING INHERITS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn keyword sdlExported REMOTE EXPORTED EXPORT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn keyword sdlStatement ABSTRACT AGGREGATION ASSOCIATION BREAK CHOICE COMPOSITION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword sdlStatement CONTINUE ENDMETHOD ENDOBJECT ENDVALUE HANDLE METHOD OBJECT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword sdlStatement ORDERED PRIVATE PROTECTED PUBLIC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword sdlException EXCEPTIONHANDLER ENDEXCEPTIONHANDLER ONEXCEPTION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn keyword sdlException CATCH NEW RAISE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 " String and Character contstants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 " Highlight special characters (those which have a backslash) differently
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match sdlSpecial contained "\\\d\d\d\|\\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn region sdlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn region sdlString start=+'+ skip=+''+ end=+'+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 " No, this doesn't happen, I just wanted to scare you. SDL really allows all
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 " these characters for identifiers; fortunately, keywords manage without them.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 " set iskeyword=@,48-57,_,192-214,216-246,248-255,-
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn region sdlComment start="/\*" end="\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn region sdlComment start="comment" end=";"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn region sdlComment start="--" end="--\|$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn match sdlCommentError "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn keyword sdlOperator present
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn keyword sdlType integer real natural duration pid boolean time
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn keyword sdlType character charstring ia5string
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn keyword sdlType self now sender offspring
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn keyword sdlStructure asntype endasntype syntype endsyntype struct
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 if !exists("sdl_no_96")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn keyword sdlStructure newtype endnewtype
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 if exists("sdl_2000")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn keyword sdlStructure object endobject value endvalue
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 " The same in uppercase
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn keyword sdlStructure OBJECT ENDOBJECT VALUE ENDVALUE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn keyword sdlOperator PRESENT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 syn keyword sdlType INTEGER NATURAL DURATION PID BOOLEAN TIME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn keyword sdlType CHARSTRING IA5STRING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn keyword sdlType SELF NOW SENDER OFFSPRING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 syn keyword sdlStructure ASNTYPE ENDASNTYPE SYNTYPE ENDSYNTYPE STRUCT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 " ASN.1 in SDL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 syn keyword sdlType SET OF BOOLEAN INTEGER REAL BIT OCTET
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 syn keyword sdlType SEQUENCE CHOICE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 syn keyword sdlType STRING OBJECT IDENTIFIER NULL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 syn sync ccomment sdlComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 " 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
134 if version >= 508 || !exists("did_sdl_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 let did_sdl_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 command -nargs=+ Hi hi <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 command -nargs=+ Hi hi def <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 HiLink sdlException Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 HiLink sdlConditional sdlStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 HiLink sdlVirtual sdlStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 HiLink sdlExported sdlFlag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 HiLink sdlCommentError sdlError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 HiLink sdlOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 HiLink sdlStructure sdlType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 Hi sdlStatement term=bold ctermfg=4 guifg=Blue
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 Hi sdlFlag term=bold ctermfg=4 guifg=Blue gui=italic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 Hi sdlNewState term=italic ctermfg=2 guifg=Magenta gui=underline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 Hi sdlInput term=bold guifg=Red
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 HiLink sdlType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 HiLink sdlString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 HiLink sdlComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 HiLink sdlSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 HiLink sdlError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 delcommand Hi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 let b:current_syntax = "sdl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 " vim: ts=8