annotate runtime/syntax/ahdl.vim @ 3273:c75a8d2404bd v7.3.405

updated for version 7.3.405 Problem: When xterm gets back the function keys it may delete the urxvt mouse termcap code. Solution: Check for the whole code, not just the start. (Egmont Koblinger)
author Bram Moolenaar <bram@vim.org>
date Fri, 20 Jan 2012 17:15:51 +0100
parents 3fc0f57ecb91
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syn file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Altera AHDL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: John Cook <john.cook@kla-tencor.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2001 Apr 25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 "this language is oblivious to case.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " a bunch of keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword ahdlKeyword assert begin bidir bits buried case clique
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword ahdlKeyword connected_pins constant defaults define design
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword ahdlKeyword device else elsif end for function generate
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword ahdlKeyword gnd help_id if in include input is machine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword ahdlKeyword node of options others output parameters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword ahdlKeyword returns states subdesign table then title to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword ahdlKeyword tri_state_node variable vcc when with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " a bunch of types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword ahdlIdentifier carry cascade dffe dff exp global
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword ahdlIdentifier jkffe jkff latch lcell mcell memory opendrn
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword ahdlIdentifier soft srffe srff tffe tff tri wire x
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword ahdlMegafunction lpm_and lpm_bustri lpm_clshift lpm_constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword ahdlMegafunction lpm_decode lpm_inv lpm_mux lpm_or lpm_xor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword ahdlMegafunction busmux mux
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword ahdlMegafunction divide lpm_abs lpm_add_sub lpm_compare
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword ahdlMegafunction lpm_counter lpm_mult
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword ahdlMegafunction altdpram csfifo dcfifo scfifo csdpram lpm_ff
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword ahdlMegafunction lpm_latch lpm_shiftreg lpm_ram_dq lpm_ram_io
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword ahdlMegafunction lpm_rom lpm_dff lpm_tff clklock pll ntsc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword ahdlTodo contained TODO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " String contstants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn region ahdlString start=+"+ skip=+\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " valid integer number formats (decimal, binary, octal, hex)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match ahdlNumber '\<\d\+\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match ahdlNumber '\<b"\(0\|1\|x\)\+"'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match ahdlNumber '\<\(o\|q\)"\o\+"'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match ahdlNumber '\<\(h\|x\)"\x\+"'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " operators
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match ahdlOperator "[!&#$+\-<>=?:\^]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword ahdlOperator not and nand or nor xor xnor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword ahdlOperator mod div log2 used ceil floor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 " one line and multi-line comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 " (define these after ahdlOperator so -- overrides -)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match ahdlComment "--.*" contains=ahdlNumber,ahdlTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn region ahdlComment start="%" end="%" contains=ahdlNumber,ahdlTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 " other special characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match ahdlSpecialChar "[\[\]().,;]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn sync minlines=1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 if version >= 508 || !exists("did_ahdl_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 let did_ahdl_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " The default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 HiLink ahdlNumber ahdlString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink ahdlMegafunction ahdlIdentifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 HiLink ahdlSpecialChar SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 HiLink ahdlKeyword Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 HiLink ahdlString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 HiLink ahdlComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 HiLink ahdlIdentifier Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 HiLink ahdlOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 HiLink ahdlTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 let b:current_syntax = "ahdl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 " vim:ts=8