neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

lotos.vim (2361B)


      1 " 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 
     10 " quit when a syntax file was already loaded
     11 if exists("b:current_syntax")
     12  finish
     13 endif
     14 
     15 syn case ignore
     16 
     17 "Comments in LOTOS are between (* and *)
     18 syn region lotosComment	start="(\*"  end="\*)" contains=lotosTodo
     19 
     20 "Operators [], [...], >>, ->, |||, |[...]|, ||, ;, !, ?, :, =, ,, :=
     21 syn match  lotosDelimiter       "[][]"
     22 syn match  lotosDelimiter	">>"
     23 syn match  lotosDelimiter	"->"
     24 syn match  lotosDelimiter	"\[>"
     25 syn match  lotosDelimiter	"[|;!?:=,]"
     26 
     27 "Regular keywords
     28 syn keyword lotosStatement	specification endspec process endproc
     29 syn keyword lotosStatement	where behaviour behavior
     30 syn keyword lotosStatement      any let par accept choice hide of in
     31 syn keyword lotosStatement	i stop exit noexit
     32 
     33 "Operators from the Abstract Data Types in IS8807
     34 syn keyword lotosOperator	eq ne succ and or xor implies iff
     35 syn keyword lotosOperator	not true false
     36 syn keyword lotosOperator	Insert Remove IsIn NotIn Union Ints
     37 syn keyword lotosOperator	Minus Includes IsSubsetOf
     38 syn keyword lotosOperator	lt le ge gt 0
     39 
     40 "Sorts in IS8807
     41 syn keyword lotosSort		Boolean Bool FBoolean FBool Element
     42 syn keyword lotosSort		Set String NaturalNumber Nat HexString
     43 syn keyword lotosSort		HexDigit DecString DecDigit
     44 syn keyword lotosSort		OctString OctDigit BitString Bit
     45 syn keyword lotosSort		Octet OctetString
     46 
     47 "Keywords for ADTs
     48 syn keyword lotosType	type endtype library endlib sorts formalsorts
     49 syn keyword lotosType	eqns formaleqns opns formalopns forall ofsort is
     50 syn keyword lotosType   for renamedby actualizedby sortnames opnnames
     51 syn keyword lotosType   using
     52 
     53 syn sync lines=250
     54 
     55 " Define the default highlighting.
     56 " Only when an item doesn't have highlighting yet
     57 
     58 hi def link lotosStatement		Statement
     59 hi def link lotosProcess		Label
     60 hi def link lotosOperator		Operator
     61 hi def link lotosSort		Function
     62 hi def link lotosType		Type
     63 hi def link lotosComment		Comment
     64 hi def link lotosDelimiter		String
     65 
     66 
     67 let b:current_syntax = "lotos"
     68 
     69 " vim: ts=8