hercules.vim 5.6 KB

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