Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 10 | " quit when a syntax file was already loaded |
| 11 | if exists("b:current_syntax") |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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. |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 56 | " Only when an item doesn't have highlighting yet |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 57 | |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 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 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 65 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 66 | |
| 67 | let b:current_syntax = "lotos" |
| 68 | |
| 69 | " vim: ts=8 |