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