Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: SPECMAN E-LANGUAGE |
| 3 | " Maintainer: Or Freund <or@mobilian.com ;omf@gmx.co.uk; OrMeir@yahoo.com> |
| 4 | " Last Update: Wed Oct 24 2001 |
| 5 | |
| 6 | "--------------------------------------------------------- |
| 7 | "| If anyone found an error or fix the parenthesis part | |
| 8 | "| I will be happy to hear about it | |
| 9 | "| Thanks Or. | |
| 10 | "--------------------------------------------------------- |
| 11 | |
| 12 | " Remove any old syntax stuff hanging around |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 13 | " quit when a syntax file was already loaded |
| 14 | if exists("b:current_syntax") |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 15 | finish |
| 16 | endif |
| 17 | |
| 18 | syn keyword specmanTodo contained TODO todo ToDo FIXME XXX |
| 19 | |
| 20 | syn keyword specmanStatement var instance on compute start event expect check that routine |
| 21 | syn keyword specmanStatement specman is also first only with like |
| 22 | syn keyword specmanStatement list of all radix hex dec bin ignore illegal |
| 23 | syn keyword specmanStatement traceable untraceable |
| 24 | syn keyword specmanStatement cover using count_only trace_only at_least transition item ranges |
| 25 | syn keyword specmanStatement cross text call task within |
| 26 | |
| 27 | syn keyword specmanMethod initialize non_terminal testgroup delayed exit finish |
| 28 | syn keyword specmanMethod out append print outf appendf |
| 29 | syn keyword specmanMethod post_generate pre_generate setup_test finalize_test extract_test |
| 30 | syn keyword specmanMethod init run copy as_a set_config dut_error add clear lock quit |
| 31 | syn keyword specmanMethod lock unlock release swap quit to_string value stop_run |
| 32 | syn keyword specmanMethod crc_8 crc_32 crc_32_flip get_config add0 all_indices and_all |
| 33 | syn keyword specmanMethod apply average count delete exists first_index get_indices |
| 34 | syn keyword specmanMethod has insert is_a_permutation is_empty key key_exists key_index |
| 35 | syn keyword specmanMethod last last_index max max_index max_value min min_index |
| 36 | syn keyword specmanMethod min_value or_all pop pop0 push push0 product resize reverse |
| 37 | syn keyword specmanMethod sort split sum top top0 unique clear is_all_iterations |
| 38 | syn keyword specmanMethod get_enclosing_unit hdl_path exec deep_compare deep_compare_physical |
| 39 | syn keyword specmanMethod pack unpack warning error fatal |
| 40 | syn match specmanMethod "size()" |
| 41 | syn keyword specmanPacking packing low high |
| 42 | syn keyword specmanType locker address |
| 43 | syn keyword specmanType body code vec chars |
| 44 | syn keyword specmanType integer real bool int long uint byte bits bit time string |
| 45 | syn keyword specmanType byte_array external_pointer |
| 46 | syn keyword specmanBoolean TRUE FALSE |
| 47 | syn keyword specmanPreCondit #ifdef #ifndef #else |
| 48 | |
| 49 | syn keyword specmanConditional choose matches |
| 50 | syn keyword specmanConditional if then else when try |
| 51 | |
| 52 | |
| 53 | |
| 54 | syn keyword specmanLabel case casex casez default |
| 55 | |
| 56 | syn keyword specmanLogical and or not xor |
| 57 | |
| 58 | syn keyword specmanRepeat until repeat while for from to step each do break continue |
| 59 | syn keyword specmanRepeat before next sequence always -kind network |
| 60 | syn keyword specmanRepeat index it me in new return result select |
| 61 | |
| 62 | syn keyword specmanTemporal cycle sample events forever |
| 63 | syn keyword specmanTemporal wait change negedge rise fall delay sync sim true detach eventually emit |
| 64 | |
| 65 | syn keyword specmanConstant MAX_INT MIN_INT NULL UNDEF |
| 66 | |
| 67 | syn keyword specmanDefine define as computed type extend |
| 68 | syn keyword specmanDefine verilog vhdl variable global sys |
| 69 | syn keyword specmanStructure struct unit |
| 70 | syn keyword specmanInclude import |
| 71 | syn keyword specmanConstraint gen keep keeping soft before |
| 72 | |
| 73 | syn keyword specmanSpecial untyped symtab ECHO DOECHO |
| 74 | syn keyword specmanFile files load module ntv source_ref script read write |
| 75 | syn keyword specmanFSM initial idle others posedge clock cycles |
| 76 | |
| 77 | |
| 78 | syn match specmanOperator "[&|~><!)(*%@+/=?:;}{,.\^\-\[\]]" |
| 79 | syn match specmanOperator "+=" |
| 80 | syn match specmanOperator "-=" |
| 81 | syn match specmanOperator "*=" |
| 82 | |
| 83 | syn match specmanComment "//.*" contains=specmanTodo |
| 84 | syn match specmanComment "--.*" |
| 85 | syn region specmanComment start="^'>"hs=s+2 end="^<'"he=e-2 |
| 86 | |
| 87 | syn match specmanHDL "'[`.a-zA-Z0-9_@\[\]]\+\>'" |
| 88 | |
| 89 | |
| 90 | syn match specmanCompare "==" |
| 91 | syn match specmanCompare "!===" |
| 92 | syn match specmanCompare "===" |
| 93 | syn match specmanCompare "!=" |
| 94 | syn match specmanCompare ">=" |
| 95 | syn match specmanCompare "<=" |
| 96 | syn match specmanNumber "[0-9]:[0-9]" |
| 97 | syn match specmanNumber "\(\<\d\+\|\)'[bB]\s*[0-1_xXzZ?]\+\>" |
| 98 | syn match specmanNumber "0[bB]\s*[0-1_xXzZ?]\+\>" |
| 99 | syn match specmanNumber "\(\<\d\+\|\)'[oO]\s*[0-7_xXzZ?]\+\>" |
| 100 | syn match specmanNumber "0[oO]\s*[0-9a-fA-F_xXzZ?]\+\>" |
| 101 | syn match specmanNumber "\(\<\d\+\|\)'[dD]\s*[0-9_xXzZ?]\+\>" |
| 102 | syn match specmanNumber "\(\<\d\+\|\)'[hH]\s*[0-9a-fA-F_xXzZ?]\+\>" |
| 103 | syn match specmanNumber "0[xX]\s*[0-9a-fA-F_xXzZ?]\+\>" |
| 104 | syn match specmanNumber "\<[+-]\=[0-9_]\+\(\.[0-9_]*\|\)\(e[0-9_]*\|\)\>" |
| 105 | |
| 106 | syn region specmanString start=+"+ end=+"+ |
| 107 | |
| 108 | |
| 109 | |
| 110 | "********************************************************************** |
| 111 | " I took this section from c.vim but I didnt succeded to make it work |
| 112 | " ANY one who dare jumping to this deep watter is more than welocome! |
| 113 | "********************************************************************** |
| 114 | ""catch errors caused by wrong parenthesis and brackets |
| 115 | |
| 116 | "syn cluster specmanParenGroup contains=specmanParenError |
| 117 | "" ,specmanNumbera,specmanComment |
| 118 | "if exists("specman_no_bracket_error") |
| 119 | "syn region specmanParen transparent start='(' end=')' contains=ALLBUT,@specmanParenGroup |
| 120 | "syn match specmanParenError ")" |
| 121 | "syn match specmanErrInParen contained "[{}]" |
| 122 | "else |
| 123 | "syn region specmanParen transparent start='(' end=')' contains=ALLBUT,@specmanParenGroup,specmanErrInBracket |
| 124 | "syn match specmanParenError "[\])]" |
| 125 | "syn match specmanErrInParen contained "[\]{}]" |
| 126 | "syn region specmanBracket transparent start='\[' end=']' contains=ALLBUT,@specmanParenGroup,specmanErrInParen |
| 127 | "syn match specmanErrInBracket contained "[);{}]" |
| 128 | "endif |
| 129 | " |
| 130 | |
| 131 | "Modify the following as needed. The trade-off is performance versus |
| 132 | "functionality. |
| 133 | |
| 134 | syn sync lines=50 |
| 135 | |
| 136 | " Define the default highlighting. |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 137 | " Only when an item doesn't have highlighting yet |
| 138 | command -nargs=+ HiLink hi def link <args> |
| 139 | " The default methods for highlighting. Can be overridden later |
| 140 | HiLink specmanConditional Conditional |
| 141 | HiLink specmanConstraint Conditional |
| 142 | HiLink specmanRepeat Repeat |
| 143 | HiLink specmanString String |
| 144 | HiLink specmanComment Comment |
| 145 | HiLink specmanConstant Macro |
| 146 | HiLink specmanNumber Number |
| 147 | HiLink specmanCompare Operator |
| 148 | HiLink specmanOperator Operator |
| 149 | HiLink specmanLogical Operator |
| 150 | HiLink specmanStatement Statement |
| 151 | HiLink specmanHDL SpecialChar |
| 152 | HiLink specmanMethod Function |
| 153 | HiLink specmanInclude Include |
| 154 | HiLink specmanStructure Structure |
| 155 | HiLink specmanBoolean Boolean |
| 156 | HiLink specmanFSM Label |
| 157 | HiLink specmanSpecial Special |
| 158 | HiLink specmanType Type |
| 159 | HiLink specmanTemporal Type |
| 160 | HiLink specmanFile Include |
| 161 | HiLink specmanPreCondit Include |
| 162 | HiLink specmanDefine Typedef |
| 163 | HiLink specmanLabel Label |
| 164 | HiLink specmanPacking keyword |
| 165 | HiLink specmanTodo Todo |
| 166 | HiLink specmanParenError Error |
| 167 | HiLink specmanErrInParen Error |
| 168 | HiLink specmanErrInBracket Error |
| 169 | delcommand HiLink |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 170 | |
| 171 | let b:current_syntax = "specman" |