Mercurial > vim
annotate runtime/syntax/cupl.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | 91e53bcb7946 |
children | 46763b01cd9a |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: CUPL | |
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 cuplHeader name partno date revision rev designer company nextgroup=cuplHeaderContents | |
19 syn keyword cuplHeader assembly assy location device nextgroup=cuplHeaderContents | |
20 | |
21 syn keyword cuplTodo contained TODO XXX FIXME | |
22 | |
23 " cuplHeaderContents uses default highlighting except for numbers | |
24 syn match cuplHeaderContents ".\+;"me=e-1 contains=cuplNumber contained | |
25 | |
26 " String contstants | |
27 syn region cuplString start=+'+ end=+'+ | |
28 syn region cuplString start=+"+ end=+"+ | |
29 | |
30 syn keyword cuplStatement append condition | |
31 syn keyword cuplStatement default else | |
32 syn keyword cuplStatement field fld format function fuse | |
33 syn keyword cuplStatement group if jump loc | |
34 syn keyword cuplStatement macro min node out | |
35 syn keyword cuplStatement pin pinnode present table | |
36 syn keyword cuplStatement sequence sequenced sequencejk sequencers sequencet | |
37 | |
38 syn keyword cuplFunction log2 log8 log16 log | |
39 | |
40 " Valid integer number formats (decimal, binary, octal, hex) | |
41 syn match cuplNumber "\<[-+]\=[0-9]\+\>" | |
42 syn match cuplNumber "'d'[0-9]\+\>" | |
43 syn match cuplNumber "'b'[01x]\+\>" | |
44 syn match cuplNumber "'o'[0-7x]\+\>" | |
45 syn match cuplNumber "'h'[0-9a-fx]\+\>" | |
46 | |
47 " operators | |
48 syn match cuplLogicalOperator "[!#&$]" | |
49 syn match cuplArithmeticOperator "[-+*/%]" | |
50 syn match cuplArithmeticOperator "\*\*" | |
51 syn match cuplAssignmentOperator ":\==" | |
52 syn match cuplEqualityOperator ":" | |
53 syn match cuplTruthTableOperator "=>" | |
54 | |
55 " Signal extensions | |
56 syn match cuplExtension "\.[as][pr]\>" | |
57 syn match cuplExtension "\.oe\>" | |
58 syn match cuplExtension "\.oemux\>" | |
59 syn match cuplExtension "\.[dlsrjk]\>" | |
60 syn match cuplExtension "\.ck\>" | |
61 syn match cuplExtension "\.dq\>" | |
62 syn match cuplExtension "\.ckmux\>" | |
63 syn match cuplExtension "\.tec\>" | |
64 syn match cuplExtension "\.cnt\>" | |
65 | |
66 syn match cuplRangeOperator "\.\." contained | |
67 | |
68 " match ranges like memadr:[0000..1FFF] | |
69 " and highlight both the numbers and the .. operator | |
70 syn match cuplNumberRange "\<\x\+\.\.\x\+\>" contains=cuplRangeOperator | |
71 | |
72 " match vectors of type [name3..0] (decimal numbers only) | |
73 " but assign them no special highlighting except for the .. operator | |
74 syn match cuplBitVector "\<\a\+\d\+\.\.\d\+\>" contains=cuplRangeOperator | |
75 | |
76 " other special characters | |
77 syn match cuplSpecialChar "[\[\](){},;]" | |
78 | |
79 " directives | |
80 " (define these after cuplOperator so $xxx overrides $) | |
81 syn match cuplDirective "\$msg" | |
82 syn match cuplDirective "\$macro" | |
83 syn match cuplDirective "\$mend" | |
84 syn match cuplDirective "\$repeat" | |
85 syn match cuplDirective "\$repend" | |
86 syn match cuplDirective "\$define" | |
87 syn match cuplDirective "\$include" | |
88 | |
89 " multi-line comments | |
90 syn region cuplComment start=+/\*+ end=+\*/+ contains=cuplNumber,cuplTodo | |
91 | |
92 syn sync minlines=1 | |
93 | |
94 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
95 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
96 command -nargs=+ HiLink hi def link <args> |
7 | 97 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
98 " The default highlighting. |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
99 HiLink cuplHeader cuplStatement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
100 HiLink cuplLogicalOperator cuplOperator |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
101 HiLink cuplRangeOperator cuplOperator |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
102 HiLink cuplArithmeticOperator cuplOperator |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
103 HiLink cuplAssignmentOperator cuplOperator |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
104 HiLink cuplEqualityOperator cuplOperator |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
105 HiLink cuplTruthTableOperator cuplOperator |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
106 HiLink cuplOperator cuplStatement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
107 HiLink cuplFunction cuplStatement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
108 HiLink cuplStatement Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
109 HiLink cuplNumberRange cuplNumber |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
110 HiLink cuplNumber cuplString |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
111 HiLink cuplString String |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
112 HiLink cuplComment Comment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
113 HiLink cuplExtension cuplSpecial |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
114 HiLink cuplSpecialChar cuplSpecial |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
115 HiLink cuplSpecial Special |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
116 HiLink cuplDirective PreProc |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
117 HiLink cuplTodo Todo |
7 | 118 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
119 delcommand HiLink |
7 | 120 |
121 let b:current_syntax = "cupl" | |
3237 | 122 |
123 let &cpo = s:cpo_save | |
124 unlet s:cpo_save | |
125 | |
7 | 126 " vim:ts=8 |