File: murphi.vim

package info (click to toggle)
rumur 2025.08.31-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,644 kB
  • sloc: cpp: 18,711; ansic: 3,825; python: 1,578; objc: 1,542; yacc: 568; sh: 331; lex: 241; lisp: 15; makefile: 5
file content (39 lines) | stat: -rw-r--r-- 1,322 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
" Vim support for Rumur extensions to the Murphi syntax
" Language: murphi
" Maintainer: Matthew Fernandez <matthew.fernandez@gmail.com>
" License: The Unlicense

" Vim already knows how to highlight Murphi files, but doesn't know about the
" extra things that Rumur supports. To use this file, copy it into
" ~/.vim/after/syntax/. The Rumur extensions to Murphi should now be correctly
" highlighted when editing models.

" extra keywords that Rumur supports
syntax case ignore
syn keyword murphiKeyword assume
syn keyword murphiKeyword cover
syn keyword murphiKeyword liveness
syntax case match

" support for hex and octal numbers in addition to decimal
syn match murphiNumber "\<\(0[xX]\x\+\|0\o+\|[1-9]\d*\)\>"

" error-highlight bad octals
syn match murphiError "\<0\o*[89]"

" override the base syntax's highlighting of `==` as an error
syn match murphiOperator "==[^>]"he=e-1

" UTF-8 operators that Rumur recognises
syn match murphiOperator "[∀∃≔≥→≤≠⇒¬∧∨÷−∕×]"

" extra logical operators that Rumur supports
syn match murphiOperator "&&"
syn match murphiOperator "||"

" bitwise operators that Rumur supports
syn match murphiOperator "\^"
syn match murphiOperator "\~"

" recognise escape sequences in strings
syn region murphiString start=+"\|“+ skip=+\\\\\|\\"\|\\”+ end=+"\|”+