psl.vim 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. " Vim syntax file
  2. " Language: Property Specification Language (PSL)
  3. " Maintainer: Daniel Kho <daniel.kho@logik.haus>
  4. " Last Changed: 2021 Apr 17 by Daniel Kho
  5. " quit when a syntax file was already loaded
  6. if exists("b:current_syntax")
  7. finish
  8. endif
  9. " Read in VHDL syntax files
  10. runtime! syntax/vhdl.vim
  11. unlet b:current_syntax
  12. let s:cpo_save = &cpo
  13. set cpo&vim
  14. " case is not significant
  15. syn case ignore
  16. " Add ! character to keyword recognition.
  17. setlocal iskeyword+=33
  18. " PSL keywords
  19. syn keyword pslOperator A AF AG AX
  20. syn keyword pslOperator E EF EG EX
  21. syn keyword pslOperator F G U W X X!
  22. syn keyword pslOperator abort always assert assume async_abort
  23. syn keyword pslOperator before before! before!_ before_ bit bitvector boolean
  24. syn keyword pslOperator clock const countones cover
  25. syn keyword pslOperator default
  26. syn keyword pslOperator ended eventually!
  27. syn keyword pslOperator fairness fell for forall
  28. syn keyword pslOperator hdltype
  29. syn keyword pslOperator in inf inherit isunknown
  30. syn keyword pslOperator mutable
  31. syn keyword pslOperator never next next! next_a next_a! next_e next_e! next_event next_event! next_event_a next_event_a! next_event_e next_event_e! nondet nondet_vector numeric
  32. syn keyword pslOperator onehot onehot0
  33. syn keyword pslOperator property prev
  34. syn keyword pslOperator report restrict restrict! rose
  35. syn keyword pslOperator sequence stable string strong sync_abort
  36. syn keyword pslOperator union until until! until!_ until_
  37. syn keyword pslOperator vmode vpkg vprop vunit
  38. syn keyword pslOperator within
  39. "" Common keywords with VHDL
  40. "syn keyword pslOperator and is not or to
  41. " PSL operators
  42. syn match pslOperator "=>\||=>"
  43. syn match pslOperator "<-\|->"
  44. syn match pslOperator "@"
  45. "Modify the following as needed. The trade-off is performance versus functionality.
  46. syn sync minlines=600
  47. " Define the default highlighting.
  48. " Only when an item doesn't have highlighting yet
  49. hi def link pslSpecial Special
  50. hi def link pslStatement Statement
  51. hi def link pslCharacter Character
  52. hi def link pslString String
  53. hi def link pslVector Number
  54. hi def link pslBoolean Number
  55. hi def link pslTodo Todo
  56. hi def link pslFixme Fixme
  57. hi def link pslComment Comment
  58. hi def link pslNumber Number
  59. hi def link pslTime Number
  60. hi def link pslType Type
  61. hi def link pslOperator Operator
  62. hi def link pslError Error
  63. hi def link pslAttribute Special
  64. hi def link pslPreProc PreProc
  65. let b:current_syntax = "psl"
  66. let &cpo = s:cpo_save
  67. unlet s:cpo_save
  68. " vim: ts=8