blob: 8262e1d9ef5029a5656a759ce80ea93b104db723 [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
Bram Moolenaar071d4272004-06-13 20:20:40 +000057
Bram Moolenaarf37506f2016-08-31 22:22:10 +020058hi def link lotosStatement Statement
59hi def link lotosProcess Label
60hi def link lotosOperator Operator
61hi def link lotosSort Function
62hi def link lotosType Type
63hi def link lotosComment Comment
64hi def link lotosDelimiter String
Bram Moolenaar071d4272004-06-13 20:20:40 +000065
Bram Moolenaar071d4272004-06-13 20:20:40 +000066
67let b:current_syntax = "lotos"
68
69" vim: ts=8