codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: WSML3" Maintainer: Thomas Haselwanter <thomas.haselwanter@deri.org>4" URL: none5" Last Change: 2006 Apr 306 7" quit when a syntax file was already loaded8if exists("b:current_syntax")9 finish10endif11 12" WSML13syn keyword wsmlHeader wsmlVariant14syn keyword wsmlNamespace namespace15syn keyword wsmlTopLevel concept instance relationInstance ofType usesMediator usesService relation sharedVariables importsOntology16syn keyword wsmlOntology hasValue memberOf ofType impliesType subConceptOf17syn keyword wsmlAxiom axiom definedBy18syn keyword wsmlService assumption effect postcondition precondition capability interface19syn keyword wsmlTopLevel ooMediator wwMediator wgMediator ggMediator20syn keyword wsmlMediation usesService source target21syn 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,wsmlCharacter22syn keyword wsmlTopLevel goal webService ontology23syn keyword wsmlKeywordsInsideLEs true false memberOf hasValue subConceptOf ofType impliesType and or implies impliedBy equivalent neg naf forall exists24syn keyword wsmlNFP nfp endnfp nonFunctionalProperties endNonFunctionalProperties25syn region wsmlNFPregion start="nfp\|nonFunctionalProperties" end="endnfp\|endNonFunctionalProperties" contains=ALL26syn region wsmlNamespace start="namespace" end="}" contains=wsmlIdentifier27syn match wsmlOperator "!=\|:=:\|=<\|>=\|=\|+\|\*\|/\|<->\|->\|<-\|:-\|!-\|-\|<\|>"28syn match wsmlBrace "(\|)\|\[\|\]\|{\|}"29syn match wsmlIdentifier +_"\S*"+30syn match wsmlIdentifier "_#\d*"31syn match wsmlSqName "[0-9A-Za-z]\+#[0-9A-Za-z]\+"32syn match wsmlVariable "?[0-9A-Za-z]\+"33 34" ASM-specific code35syn keyword wsmlBehavioral choreography orchestration transitionRules36syn keyword wsmlChoreographyPri stateSignature in out shared static controlled 37syn keyword wsmlChoreographySec with do withGrounding forall endForall choose if then endIf38syn match wsmlChoreographyTer "\(\s\|\_^\)\(add\|delete\|update\)\s*(.*)" contains=wsmlKeywordsInsideLEs,wsmlIdentifier,wsmlSqName,wsmlString,wsmlNumber,wsmlDataTypes,wsmlVariable39 40" Comments41syn keyword wsmlTodo contained TODO42syn keyword wsmlFixMe contained FIXME43if exists("wsml_comment_strings")44 syn region wsmlCommentString contained start=+"+ end=+"+ end=+$+ end=+\*/+me=s-1,he=s-1 contains=wsmlSpecial,wsmlCommentStar,wsmlSpecialChar,@Spell45 syn region wsmlComment2String contained start=+"+ end=+$\|"+ contains=wsmlSpecial,wsmlSpecialChar,@Spell46 syn match wsmlCommentCharacter contained "'\\[^']\{1,6\}'" contains=wsmlSpecialChar47 syn match wsmlCommentCharacter contained "'\\''" contains=wsmlSpecialChar48 syn match wsmlCommentCharacter contained "'[^\\]'"49 syn cluster wsmlCommentSpecial add=wsmlCommentString,wsmlCommentCharacter,wsmlNumber50 syn cluster wsmlCommentSpecial2 add=wsmlComment2String,wsmlCommentCharacter,wsmlNumber51endif52 53syn region wsmlComment start="/\*" end="\*/" contains=@wsmlCommentSpecial,wsmlTodo,wsmlFixMe,@Spell54syn match wsmlCommentStar contained "^\s*\*[^/]"me=e-155syn match wsmlCommentStar contained "^\s*\*$"56syn match wsmlLineComment "//.*" contains=@wsmlCommentSpecial2,wsmlTodo,@Spell57 58syn cluster wsmlTop add=wsmlComment,wsmlLineComment59 60"match the special comment /**/61syn match wsmlComment "/\*\*/"62 63" Strings64syn region wsmlString start=+"+ end=+"+ contains=wsmlSpecialChar,wsmlSpecialError,@Spell65syn match wsmlCharacter "'[^']*'" contains=javaSpecialChar,javaSpecialCharError66syn match wsmlCharacter "'\\''" contains=javaSpecialChar67syn match wsmlCharacter "'[^\\]'"68syn match wsmlNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>"69syn match wsmlNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\="70syn match wsmlNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>"71syn match wsmlNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"72 73" unicode characters74syn match wsmlSpecial "\\u\d\{4\}"75 76syn cluster wsmlTop add=wsmlString,wsmlCharacter,wsmlNumber,wsmlSpecial,wsmlStringError77 78" Define the default highlighting.79" Only when an item doesn't have highlighting yet80hi def link wsmlHeader TypeDef81hi def link wsmlNamespace TypeDef82hi def link wsmlOntology Statement83hi def link wsmlAxiom TypeDef84hi def link wsmlService TypeDef85hi def link wsmlNFP TypeDef86hi def link wsmlTopLevel TypeDef87hi def link wsmlMediation TypeDef 88hi def link wsmlBehavioral TypeDef89hi def link wsmlChoreographyPri TypeDef90hi def link wsmlChoreographySec Operator91hi def link wsmlChoreographyTer Special92hi def link wsmlString String93hi def link wsmlIdentifier Normal 94hi def link wsmlSqName Normal95hi def link wsmlVariable Define96hi def link wsmlKeywordsInsideLEs Operator97hi def link wsmlOperator Operator98hi def link wsmlBrace Operator99hi def link wsmlCharacter Character100hi def link wsmlNumber Number101hi def link wsmlDataTypes Special102hi def link wsmlComment Comment103hi def link wsmlDocComment Comment104hi def link wsmlLineComment Comment105hi def link wsmlTodo Todo106hi def link wsmlFixMe Error107hi def link wsmlCommentTitle SpecialComment108hi def link wsmlCommentStar wsmlComment109 110 111let b:current_syntax = "wsml"112let b:spell_options="contained"113 114 