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