Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: ProMeLa |
| 3 | " Maintainer: Maurizio Tranchero <maurizio.tranchero@polito.it> - <maurizio.tranchero@gmail.com> |
| 4 | " First Release: Mon Oct 16 08:49:46 CEST 2006 |
| 5 | " Last Change: Sat May 16 12:20:43 CEST 2007 |
| 6 | " Version: 0.2 |
| 7 | |
| 8 | " For version 5.x: Clear all syntax items |
| 9 | " For version 6.x: Quit when a syntax file was already loaded |
| 10 | if version < 600 |
| 11 | syntax clear |
| 12 | elseif exists("b:current_syntax") |
| 13 | finish |
| 14 | endif |
| 15 | |
| 16 | " case is significant |
| 17 | " syn case ignore |
| 18 | " ProMeLa Keywords |
| 19 | syn keyword promelaStatement proctype if else while chan do od fi break goto unless |
| 20 | syn keyword promelaStatement active assert label atomic |
| 21 | syn keyword promelaFunctions skip timeout run |
| 22 | " check what it is the following |
| 23 | " ProMeLa Types |
| 24 | syn keyword promelaType bit bool byte short int |
| 25 | " ProMeLa Regions |
| 26 | syn region promelaComment start="\/\/" end="$" keepend |
| 27 | syn region promelaString start="\"" end="\"" |
| 28 | " syn region promelaComment start="//" end="$" contains=ALL |
| 29 | " syn region promelaComment start="/\*" end="\*/" contains=ALL |
| 30 | " ProMeLa Comment |
| 31 | syn match promelaComment "\/.*$" |
| 32 | syn match promelaComment "/\*.*\*/" |
| 33 | " Operators and special characters |
| 34 | syn match promelaOperator "!" |
| 35 | syn match promelaOperator "?" |
| 36 | syn match promelaOperator "->" |
| 37 | syn match promelaOperator "=" |
| 38 | syn match promelaOperator "+" |
| 39 | syn match promelaOperator "*" |
| 40 | syn match promelaOperator "/" |
| 41 | syn match promelaOperator "-" |
| 42 | syn match promelaOperator "<" |
| 43 | syn match promelaOperator ">" |
| 44 | syn match promelaOperator "<=" |
| 45 | syn match promelaOperator ">=" |
| 46 | syn match promelaSpecial "\[" |
| 47 | syn match promelaSpecial "\]" |
| 48 | syn match promelaSpecial ";" |
| 49 | syn match promelaSpecial "::" |
| 50 | |
| 51 | " Class Linking |
| 52 | hi def link promelaStatement Statement |
| 53 | hi def link promelaType Type |
| 54 | hi def link promelaComment Comment |
| 55 | hi def link promelaOperator Type |
| 56 | hi def link promelaSpecial Special |
| 57 | hi def link promelaFunctions Special |
| 58 | hi def link promelaString String |
| 59 | |
| 60 | let b:current_syntax = "promela" |