Mercurial > vim
annotate runtime/syntax/a65.vim @ 12067:8b7edea4be26
Added tag v8.0.0913 for changeset 8ad282dee649aa17159e591f75743aed0272bb7b
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 12 Aug 2017 15:00:05 +0200 |
parents | 46763b01cd9a |
children | d46f974fd69e |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: xa 6502 cross assembler | |
5577 | 3 " Maintainer: Clemens Kirchgatterer <clemens@1541.org> |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
4 " Last Change: 2016 Aug 31 |
7 | 5 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5577
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:
5577
diff
changeset
|
7 if exists("b:current_syntax") |
7 | 8 finish |
9 endif | |
10 | |
11 syn case ignore | |
12 | |
13 " Opcodes | |
14 syn match a65Opcode "\<PHP\($\|\s\)" nextgroup=a65Address | |
15 syn match a65Opcode "\<PLA\($\|\s\)" nextgroup=a65Address | |
16 syn match a65Opcode "\<PLX\($\|\s\)" nextgroup=a65Address | |
17 syn match a65Opcode "\<PLY\($\|\s\)" nextgroup=a65Address | |
18 syn match a65Opcode "\<SEC\($\|\s\)" nextgroup=a65Address | |
19 syn match a65Opcode "\<CLD\($\|\s\)" nextgroup=a65Address | |
20 syn match a65Opcode "\<SED\($\|\s\)" nextgroup=a65Address | |
21 syn match a65Opcode "\<CLI\($\|\s\)" nextgroup=a65Address | |
22 syn match a65Opcode "\<BVC\($\|\s\)" nextgroup=a65Address | |
23 syn match a65Opcode "\<BVS\($\|\s\)" nextgroup=a65Address | |
24 syn match a65Opcode "\<BCS\($\|\s\)" nextgroup=a65Address | |
25 syn match a65Opcode "\<BCC\($\|\s\)" nextgroup=a65Address | |
26 syn match a65Opcode "\<DEY\($\|\s\)" nextgroup=a65Address | |
27 syn match a65Opcode "\<DEC\($\|\s\)" nextgroup=a65Address | |
28 syn match a65Opcode "\<CMP\($\|\s\)" nextgroup=a65Address | |
29 syn match a65Opcode "\<CPX\($\|\s\)" nextgroup=a65Address | |
30 syn match a65Opcode "\<BIT\($\|\s\)" nextgroup=a65Address | |
31 syn match a65Opcode "\<ROL\($\|\s\)" nextgroup=a65Address | |
32 syn match a65Opcode "\<ROR\($\|\s\)" nextgroup=a65Address | |
33 syn match a65Opcode "\<ASL\($\|\s\)" nextgroup=a65Address | |
34 syn match a65Opcode "\<TXA\($\|\s\)" nextgroup=a65Address | |
35 syn match a65Opcode "\<TYA\($\|\s\)" nextgroup=a65Address | |
36 syn match a65Opcode "\<TSX\($\|\s\)" nextgroup=a65Address | |
37 syn match a65Opcode "\<TXS\($\|\s\)" nextgroup=a65Address | |
38 syn match a65Opcode "\<LDA\($\|\s\)" nextgroup=a65Address | |
39 syn match a65Opcode "\<LDX\($\|\s\)" nextgroup=a65Address | |
40 syn match a65Opcode "\<LDY\($\|\s\)" nextgroup=a65Address | |
41 syn match a65Opcode "\<STA\($\|\s\)" nextgroup=a65Address | |
42 syn match a65Opcode "\<PLP\($\|\s\)" nextgroup=a65Address | |
43 syn match a65Opcode "\<BRK\($\|\s\)" nextgroup=a65Address | |
44 syn match a65Opcode "\<RTI\($\|\s\)" nextgroup=a65Address | |
45 syn match a65Opcode "\<NOP\($\|\s\)" nextgroup=a65Address | |
46 syn match a65Opcode "\<SEI\($\|\s\)" nextgroup=a65Address | |
47 syn match a65Opcode "\<CLV\($\|\s\)" nextgroup=a65Address | |
48 syn match a65Opcode "\<PHA\($\|\s\)" nextgroup=a65Address | |
49 syn match a65Opcode "\<PHX\($\|\s\)" nextgroup=a65Address | |
50 syn match a65Opcode "\<BRA\($\|\s\)" nextgroup=a65Address | |
51 syn match a65Opcode "\<JMP\($\|\s\)" nextgroup=a65Address | |
52 syn match a65Opcode "\<JSR\($\|\s\)" nextgroup=a65Address | |
53 syn match a65Opcode "\<RTS\($\|\s\)" nextgroup=a65Address | |
54 syn match a65Opcode "\<CPY\($\|\s\)" nextgroup=a65Address | |
55 syn match a65Opcode "\<BNE\($\|\s\)" nextgroup=a65Address | |
56 syn match a65Opcode "\<BEQ\($\|\s\)" nextgroup=a65Address | |
57 syn match a65Opcode "\<BMI\($\|\s\)" nextgroup=a65Address | |
58 syn match a65Opcode "\<LSR\($\|\s\)" nextgroup=a65Address | |
59 syn match a65Opcode "\<INX\($\|\s\)" nextgroup=a65Address | |
60 syn match a65Opcode "\<INY\($\|\s\)" nextgroup=a65Address | |
61 syn match a65Opcode "\<INC\($\|\s\)" nextgroup=a65Address | |
62 syn match a65Opcode "\<ADC\($\|\s\)" nextgroup=a65Address | |
63 syn match a65Opcode "\<SBC\($\|\s\)" nextgroup=a65Address | |
64 syn match a65Opcode "\<AND\($\|\s\)" nextgroup=a65Address | |
65 syn match a65Opcode "\<ORA\($\|\s\)" nextgroup=a65Address | |
66 syn match a65Opcode "\<STX\($\|\s\)" nextgroup=a65Address | |
67 syn match a65Opcode "\<STY\($\|\s\)" nextgroup=a65Address | |
68 syn match a65Opcode "\<STZ\($\|\s\)" nextgroup=a65Address | |
69 syn match a65Opcode "\<EOR\($\|\s\)" nextgroup=a65Address | |
70 syn match a65Opcode "\<DEX\($\|\s\)" nextgroup=a65Address | |
71 syn match a65Opcode "\<BPL\($\|\s\)" nextgroup=a65Address | |
72 syn match a65Opcode "\<CLC\($\|\s\)" nextgroup=a65Address | |
73 syn match a65Opcode "\<PHY\($\|\s\)" nextgroup=a65Address | |
74 syn match a65Opcode "\<TRB\($\|\s\)" nextgroup=a65Address | |
75 syn match a65Opcode "\<BBR\($\|\s\)" nextgroup=a65Address | |
76 syn match a65Opcode "\<BBS\($\|\s\)" nextgroup=a65Address | |
77 syn match a65Opcode "\<RMB\($\|\s\)" nextgroup=a65Address | |
78 syn match a65Opcode "\<SMB\($\|\s\)" nextgroup=a65Address | |
79 syn match a65Opcode "\<TAY\($\|\s\)" nextgroup=a65Address | |
80 syn match a65Opcode "\<TAX\($\|\s\)" nextgroup=a65Address | |
81 | |
82 " Addresses | |
83 syn match a65Address "\s*!\=$[0-9A-F]\{2}\($\|\s\)" | |
84 syn match a65Address "\s*!\=$[0-9A-F]\{4}\($\|\s\)" | |
85 syn match a65Address "\s*!\=$[0-9A-F]\{2},X\($\|\s\)" | |
86 syn match a65Address "\s*!\=$[0-9A-F]\{4},X\($\|\s\)" | |
87 syn match a65Address "\s*!\=$[0-9A-F]\{2},Y\($\|\s\)" | |
88 syn match a65Address "\s*!\=$[0-9A-F]\{4},Y\($\|\s\)" | |
89 syn match a65Address "\s*($[0-9A-F]\{2})\($\|\s\)" | |
90 syn match a65Address "\s*($[0-9A-F]\{4})\($\|\s\)" | |
91 syn match a65Address "\s*($[0-9A-F]\{2},X)\($\|\s\)" | |
92 syn match a65Address "\s*($[0-9A-F]\{2}),Y\($\|\s\)" | |
93 | |
94 " Numbers | |
95 syn match a65Number "#\=[0-9]*\>" | |
96 syn match a65Number "#\=$[0-9A-F]*\>" | |
97 syn match a65Number "#\=&[0-7]*\>" | |
98 syn match a65Number "#\=%[01]*\>" | |
99 | |
100 syn case match | |
101 | |
102 " Types | |
103 syn match a65Type "\(^\|\s\)\.byt\($\|\s\)" | |
104 syn match a65Type "\(^\|\s\)\.word\($\|\s\)" | |
105 syn match a65Type "\(^\|\s\)\.asc\($\|\s\)" | |
106 syn match a65Type "\(^\|\s\)\.dsb\($\|\s\)" | |
107 syn match a65Type "\(^\|\s\)\.fopt\($\|\s\)" | |
108 syn match a65Type "\(^\|\s\)\.text\($\|\s\)" | |
109 syn match a65Type "\(^\|\s\)\.data\($\|\s\)" | |
110 syn match a65Type "\(^\|\s\)\.bss\($\|\s\)" | |
111 syn match a65Type "\(^\|\s\)\.zero\($\|\s\)" | |
112 syn match a65Type "\(^\|\s\)\.align\($\|\s\)" | |
113 | |
114 " Blocks | |
115 syn match a65Section "\(^\|\s\)\.(\($\|\s\)" | |
116 syn match a65Section "\(^\|\s\)\.)\($\|\s\)" | |
117 | |
118 " Strings | |
119 syn match a65String "\".*\"" | |
120 | |
121 " Programm Counter | |
122 syn region a65PC start="\*=" end="\>" keepend | |
123 | |
124 " HI/LO Byte | |
125 syn region a65HiLo start="#[<>]" end="$\|\s" contains=a65Comment keepend | |
126 | |
127 " Comments | |
128 syn keyword a65Todo TODO XXX FIXME BUG contained | |
129 syn match a65Comment ";.*"hs=s+1 contains=a65Todo | |
130 syn region a65Comment start="/\*" end="\*/" contains=a65Todo,a65Comment | |
131 | |
132 " Preprocessor | |
133 syn region a65PreProc start="^#" end="$" contains=a65Comment,a65Continue | |
134 syn match a65End excludenl /end$/ contained | |
135 syn match a65Continue "\\$" contained | |
136 | |
137 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5577
diff
changeset
|
138 " Only when an item doesn't have highlighting yet |
7 | 139 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
140 hi def link a65Section Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
141 hi def link a65Address Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
142 hi def link a65Comment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
143 hi def link a65PreProc PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
144 hi def link a65Number Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
145 hi def link a65String String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
146 hi def link a65Type Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
147 hi def link a65Opcode Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
148 hi def link a65PC Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
149 hi def link a65Todo Todo |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
150 hi def link a65HiLo Number |
7 | 151 |
152 | |
153 let b:current_syntax = "a65" |