1" Vim syntax file 2" Language: Hercules 3" Maintainer: Dana Edwards <[email protected]> 4" Extensions: *.vc,*.ev,*.rs 5" Last change: Nov. 9, 2001 6" Comment: Hercules physical IC design verification software ensures 7" that an IC's physical design matches its logical design and 8" satisfies manufacturing rules. 9 10" For version 5.x: Clear all syntax items 11" For version 6.x: Quit when a syntax file was already loaded 12if version < 600 13 syntax clear 14elseif exists("b:current_syntax") 15 finish 16endif 17 18" Ignore case 19syn case ignore 20 21" Hercules runset sections 22syn keyword herculesType header assign_property alias assign 23syn keyword herculesType options preprocess_options 24syn keyword herculesType explode_options technology_options 25syn keyword herculesType drc_options database_options 26syn keyword herculesType text_options lpe_options evaccess_options 27syn keyword herculesType check_point compare_group environment 28syn keyword herculesType grid_check include layer_stats load_group 29syn keyword herculesType restart run_only self_intersect set snap 30syn keyword herculesType system variable waiver 31 32" Hercules commands 33syn keyword herculesStatement attach_property boolean cell_extent 34syn keyword herculesStatement common_hierarchy connection_points 35syn keyword herculesStatement copy data_filter alternate delete 36syn keyword herculesStatement explode explode_all fill_pattern find_net 37syn keyword herculesStatement flatten 38syn keyword herculesStatement level negate polygon_features push 39syn keyword herculesStatement rectangles relocate remove_overlap reverse select 40syn keyword herculesStatement select_cell select_contains select_edge select_net size 41syn keyword herculesStatement text_polygon text_property vertex area cut 42syn keyword herculesStatement density enclose external inside_edge 43syn keyword herculesStatement internal notch vectorize center_to_center 44syn keyword herculesStatement length mask_align moscheck rescheck 45syn keyword herculesStatement analysis buildsub init_lpe_db capacitor 46syn keyword herculesStatement device gendev nmos pmos diode npn pnp 47syn keyword herculesStatement resistor set_param save_property 48syn keyword herculesStatement connect disconnect text text_boolean 49syn keyword herculesStatement replace_text create_ports label graphics 50syn keyword herculesStatement save_netlist_database lpe_stats netlist 51syn keyword herculesStatement spice graphics_property graphics_netlist 52syn keyword herculesStatement write_milkyway multi_rule_enclose 53syn keyword herculesStatement if error_property equate compare 54syn keyword herculesStatement antenna_fix c_thru dev_connect_check 55syn keyword herculesStatement dev_net_count device_count net_filter 56syn keyword herculesStatement net_path_check ratio process_text_opens 57 58" Hercules keywords 59syn keyword herculesStatement black_box_file block compare_dir equivalence 60syn keyword herculesStatement format gdsin_dir group_dir group_dir_usage 61syn keyword herculesStatement inlib layout_path outlib output_format 62syn keyword herculesStatement output_layout_path schematic schematic_format 63syn keyword herculesStatement scheme_file output_block else 64syn keyword herculesStatement and or not xor andoverlap inside outside by to 65syn keyword herculesStatement with connected connected_all texted_with texted 66syn keyword herculesStatement by_property cutting edge_touch enclosing inside 67syn keyword herculesStatement inside_hole interact touching vertex 68 69" Hercules comments 70syn region herculesComment start="/\*" skip="/\*" end="\*/" contains=herculesTodo 71syn match herculesComment "//.*" contains=herculesTodo 72 73" Preprocessor directives 74syn match herculesPreProc "^#.*" 75syn match herculesPreProc "^@.*" 76syn match herculesPreProc "macros" 77 78" Hercules COMMENT option 79syn match herculesCmdCmnt "comment.*=.*" 80 81" Spacings, Resolutions, Ranges, Ratios, etc. 82syn match herculesNumber "-\=\<[0-9]\+L\=\>\|0[xX][0-9]\+\>" 83 84" Parenthesis sanity checker 85syn region herculesZone matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,herculesError,herculesBraceError,herculesCurlyError 86syn region herculesZone matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,herculesError,herculesBraceError,herculesParenError 87syn region herculesZone matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,herculesError,herculesCurlyError,herculesParenError 88syn match herculesError "[)\]}]" 89syn match herculesBraceError "[)}]" contained 90syn match herculesCurlyError "[)\]]" contained 91syn match herculesParenError "[\]}]" contained 92 93" Hercules output format 94"syn match herculesOutput "([0-9].*)" 95"syn match herculesOutput "([0-9].*\;.*)" 96syn match herculesOutput "perm\s*=.*(.*)" 97syn match herculesOutput "temp\s*=\s*" 98syn match herculesOutput "error\s*=\s*(.*)" 99 100"Modify the following as needed. The trade-off is performance versus functionality. 101syn sync lines=100 102 103" Define the default highlighting. 104" For version 5.7 and earlier: only when not done already 105" For version 5.8 and later: only when an item doesn't have highlighting yet 106if version >= 508 || !exists("did_hercules_syntax_inits") 107 if version < 508 108 let did_hercules_syntax_inits = 1 109 " Default methods for highlighting. 110 command -nargs=+ HiLink hi link <args> 111 else 112 command -nargs=+ HiLink hi def link <args> 113 endif 114 115 HiLink herculesStatement Statement 116 HiLink herculesType Type 117 HiLink herculesComment Comment 118 HiLink herculesPreProc PreProc 119 HiLink herculesTodo Todo 120 HiLink herculesOutput Include 121 HiLink herculesCmdCmnt Identifier 122 HiLink herculesNumber Number 123 HiLink herculesBraceError herculesError 124 HiLink herculesCurlyError herculesError 125 HiLink herculesParenError herculesError 126 HiLink herculesError Error 127 128 delcommand HiLink 129endif 130 131let b:current_syntax = "hercules" 132 133" vim: ts=8 134