lotos.vim 2.3 KB

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