Mercurial > vim
annotate runtime/syntax/murphi.vim @ 18415:52eb1bbf7690
Added tag v8.1.2201 for changeset 6b8508ea90d798b96e29aaa21d6f8021c43128a7
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 23 Oct 2019 21:45:04 +0200 |
parents | cc953757ed2a |
children |
rev | line source |
---|---|
11659
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Vim syntax file |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 " Language: Murphi model checking language |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 " Maintainer: Matthew Fernandez <matthew.fernandez@gmail.com> |
17909 | 4 " Last Change: 2019 Aug 27 |
11659
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 " Version: 2 |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 " Remark: Originally authored by Diego Ongaro <ongaro@cs.stanford.edu> |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 if version < 600 |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 syntax clear |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 elseif exists("b:current_syntax") |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 finish |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 endif |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 " Keywords are case insensitive. |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 " Keep these in alphabetical order. |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 syntax case ignore |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 syn keyword murphiKeyword alias |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 syn keyword murphiStructure array |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 syn keyword murphiKeyword assert |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 syn keyword murphiKeyword begin |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 syn keyword murphiType boolean |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 syn keyword murphiKeyword by |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 syn keyword murphiLabel case |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 syn keyword murphiKeyword clear |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 syn keyword murphiLabel const |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 syn keyword murphiRepeat do |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 syn keyword murphiConditional else |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 syn keyword murphiConditional elsif |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 syn keyword murphiKeyword end |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 syn keyword murphiKeyword endalias |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 syn keyword murphiRepeat endexists |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 syn keyword murphiRepeat endfor |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 syn keyword murphiRepeat endforall |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 syn keyword murphiKeyword endfunction |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 syn keyword murphiConditional endif |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 syn keyword murphiKeyword endprocedure |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 syn keyword murphiStructure endrecord |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 syn keyword murphiKeyword endrule |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 syn keyword murphiKeyword endruleset |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 syn keyword murphiKeyword endstartstate |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 syn keyword murphiConditional endswitch |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 syn keyword murphiRepeat endwhile |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 syn keyword murphiStructure enum |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 syn keyword murphiKeyword error |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
45 syn keyword murphiRepeat exists |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
46 syn keyword murphiBoolean false |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
47 syn keyword murphiRepeat for |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
48 syn keyword murphiRepeat forall |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
49 syn keyword murphiKeyword function |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 syn keyword murphiConditional if |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 syn keyword murphiKeyword in |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
52 syn keyword murphiKeyword interleaved |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
53 syn keyword murphiLabel invariant |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
54 syn keyword murphiFunction ismember |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
55 syn keyword murphiFunction isundefined |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
56 syn keyword murphiKeyword log |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
57 syn keyword murphiStructure of |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
58 syn keyword murphiType multiset |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
59 syn keyword murphiFunction multisetadd |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
60 syn keyword murphiFunction multisetcount |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 syn keyword murphiFunction multisetremove |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
62 syn keyword murphiFunction multisetremovepred |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
63 syn keyword murphiKeyword procedure |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
64 syn keyword murphiKeyword program |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
65 syn keyword murphiKeyword put |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
66 syn keyword murphiStructure record |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
67 syn keyword murphiKeyword return |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
68 syn keyword murphiLabel rule |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
69 syn keyword murphiLabel ruleset |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
70 syn keyword murphiType scalarset |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
71 syn keyword murphiLabel startstate |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
72 syn keyword murphiConditional switch |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
73 syn keyword murphiConditional then |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
74 syn keyword murphiRepeat to |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
75 syn keyword murphiKeyword traceuntil |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
76 syn keyword murphiBoolean true |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
77 syn keyword murphiLabel type |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
78 syn keyword murphiKeyword undefine |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
79 syn keyword murphiStructure union |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
80 syn keyword murphiLabel var |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
81 syn keyword murphiRepeat while |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
82 |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
83 syn keyword murphiTodo contained todo xxx fixme |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
84 syntax case match |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
85 |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
86 " Integers. |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
87 syn match murphiNumber "\<\d\+\>" |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
88 |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
89 " Operators and special characters. |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
90 syn match murphiOperator "[\+\-\*\/%&|=!<>:\?]\|\." |
17909 | 91 syn match murphiDelimiter "\(:=\@!\|[;,]\)" |
11659
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
92 syn match murphiSpecial "[()\[\]]" |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
93 |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
94 " Double equal sign is a common error: use one equal sign for equality testing. |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
95 syn match murphiError "==[^>]"he=e-1 |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
96 " Double && and || are errors. |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
97 syn match murphiError "&&\|||" |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
98 |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
99 " Strings. This is defined so late so that it overrides previous matches. |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
100 syn region murphiString start=+"+ end=+"+ |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
101 |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
102 " Comments. This is defined so late so that it overrides previous matches. |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
103 syn region murphiComment start="--" end="$" contains=murphiTodo |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
104 syn region murphiComment start="/\*" end="\*/" contains=murphiTodo |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
105 |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
106 " Link the rules to some groups. |
12254 | 107 hi def link murphiComment Comment |
108 hi def link murphiString String | |
109 hi def link murphiNumber Number | |
110 hi def link murphiBoolean Boolean | |
111 hi def link murphiIdentifier Identifier | |
112 hi def link murphiFunction Function | |
113 hi def link murphiStatement Statement | |
114 hi def link murphiConditional Conditional | |
115 hi def link murphiRepeat Repeat | |
116 hi def link murphiLabel Label | |
117 hi def link murphiOperator Operator | |
118 hi def link murphiKeyword Keyword | |
119 hi def link murphiType Type | |
120 hi def link murphiStructure Structure | |
121 hi def link murphiSpecial Special | |
122 hi def link murphiDelimiter Delimiter | |
123 hi def link murphiError Error | |
124 hi def link murphiTodo Todo | |
11659
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
125 |
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
126 let b:current_syntax = "murphi" |