blob: e617bdb08699ae779c02aca1d79a82922f65d5f2 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: LOTOS (Language Of Temporal Ordering Specifications, IS8807)
3" Maintainer: Daniel Amyot <damyot@csi.uottawa.ca>
4" Last Change: Wed Aug 19 1998
5" URL: http://lotos.csi.uottawa.ca/~damyot/vim/lotos.vim
6" This file is an adaptation of pascal.vim by Mario Eusebio
7" I'm not sure I understand all of the syntax highlight language,
8" but this file seems to do the job for standard LOTOS.
9
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020010" quit when a syntax file was already loaded
11if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +000012 finish
13endif
14
15syn case ignore
16
17"Comments in LOTOS are between (* and *)
18syn region lotosComment start="(\*" end="\*)" contains=lotosTodo
19
20"Operators [], [...], >>, ->, |||, |[...]|, ||, ;, !, ?, :, =, ,, :=
21syn match lotosDelimiter "[][]"
22syn match lotosDelimiter ">>"
23syn match lotosDelimiter "->"
24syn match lotosDelimiter "\[>"
25syn match lotosDelimiter "[|;!?:=,]"
26
27"Regular keywords
28syn keyword lotosStatement specification endspec process endproc
29syn keyword lotosStatement where behaviour behavior
30syn keyword lotosStatement any let par accept choice hide of in
31syn keyword lotosStatement i stop exit noexit
32
33"Operators from the Abstract Data Types in IS8807
34syn keyword lotosOperator eq ne succ and or xor implies iff
35syn keyword lotosOperator not true false
36syn keyword lotosOperator Insert Remove IsIn NotIn Union Ints
37syn keyword lotosOperator Minus Includes IsSubsetOf
38syn keyword lotosOperator lt le ge gt 0
39
40"Sorts in IS8807
41syn keyword lotosSort Boolean Bool FBoolean FBool Element
42syn keyword lotosSort Set String NaturalNumber Nat HexString
43syn keyword lotosSort HexDigit DecString DecDigit
44syn keyword lotosSort OctString OctDigit BitString Bit
45syn keyword lotosSort Octet OctetString
46
47"Keywords for ADTs
48syn keyword lotosType type endtype library endlib sorts formalsorts
49syn keyword lotosType eqns formaleqns opns formalopns forall ofsort is
50syn keyword lotosType for renamedby actualizedby sortnames opnnames
51syn keyword lotosType using
52
53syn sync lines=250
54
55" Define the default highlighting.
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020056" Only when an item doesn't have highlighting yet
57command -nargs=+ HiLink hi def link <args>
Bram Moolenaar071d4272004-06-13 20:20:40 +000058
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020059HiLink lotosStatement Statement
60HiLink lotosProcess Label
61HiLink lotosOperator Operator
62HiLink lotosSort Function
63HiLink lotosType Type
64HiLink lotosComment Comment
65HiLink lotosDelimiter String
Bram Moolenaar071d4272004-06-13 20:20:40 +000066
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020067delcommand HiLink
Bram Moolenaar071d4272004-06-13 20:20:40 +000068
69let b:current_syntax = "lotos"
70
71" vim: ts=8