10ce29937SBram Moolenaar" Vim syntax file 20ce29937SBram Moolenaar" Language: WSML 30ce29937SBram Moolenaar" Maintainer: Thomas Haselwanter <[email protected]> 40ce29937SBram Moolenaar" URL: none 5c9b4b05bSBram Moolenaar" Last Change: 2006 Apr 30 60ce29937SBram Moolenaar 789bcfda6SBram Moolenaar" quit when a syntax file was already loaded 889bcfda6SBram Moolenaarif exists("b:current_syntax") 90ce29937SBram Moolenaar finish 100ce29937SBram Moolenaarendif 110ce29937SBram Moolenaar 120ce29937SBram Moolenaar" WSML 130ce29937SBram Moolenaarsyn keyword wsmlHeader wsmlVariant 140ce29937SBram Moolenaarsyn keyword wsmlNamespace namespace 150ce29937SBram Moolenaarsyn keyword wsmlTopLevel concept instance relationInstance ofType usesMediator usesService relation sharedVariables importsOntology 160ce29937SBram Moolenaarsyn keyword wsmlOntology hasValue memberOf ofType impliesType subConceptOf 170ce29937SBram Moolenaarsyn keyword wsmlAxiom axiom definedBy 180ce29937SBram Moolenaarsyn keyword wsmlService assumption effect postcondition precondition capability interface 190ce29937SBram Moolenaarsyn keyword wsmlTopLevel ooMediator wwMediator wgMediator ggMediator 200ce29937SBram Moolenaarsyn keyword wsmlMediation usesService source target 210ce29937SBram Moolenaarsyn 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 220ce29937SBram Moolenaarsyn keyword wsmlTopLevel goal webService ontology 230ce29937SBram Moolenaarsyn keyword wsmlKeywordsInsideLEs true false memberOf hasValue subConceptOf ofType impliesType and or implies impliedBy equivalent neg naf forall exists 240ce29937SBram Moolenaarsyn keyword wsmlNFP nfp endnfp nonFunctionalProperties endNonFunctionalProperties 250ce29937SBram Moolenaarsyn region wsmlNFPregion start="nfp\|nonFunctionalProperties" end="endnfp\|endNonFunctionalProperties" contains=ALL 260ce29937SBram Moolenaarsyn region wsmlNamespace start="namespace" end="}" contains=wsmlIdentifier 270ce29937SBram Moolenaarsyn match wsmlOperator "!=\|:=:\|=<\|>=\|=\|+\|\*\|/\|<->\|->\|<-\|:-\|!-\|-\|<\|>" 280ce29937SBram Moolenaarsyn match wsmlBrace "(\|)\|\[\|\]\|{\|}" 290ce29937SBram Moolenaarsyn match wsmlIdentifier +_"\S*"+ 300ce29937SBram Moolenaarsyn match wsmlIdentifier "_#\d*" 310ce29937SBram Moolenaarsyn match wsmlSqName "[0-9A-Za-z]\+#[0-9A-Za-z]\+" 320ce29937SBram Moolenaarsyn match wsmlVariable "?[0-9A-Za-z]\+" 330ce29937SBram Moolenaar 340ce29937SBram Moolenaar" ASM-specific code 350ce29937SBram Moolenaarsyn keyword wsmlBehavioral choreography orchestration transitionRules 360ce29937SBram Moolenaarsyn keyword wsmlChoreographyPri stateSignature in out shared static controlled 370ce29937SBram Moolenaarsyn keyword wsmlChoreographySec with do withGrounding forall endForall choose if then endIf 380ce29937SBram Moolenaarsyn match wsmlChoreographyTer "\(\s\|\_^\)\(add\|delete\|update\)\s*(.*)" contains=wsmlKeywordsInsideLEs,wsmlIdentifier,wsmlSqName,wsmlString,wsmlNumber,wsmlDataTypes,wsmlVariable 390ce29937SBram Moolenaar 400ce29937SBram Moolenaar" Comments 410ce29937SBram Moolenaarsyn keyword wsmlTodo contained TODO 420ce29937SBram Moolenaarsyn keyword wsmlFixMe contained FIXME 430ce29937SBram Moolenaarif exists("wsml_comment_strings") 440ce29937SBram Moolenaar syn region wsmlCommentString contained start=+"+ end=+"+ end=+$+ end=+\*/+me=s-1,he=s-1 contains=wsmlSpecial,wsmlCommentStar,wsmlSpecialChar,@Spell 450ce29937SBram Moolenaar syn region wsmlComment2String contained start=+"+ end=+$\|"+ contains=wsmlSpecial,wsmlSpecialChar,@Spell 460ce29937SBram Moolenaar syn match wsmlCommentCharacter contained "'\\[^']\{1,6\}'" contains=wsmlSpecialChar 470ce29937SBram Moolenaar syn match wsmlCommentCharacter contained "'\\''" contains=wsmlSpecialChar 480ce29937SBram Moolenaar syn match wsmlCommentCharacter contained "'[^\\]'" 490ce29937SBram Moolenaar syn cluster wsmlCommentSpecial add=wsmlCommentString,wsmlCommentCharacter,wsmlNumber 500ce29937SBram Moolenaar syn cluster wsmlCommentSpecial2 add=wsmlComment2String,wsmlCommentCharacter,wsmlNumber 510ce29937SBram Moolenaarendif 520ce29937SBram Moolenaar 530ce29937SBram Moolenaarsyn region wsmlComment start="/\*" end="\*/" contains=@wsmlCommentSpecial,wsmlTodo,wsmlFixMe,@Spell 540ce29937SBram Moolenaarsyn match wsmlCommentStar contained "^\s*\*[^/]"me=e-1 550ce29937SBram Moolenaarsyn match wsmlCommentStar contained "^\s*\*$" 560ce29937SBram Moolenaarsyn match wsmlLineComment "//.*" contains=@wsmlCommentSpecial2,wsmlTodo,@Spell 570ce29937SBram Moolenaar 580ce29937SBram Moolenaarsyn cluster wsmlTop add=wsmlComment,wsmlLineComment 590ce29937SBram Moolenaar 600ce29937SBram Moolenaar"match the special comment /**/ 610ce29937SBram Moolenaarsyn match wsmlComment "/\*\*/" 620ce29937SBram Moolenaar 630ce29937SBram Moolenaar" Strings 640ce29937SBram Moolenaarsyn region wsmlString start=+"+ end=+"+ contains=wsmlSpecialChar,wsmlSpecialError,@Spell 650ce29937SBram Moolenaarsyn match wsmlCharacter "'[^']*'" contains=javaSpecialChar,javaSpecialCharError 660ce29937SBram Moolenaarsyn match wsmlCharacter "'\\''" contains=javaSpecialChar 670ce29937SBram Moolenaarsyn match wsmlCharacter "'[^\\]'" 680ce29937SBram Moolenaarsyn match wsmlNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" 690ce29937SBram Moolenaarsyn match wsmlNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" 700ce29937SBram Moolenaarsyn match wsmlNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" 710ce29937SBram Moolenaarsyn match wsmlNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" 720ce29937SBram Moolenaar 730ce29937SBram Moolenaar" unicode characters 740ce29937SBram Moolenaarsyn match wsmlSpecial "\\u\d\{4\}" 750ce29937SBram Moolenaar 760ce29937SBram Moolenaarsyn cluster wsmlTop add=wsmlString,wsmlCharacter,wsmlNumber,wsmlSpecial,wsmlStringError 770ce29937SBram Moolenaar 780ce29937SBram Moolenaar" Define the default highlighting. 7989bcfda6SBram Moolenaar" Only when an item doesn't have highlighting yet 80*f37506f6SBram Moolenaarhi def link wsmlHeader TypeDef 81*f37506f6SBram Moolenaarhi def link wsmlNamespace TypeDef 82*f37506f6SBram Moolenaarhi def link wsmlOntology Statement 83*f37506f6SBram Moolenaarhi def link wsmlAxiom TypeDef 84*f37506f6SBram Moolenaarhi def link wsmlService TypeDef 85*f37506f6SBram Moolenaarhi def link wsmlNFP TypeDef 86*f37506f6SBram Moolenaarhi def link wsmlTopLevel TypeDef 87*f37506f6SBram Moolenaarhi def link wsmlMediation TypeDef 88*f37506f6SBram Moolenaarhi def link wsmlBehavioral TypeDef 89*f37506f6SBram Moolenaarhi def link wsmlChoreographyPri TypeDef 90*f37506f6SBram Moolenaarhi def link wsmlChoreographySec Operator 91*f37506f6SBram Moolenaarhi def link wsmlChoreographyTer Special 92*f37506f6SBram Moolenaarhi def link wsmlString String 93*f37506f6SBram Moolenaarhi def link wsmlIdentifier Normal 94*f37506f6SBram Moolenaarhi def link wsmlSqName Normal 95*f37506f6SBram Moolenaarhi def link wsmlVariable Define 96*f37506f6SBram Moolenaarhi def link wsmlKeywordsInsideLEs Operator 97*f37506f6SBram Moolenaarhi def link wsmlOperator Operator 98*f37506f6SBram Moolenaarhi def link wsmlBrace Operator 99*f37506f6SBram Moolenaarhi def link wsmlCharacter Character 100*f37506f6SBram Moolenaarhi def link wsmlNumber Number 101*f37506f6SBram Moolenaarhi def link wsmlDataTypes Special 102*f37506f6SBram Moolenaarhi def link wsmlComment Comment 103*f37506f6SBram Moolenaarhi def link wsmlDocComment Comment 104*f37506f6SBram Moolenaarhi def link wsmlLineComment Comment 105*f37506f6SBram Moolenaarhi def link wsmlTodo Todo 106*f37506f6SBram Moolenaarhi def link wsmlFixMe Error 107*f37506f6SBram Moolenaarhi def link wsmlCommentTitle SpecialComment 108*f37506f6SBram Moolenaarhi def link wsmlCommentStar wsmlComment 1090ce29937SBram Moolenaar 1100ce29937SBram Moolenaar 1110ce29937SBram Moolenaarlet b:current_syntax = "wsml" 1120ce29937SBram Moolenaarlet b:spell_options="contained" 1130ce29937SBram Moolenaar 114