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