annotate runtime/syntax/abel.vim @ 17913:be8ab5bb74ce

Added tag v8.1.1952 for changeset 9fac6d0de69a37d9e0940ebb3bc7623c2ddee042
author Bram Moolenaar <Bram@vim.org>
date Sat, 31 Aug 2019 19:15:04 +0200
parents 46763b01cd9a
children 11b656e74444
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
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
3 " Maintainer: John Cook <johncook3@gmail.com>
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 " Last Change: 2011 Dec 27
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
11 let s:cpo_save = &cpo
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
12 set cpo&vim
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
13
7
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.
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 let b:current_syntax = "abel"
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
157
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
158 let &cpo = s:cpo_save
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
159 unlet s:cpo_save
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
160
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 " vim:ts=8