annotate runtime/syntax/wsml.vim @ 1098:5a1d8468d1fa v7.0.224

updated for version 7.0-224
author vimboss
date Tue, 27 Mar 2007 14:57:09 +0000
parents 8cd729851562
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
754
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
1 " Vim syntax file
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
2 " Language: WSML
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
3 " Maintainer: Thomas Haselwanter <thomas.haselwanter@deri.org>
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
4 " URL: none
856
8cd729851562 updated for version 7.0g
vimboss
parents: 754
diff changeset
5 " Last Change: 2006 Apr 30
754
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
6
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
7 " Quit when a syntax file was already loaded
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
8 if version < 600
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
9 syntax clear
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
11 finish
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
12 endif
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
13
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
14 " WSML
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
15 syn keyword wsmlHeader wsmlVariant
856
8cd729851562 updated for version 7.0g
vimboss
parents: 754
diff changeset
16 syn keyword wsmlNamespace namespace
8cd729851562 updated for version 7.0g
vimboss
parents: 754
diff changeset
17 syn keyword wsmlTopLevel concept instance relationInstance ofType usesMediator usesService relation sharedVariables importsOntology
8cd729851562 updated for version 7.0g
vimboss
parents: 754
diff changeset
18 syn keyword wsmlOntology hasValue memberOf ofType impliesType subConceptOf
754
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
19 syn keyword wsmlAxiom axiom definedBy
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
20 syn keyword wsmlService assumption effect postcondition precondition capability interface
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
21 syn keyword wsmlTopLevel ooMediator wwMediator wgMediator ggMediator
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
22 syn keyword wsmlMediation usesService source target
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
23 syn match wsmlDataTypes "\( _string\| _decimal\| _integer\| _float\| _double\| _iri\| _sqname\| _boolean\| _duration\| _dateTime\| _time\| _date\| _gyearmonth\| _gyear\| _gmonthday\| _gday\| _gmonth\| _hexbinary\| _base64binary\)\((\S*)\)\?" contains=wsmlString,wsmlNumber,wsmlCharacter
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
24 syn keyword wsmlTopLevel goal webService ontology
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
25 syn keyword wsmlKeywordsInsideLEs true false memberOf hasValue subConceptOf ofType impliesType and or implies impliedBy equivalent neg naf forall exists
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
26 syn keyword wsmlNFP nfp endnfp nonFunctionalProperties endNonFunctionalProperties
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
27 syn region wsmlNFPregion start="nfp\|nonFunctionalProperties" end="endnfp\|endNonFunctionalProperties" contains=ALL
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
28 syn region wsmlNamespace start="namespace" end="}" contains=wsmlIdentifier
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
29 syn match wsmlOperator "!=\|:=:\|=<\|>=\|=\|+\|\*\|/\|<->\|->\|<-\|:-\|!-\|-\|<\|>"
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
30 syn match wsmlBrace "(\|)\|\[\|\]\|{\|}"
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
31 syn match wsmlIdentifier +_"\S*"+
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
32 syn match wsmlIdentifier "_#\d*"
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
33 syn match wsmlSqName "[0-9A-Za-z]\+#[0-9A-Za-z]\+"
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
34 syn match wsmlVariable "?[0-9A-Za-z]\+"
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
35
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
36 " ASM-specific code
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
37 syn keyword wsmlBehavioral choreography orchestration transitionRules
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
38 syn keyword wsmlChoreographyPri stateSignature in out shared static controlled
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
39 syn keyword wsmlChoreographySec with do withGrounding forall endForall choose if then endIf
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
40 syn match wsmlChoreographyTer "\(\s\|\_^\)\(add\|delete\|update\)\s*(.*)" contains=wsmlKeywordsInsideLEs,wsmlIdentifier,wsmlSqName,wsmlString,wsmlNumber,wsmlDataTypes,wsmlVariable
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
41
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
42 " Comments
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
43 syn keyword wsmlTodo contained TODO
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
44 syn keyword wsmlFixMe contained FIXME
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
45 if exists("wsml_comment_strings")
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
46 syn region wsmlCommentString contained start=+"+ end=+"+ end=+$+ end=+\*/+me=s-1,he=s-1 contains=wsmlSpecial,wsmlCommentStar,wsmlSpecialChar,@Spell
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
47 syn region wsmlComment2String contained start=+"+ end=+$\|"+ contains=wsmlSpecial,wsmlSpecialChar,@Spell
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
48 syn match wsmlCommentCharacter contained "'\\[^']\{1,6\}'" contains=wsmlSpecialChar
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
49 syn match wsmlCommentCharacter contained "'\\''" contains=wsmlSpecialChar
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
50 syn match wsmlCommentCharacter contained "'[^\\]'"
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
51 syn cluster wsmlCommentSpecial add=wsmlCommentString,wsmlCommentCharacter,wsmlNumber
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
52 syn cluster wsmlCommentSpecial2 add=wsmlComment2String,wsmlCommentCharacter,wsmlNumber
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
53 endif
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
54
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
55 syn region wsmlComment start="/\*" end="\*/" contains=@wsmlCommentSpecial,wsmlTodo,wsmlFixMe,@Spell
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
56 syn match wsmlCommentStar contained "^\s*\*[^/]"me=e-1
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
57 syn match wsmlCommentStar contained "^\s*\*$"
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
58 syn match wsmlLineComment "//.*" contains=@wsmlCommentSpecial2,wsmlTodo,@Spell
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
59
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
60 syn cluster wsmlTop add=wsmlComment,wsmlLineComment
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
61
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
62 "match the special comment /**/
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
63 syn match wsmlComment "/\*\*/"
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
64
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
65 " Strings
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
66 syn region wsmlString start=+"+ end=+"+ contains=wsmlSpecialChar,wsmlSpecialError,@Spell
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
67 syn match wsmlCharacter "'[^']*'" contains=javaSpecialChar,javaSpecialCharError
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
68 syn match wsmlCharacter "'\\''" contains=javaSpecialChar
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
69 syn match wsmlCharacter "'[^\\]'"
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
70 syn match wsmlNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>"
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
71 syn match wsmlNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\="
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
72 syn match wsmlNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>"
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
73 syn match wsmlNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
74
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
75 " unicode characters
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
76 syn match wsmlSpecial "\\u\d\{4\}"
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
77
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
78 syn cluster wsmlTop add=wsmlString,wsmlCharacter,wsmlNumber,wsmlSpecial,wsmlStringError
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
79
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
80 " Define the default highlighting.
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
81 " " For version 5.7 and earlier: only when not done already
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
82 " " For version 5.8 and later: only when an item doesn't have highlighting yet
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
83 if version >= 508 || !exists("did_wsml_syn_inits")
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
84 if version < 508
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
85 let did_wsml_syn_inits = 1
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
86 command -nargs=+ HiLink hi link <args>
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
87 else
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
88 command -nargs=+ HiLink hi def link <args>
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
89 endif
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
90 HiLink wsmlHeader TypeDef
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
91 HiLink wsmlNamespace TypeDef
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
92 HiLink wsmlOntology Statement
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
93 HiLink wsmlAxiom TypeDef
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
94 HiLink wsmlService TypeDef
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
95 HiLink wsmlNFP TypeDef
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
96 HiLink wsmlTopLevel TypeDef
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
97 HiLink wsmlMediation TypeDef
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
98 HiLink wsmlBehavioral TypeDef
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
99 HiLink wsmlChoreographyPri TypeDef
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
100 HiLink wsmlChoreographySec Operator
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
101 HiLink wsmlChoreographyTer Special
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
102 HiLink wsmlString String
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
103 HiLink wsmlIdentifier Normal
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
104 HiLink wsmlSqName Normal
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
105 HiLink wsmlVariable Define
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
106 HiLink wsmlKeywordsInsideLEs Operator
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
107 HiLink wsmlOperator Operator
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
108 HiLink wsmlBrace Operator
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
109 HiLink wsmlCharacter Character
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
110 HiLink wsmlNumber Number
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
111 HiLink wsmlDataTypes Special
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
112 HiLink wsmlComment Comment
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
113 HiLink wsmlDocComment Comment
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
114 HiLink wsmlLineComment Comment
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
115 HiLink wsmlTodo Todo
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
116 HiLink wsmlFixMe Error
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
117 HiLink wsmlCommentTitle SpecialComment
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
118 HiLink wsmlCommentStar wsmlComment
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
119 endif
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
120
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
121 delcommand HiLink
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
122
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
123 let b:current_syntax = "wsml"
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
124 let b:spell_options="contained"
3a779b47f235 updated for version 7.0223
vimboss
parents:
diff changeset
125