annotate runtime/syntax/abel.vim @ 202:b6450bf509d8

updated for version 7.0060
author vimboss
date Tue, 15 Mar 2005 22:28:00 +0000
parents 3fc0f57ecb91
children 91e53bcb7946
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 syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: ABEL
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 Sep 2
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 abelHeader module title device options
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword abelSection declarations equations test_vectors end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword abelDeclaration state truth_table state_diagram property
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword abelType pin node attribute constant macro library
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword abelTypeId com reg neg pos buffer dc reg_d reg_t contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword abelTypeId reg_sr reg_jk reg_g retain xor invert contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword abelStatement when then else if with endwith case endcase
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword abelStatement fuses expr trace
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " option to omit obsolete statements
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 if exists("abel_obsolete_ok")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword abelStatement enable flag in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword abelError enable flag in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " directives
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match abelDirective "@alternate"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match abelDirective "@standard"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match abelDirective "@const"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match abelDirective "@dcset"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match abelDirective "@include"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match abelDirective "@page"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match abelDirective "@radix"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match abelDirective "@repeat"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match abelDirective "@irp"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match abelDirective "@expr"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match abelDirective "@if"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match abelDirective "@ifb"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match abelDirective "@ifnb"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match abelDirective "@ifdef"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match abelDirective "@ifndef"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match abelDirective "@ifiden"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn match abelDirective "@ifniden"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword abelTodo contained TODO XXX FIXME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " wrap up type identifiers to differentiate them from normal strings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn region abelSpecifier start='istype' end=';' contains=abelTypeIdChar,abelTypeId,abelTypeIdEnd keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn match abelTypeIdChar "[,']" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match abelTypeIdEnd ";" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 " string contstants and special characters within them
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match abelSpecial contained "\\['\\]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn region abelString start=+'+ skip=+\\"+ end=+'+ contains=abelSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 " valid integer number formats (decimal, binary, octal, hex)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn match abelNumber "\<[-+]\=[0-9]\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn match abelNumber "\^d[0-9]\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn match abelNumber "\^b[01]\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn match abelNumber "\^o[0-7]\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn match abelNumber "\^h[0-9a-f]\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " special characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 " (define these after abelOperator so ?= overrides ?)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn match abelSpecialChar "[\[\](){},;:?]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 " operators
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn match abelLogicalOperator "[!#&$]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn match abelRangeOperator "\.\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match abelAlternateOperator "[/*+]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn match abelAlternateOperator ":[+*]:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn match abelArithmeticOperator "[-%]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match abelArithmeticOperator "<<"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn match abelArithmeticOperator ">>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match abelRelationalOperator "[<>!=]="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match abelRelationalOperator "[<>]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn match abelAssignmentOperator "[:?]\=="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn match abelAssignmentOperator "?:="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match abelTruthTableOperator "->"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 " signal extensions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match abelExtension "\.aclr\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn match abelExtension "\.aset\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn match abelExtension "\.clk\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn match abelExtension "\.clr\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn match abelExtension "\.com\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn match abelExtension "\.fb\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn match abelExtension "\.[co]e\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn match abelExtension "\.l[eh]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn match abelExtension "\.fc\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn match abelExtension "\.pin\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn match abelExtension "\.set\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn match abelExtension "\.[djksrtq]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn match abelExtension "\.pr\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn match abelExtension "\.re\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn match abelExtension "\.a[pr]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn match abelExtension "\.s[pr]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 " special constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn match abelConstant "\.[ckudfpxz]\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn match abelConstant "\.sv[2-9]\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 " one-line comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn region abelComment start=+"+ end=+"\|$+ contains=abelNumber,abelTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 " option to prevent C++ style comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 if !exists("abel_cpp_comments_illegal")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 syn region abelComment start=+//+ end=+$+ contains=abelNumber,abelTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 syn sync minlines=1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 " 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
125 if version >= 508 || !exists("did_abel_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 let did_abel_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 " The default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 HiLink abelHeader abelStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 HiLink abelSection abelStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 HiLink abelDeclaration abelStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 HiLink abelLogicalOperator abelOperator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 HiLink abelRangeOperator abelOperator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 HiLink abelAlternateOperator abelOperator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 HiLink abelArithmeticOperator abelOperator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 HiLink abelRelationalOperator abelOperator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 HiLink abelAssignmentOperator abelOperator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 HiLink abelTruthTableOperator abelOperator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 HiLink abelSpecifier abelStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 HiLink abelOperator abelStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 HiLink abelStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 HiLink abelIdentifier Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 HiLink abelTypeId abelType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 HiLink abelTypeIdChar abelType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 HiLink abelType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 HiLink abelNumber abelString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 HiLink abelString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 HiLink abelConstant Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 HiLink abelComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 HiLink abelExtension abelSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 HiLink abelSpecialChar abelSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 HiLink abelTypeIdEnd abelSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 HiLink abelSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 HiLink abelDirective PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 HiLink abelTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 HiLink abelError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 let b:current_syntax = "abel"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 " vim:ts=8