Mercurial > vim
annotate runtime/syntax/abel.vim @ 13663:137429f3fdd2
Added tag v8.0.1703 for changeset 5eac31544dd0f500ddf9b5ef6410443e803d307c
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 12 Apr 2018 20:45:08 +0200 |
parents | 46763b01cd9a |
children | 11b656e74444 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: ABEL | |
3237 | 3 " Maintainer: John Cook <johncook3@gmail.com> |
4 " Last Change: 2011 Dec 27 | |
7 | 5 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
6 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
7 if exists("b:current_syntax") |
7 | 8 finish |
9 endif | |
10 | |
3237 | 11 let s:cpo_save = &cpo |
12 set cpo&vim | |
13 | |
7 | 14 " this language is oblivious to case |
15 syn case ignore | |
16 | |
17 " A bunch of keywords | |
18 syn keyword abelHeader module title device options | |
19 syn keyword abelSection declarations equations test_vectors end | |
20 syn keyword abelDeclaration state truth_table state_diagram property | |
21 syn keyword abelType pin node attribute constant macro library | |
22 | |
23 syn keyword abelTypeId com reg neg pos buffer dc reg_d reg_t contained | |
24 syn keyword abelTypeId reg_sr reg_jk reg_g retain xor invert contained | |
25 | |
26 syn keyword abelStatement when then else if with endwith case endcase | |
27 syn keyword abelStatement fuses expr trace | |
28 | |
29 " option to omit obsolete statements | |
30 if exists("abel_obsolete_ok") | |
31 syn keyword abelStatement enable flag in | |
32 else | |
33 syn keyword abelError enable flag in | |
34 endif | |
35 | |
36 " directives | |
37 syn match abelDirective "@alternate" | |
38 syn match abelDirective "@standard" | |
39 syn match abelDirective "@const" | |
40 syn match abelDirective "@dcset" | |
41 syn match abelDirective "@include" | |
42 syn match abelDirective "@page" | |
43 syn match abelDirective "@radix" | |
44 syn match abelDirective "@repeat" | |
45 syn match abelDirective "@irp" | |
46 syn match abelDirective "@expr" | |
47 syn match abelDirective "@if" | |
48 syn match abelDirective "@ifb" | |
49 syn match abelDirective "@ifnb" | |
50 syn match abelDirective "@ifdef" | |
51 syn match abelDirective "@ifndef" | |
52 syn match abelDirective "@ifiden" | |
53 syn match abelDirective "@ifniden" | |
54 | |
55 syn keyword abelTodo contained TODO XXX FIXME | |
56 | |
57 " wrap up type identifiers to differentiate them from normal strings | |
58 syn region abelSpecifier start='istype' end=';' contains=abelTypeIdChar,abelTypeId,abelTypeIdEnd keepend | |
59 syn match abelTypeIdChar "[,']" contained | |
60 syn match abelTypeIdEnd ";" contained | |
61 | |
62 " string contstants and special characters within them | |
63 syn match abelSpecial contained "\\['\\]" | |
64 syn region abelString start=+'+ skip=+\\"+ end=+'+ contains=abelSpecial | |
65 | |
66 " valid integer number formats (decimal, binary, octal, hex) | |
67 syn match abelNumber "\<[-+]\=[0-9]\+\>" | |
68 syn match abelNumber "\^d[0-9]\+\>" | |
69 syn match abelNumber "\^b[01]\+\>" | |
70 syn match abelNumber "\^o[0-7]\+\>" | |
71 syn match abelNumber "\^h[0-9a-f]\+\>" | |
72 | |
73 " special characters | |
74 " (define these after abelOperator so ?= overrides ?) | |
75 syn match abelSpecialChar "[\[\](){},;:?]" | |
76 | |
77 " operators | |
78 syn match abelLogicalOperator "[!#&$]" | |
79 syn match abelRangeOperator "\.\." | |
80 syn match abelAlternateOperator "[/*+]" | |
81 syn match abelAlternateOperator ":[+*]:" | |
82 syn match abelArithmeticOperator "[-%]" | |
83 syn match abelArithmeticOperator "<<" | |
84 syn match abelArithmeticOperator ">>" | |
85 syn match abelRelationalOperator "[<>!=]=" | |
86 syn match abelRelationalOperator "[<>]" | |
87 syn match abelAssignmentOperator "[:?]\==" | |
88 syn match abelAssignmentOperator "?:=" | |
89 syn match abelTruthTableOperator "->" | |
90 | |
91 " signal extensions | |
92 syn match abelExtension "\.aclr\>" | |
93 syn match abelExtension "\.aset\>" | |
94 syn match abelExtension "\.clk\>" | |
95 syn match abelExtension "\.clr\>" | |
96 syn match abelExtension "\.com\>" | |
97 syn match abelExtension "\.fb\>" | |
98 syn match abelExtension "\.[co]e\>" | |
99 syn match abelExtension "\.l[eh]\>" | |
100 syn match abelExtension "\.fc\>" | |
101 syn match abelExtension "\.pin\>" | |
102 syn match abelExtension "\.set\>" | |
103 syn match abelExtension "\.[djksrtq]\>" | |
104 syn match abelExtension "\.pr\>" | |
105 syn match abelExtension "\.re\>" | |
106 syn match abelExtension "\.a[pr]\>" | |
107 syn match abelExtension "\.s[pr]\>" | |
108 | |
109 " special constants | |
110 syn match abelConstant "\.[ckudfpxz]\." | |
111 syn match abelConstant "\.sv[2-9]\." | |
112 | |
113 " one-line comments | |
114 syn region abelComment start=+"+ end=+"\|$+ contains=abelNumber,abelTodo | |
115 " option to prevent C++ style comments | |
116 if !exists("abel_cpp_comments_illegal") | |
117 syn region abelComment start=+//+ end=+$+ contains=abelNumber,abelTodo | |
118 endif | |
119 | |
120 syn sync minlines=1 | |
121 | |
122 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
123 " Only when an item doesn't have highlighting yet |
7 | 124 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
125 " The default highlighting. |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
126 hi def link abelHeader abelStatement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
127 hi def link abelSection abelStatement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
128 hi def link abelDeclaration abelStatement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
129 hi def link abelLogicalOperator abelOperator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
130 hi def link abelRangeOperator abelOperator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
131 hi def link abelAlternateOperator abelOperator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
132 hi def link abelArithmeticOperator abelOperator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
133 hi def link abelRelationalOperator abelOperator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
134 hi def link abelAssignmentOperator abelOperator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
135 hi def link abelTruthTableOperator abelOperator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
136 hi def link abelSpecifier abelStatement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
137 hi def link abelOperator abelStatement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
138 hi def link abelStatement Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
139 hi def link abelIdentifier Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
140 hi def link abelTypeId abelType |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
141 hi def link abelTypeIdChar abelType |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
142 hi def link abelType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
143 hi def link abelNumber abelString |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
144 hi def link abelString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
145 hi def link abelConstant Constant |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
146 hi def link abelComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
147 hi def link abelExtension abelSpecial |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
148 hi def link abelSpecialChar abelSpecial |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
149 hi def link abelTypeIdEnd abelSpecial |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
150 hi def link abelSpecial Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
151 hi def link abelDirective PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
152 hi def link abelTodo Todo |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
153 hi def link abelError Error |
7 | 154 |
155 | |
156 let b:current_syntax = "abel" | |
3237 | 157 |
158 let &cpo = s:cpo_save | |
159 unlet s:cpo_save | |
160 | |
7 | 161 " vim:ts=8 |