codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: SPECMAN E-LANGUAGE3" Maintainer: Or Freund <or@mobilian.com ;omf@gmx.co.uk; OrMeir@yahoo.com>4" Last Update: Wed Oct 24 20015 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 around13" quit when a syntax file was already loaded14if exists("b:current_syntax")15 finish16endif17 18syn keyword specmanTodo contained TODO todo ToDo FIXME XXX19 20syn keyword specmanStatement var instance on compute start event expect check that routine21syn keyword specmanStatement specman is also first only with like22syn keyword specmanStatement list of all radix hex dec bin ignore illegal23syn keyword specmanStatement traceable untraceable24syn keyword specmanStatement cover using count_only trace_only at_least transition item ranges25syn keyword specmanStatement cross text call task within26 27syn keyword specmanMethod initialize non_terminal testgroup delayed exit finish28syn keyword specmanMethod out append print outf appendf29syn keyword specmanMethod post_generate pre_generate setup_test finalize_test extract_test30syn keyword specmanMethod init run copy as_a set_config dut_error add clear lock quit31syn keyword specmanMethod lock unlock release swap quit to_string value stop_run32syn keyword specmanMethod crc_8 crc_32 crc_32_flip get_config add0 all_indices and_all33syn keyword specmanMethod apply average count delete exists first_index get_indices34syn keyword specmanMethod has insert is_a_permutation is_empty key key_exists key_index35syn keyword specmanMethod last last_index max max_index max_value min min_index36syn keyword specmanMethod min_value or_all pop pop0 push push0 product resize reverse37syn keyword specmanMethod sort split sum top top0 unique clear is_all_iterations38syn keyword specmanMethod get_enclosing_unit hdl_path exec deep_compare deep_compare_physical39syn keyword specmanMethod pack unpack warning error fatal40syn match specmanMethod "size()"41syn keyword specmanPacking packing low high42syn keyword specmanType locker address43syn keyword specmanType body code vec chars44syn keyword specmanType integer real bool int long uint byte bits bit time string45syn keyword specmanType byte_array external_pointer46syn keyword specmanBoolean TRUE FALSE47syn keyword specmanPreCondit #ifdef #ifndef #else48 49syn keyword specmanConditional choose matches50syn keyword specmanConditional if then else when try51 52 53 54syn keyword specmanLabel case casex casez default55 56syn keyword specmanLogical and or not xor57 58syn keyword specmanRepeat until repeat while for from to step each do break continue59syn keyword specmanRepeat before next sequence always -kind network60syn keyword specmanRepeat index it me in new return result select61 62syn keyword specmanTemporal cycle sample events forever63syn keyword specmanTemporal wait change negedge rise fall delay sync sim true detach eventually emit64 65syn keyword specmanConstant MAX_INT MIN_INT NULL UNDEF66 67syn keyword specmanDefine define as computed type extend68syn keyword specmanDefine verilog vhdl variable global sys69syn keyword specmanStructure struct unit70syn keyword specmanInclude import71syn keyword specmanConstraint gen keep keeping soft before72 73syn keyword specmanSpecial untyped symtab ECHO DOECHO74syn keyword specmanFile files load module ntv source_ref script read write75syn keyword specmanFSM initial idle others posedge clock cycles76 77 78syn match specmanOperator "[&|~><!)(*%@+/=?:;}{,.\^\-\[\]]"79syn match specmanOperator "+="80syn match specmanOperator "-="81syn match specmanOperator "*="82 83syn match specmanComment "//.*" contains=specmanTodo84syn match specmanComment "--.*"85syn region specmanComment start="^'>"hs=s+2 end="^<'"he=e-286 87syn match specmanHDL "'[`.a-zA-Z0-9_@\[\]]\+\>'"88 89 90syn match specmanCompare "=="91syn match specmanCompare "!==="92syn match specmanCompare "==="93syn match specmanCompare "!="94syn match specmanCompare ">="95syn match specmanCompare "<="96syn match specmanNumber "[0-9]:[0-9]"97syn match specmanNumber "\(\<\d\+\|\)'[bB]\s*[0-1_xXzZ?]\+\>"98syn match specmanNumber "0[bB]\s*[0-1_xXzZ?]\+\>"99syn match specmanNumber "\(\<\d\+\|\)'[oO]\s*[0-7_xXzZ?]\+\>"100syn match specmanNumber "0[oO]\s*[0-9a-fA-F_xXzZ?]\+\>"101syn match specmanNumber "\(\<\d\+\|\)'[dD]\s*[0-9_xXzZ?]\+\>"102syn match specmanNumber "\(\<\d\+\|\)'[hH]\s*[0-9a-fA-F_xXzZ?]\+\>"103syn match specmanNumber "0[xX]\s*[0-9a-fA-F_xXzZ?]\+\>"104syn match specmanNumber "\<[+-]\=[0-9_]\+\(\.[0-9_]*\|\)\(e[0-9_]*\|\)\>"105 106syn region specmanString start=+"+ end=+"+107 108 109 110"**********************************************************************111" I took this section from c.vim but I didnt succeded to make it work112" ANY one who dare jumping to this deep watter is more than welocome!113"**********************************************************************114""catch errors caused by wrong parenthesis and brackets115 116"syn cluster specmanParenGroup contains=specmanParenError117"" ,specmanNumbera,specmanComment118"if exists("specman_no_bracket_error")119"syn region specmanParen transparent start='(' end=')' contains=ALLBUT,@specmanParenGroup120"syn match specmanParenError ")"121"syn match specmanErrInParen contained "[{}]"122"else123"syn region specmanParen transparent start='(' end=')' contains=ALLBUT,@specmanParenGroup,specmanErrInBracket124"syn match specmanParenError "[\])]"125"syn match specmanErrInParen contained "[\]{}]"126"syn region specmanBracket transparent start='\[' end=']' contains=ALLBUT,@specmanParenGroup,specmanErrInParen127"syn match specmanErrInBracket contained "[);{}]"128"endif129"130 131"Modify the following as needed. The trade-off is performance versus132"functionality.133 134syn sync lines=50135 136" Define the default highlighting.137" Only when an item doesn't have highlighting yet138" The default methods for highlighting. Can be overridden later139hi def link specmanConditional Conditional140hi def link specmanConstraint Conditional141hi def link specmanRepeat Repeat142hi def link specmanString String143hi def link specmanComment Comment144hi def link specmanConstant Macro145hi def link specmanNumber Number146hi def link specmanCompare Operator147hi def link specmanOperator Operator148hi def link specmanLogical Operator149hi def link specmanStatement Statement150hi def link specmanHDL SpecialChar151hi def link specmanMethod Function152hi def link specmanInclude Include153hi def link specmanStructure Structure154hi def link specmanBoolean Boolean155hi def link specmanFSM Label156hi def link specmanSpecial Special157hi def link specmanType Type158hi def link specmanTemporal Type159hi def link specmanFile Include160hi def link specmanPreCondit Include161hi def link specmanDefine Typedef162hi def link specmanLabel Label163hi def link specmanPacking keyword164hi def link specmanTodo Todo165hi def link specmanParenError Error166hi def link specmanErrInParen Error167hi def link specmanErrInBracket Error168 169let b:current_syntax = "specman"170 