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