home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / mac / vim55rt.sit / runtime / syntax / ahdl.vim < prev    next >
Encoding:
Text File  |  1999-09-25  |  2.7 KB  |  79 lines  |  [TEXT/VIM!]

  1. " Vim syn file
  2. " Language:    Altera AHDL
  3. " Maintainer:    John Cook <john.cook@kla-tencor.com>
  4. " Last change:    1999 Jun 14
  5.  
  6. " Remove any old syn stuff hanging around
  7. syn clear
  8.  
  9. "this language is oblivious to case.
  10. syn case ignore
  11.  
  12. " a bunch of keywords
  13. syn keyword ahdlKeyword assert begin bidir bits buried case clique
  14. syn keyword ahdlKeyword connected_pins constant defaults define design
  15. syn keyword ahdlKeyword device else elsif end for function generate
  16. syn keyword ahdlKeyword gnd help_id if in include input is machine
  17. syn keyword ahdlKeyword node of options others output parameters
  18. syn keyword ahdlKeyword returns states subdesign table then title to
  19. syn keyword ahdlKeyword tri_state_node variable vcc when with
  20.  
  21. " a bunch of types
  22. syn keyword ahdlIdentifier carry cascade dffe dff exp global
  23. syn keyword ahdlIdentifier jkffe jkff latch lcell mcell memory opendrn
  24. syn keyword ahdlIdentifier soft srffe srff tffe tff tri wire x
  25.  
  26. syn keyword ahdlMegafunction lpm_and lpm_bustri lpm_clshift lpm_constant
  27. syn keyword ahdlMegafunction lpm_decode lpm_inv lpm_mux lpm_or lpm_xor
  28. syn keyword ahdlMegafunction busmux mux
  29.  
  30. syn keyword ahdlMegafunction divide lpm_abs lpm_add_sub lpm_compare
  31. syn keyword ahdlMegafunction lpm_counter lpm_mult
  32.  
  33. syn keyword ahdlMegafunction altdpram csfifo dcfifo scfifo csdpram lpm_ff
  34. syn keyword ahdlMegafunction lpm_latch lpm_shiftreg lpm_ram_dq lpm_ram_io
  35. syn keyword ahdlMegafunction lpm_rom lpm_dff lpm_tff clklock pll ntsc
  36.  
  37. syn keyword ahdlTodo contained TODO
  38.  
  39. " String contstants
  40. syn region  ahdlString start=+"+  skip=+\\"+  end=+"+
  41.  
  42. " valid integer number formats (decimal, binary, octal, hex)
  43. syn match   ahdlNumber '\<\d\+\>'
  44. syn match   ahdlNumber '\<b"\(0\|1\|x\)\+"'
  45. syn match   ahdlNumber '\<\(o\|q\)"\o\+"'
  46. syn match   ahdlNumber '\<\(h\|x\)"\x\+"'
  47.  
  48. " operators
  49. syn match   ahdlOperator "[!&#$+\-<>=?:\^]"
  50. syn keyword ahdlOperator not and nand or nor xor xnor
  51. syn keyword ahdlOperator mod div log2 used ceil floor
  52.  
  53. " one line and multi-line comments
  54. " (define these after ahdlOperator so -- overrides -)
  55. syn match   ahdlComment "--.*" contains=ahdlNumber,ahdlTodo
  56. syn region  ahdlComment start="%" end="%" contains=ahdlNumber,ahdlTodo
  57.  
  58. " other special characters
  59. syn match   ahdlSpecialChar "[\[\]().,;]"
  60.  
  61. syn sync minlines=1
  62.  
  63. if !exists("did_ahdl_syn_inits")
  64.   let did_ahdl_syn_inits = 1
  65.   " The default methods for highlighting. Can be overridden later
  66.   hi link ahdlNumber       ahdlString
  67.   hi link ahdlMegafunction ahdlIdentifier
  68.   hi link ahdlSpecialChar  SpecialChar
  69.   hi link ahdlKeyword      Statement
  70.   hi link ahdlString       String
  71.   hi link ahdlComment      Comment
  72.   hi link ahdlIdentifier   Identifier
  73.   hi link ahdlOperator     Operator
  74.   hi link ahdlTodo         Todo
  75. endif
  76.  
  77. let b:current_syntax = "ahdl"
  78. "end-o-file
  79.