annotate runtime/syntax/avra.vim @ 21145:9761ed6ea124

Added tag v8.2.1123 for changeset adae19565eea88ff6a898aa8a9cf5a51c92f4c22
author Bram Moolenaar <Bram@vim.org>
date Fri, 03 Jul 2020 21:30:04 +0200
parents bdd7fc1a38c0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8962
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Vim syntax file
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " Language: AVR Assembler (AVRA)
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " AVRA Home: http://avra.sourceforge.net/index.html
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 " AVRA Version: 1.3.0
10261
bdd7fc1a38c0 commit https://github.com/vim/vim/commit/dc08328821a2c11e33dfb1980332e4923ec64fca
Christian Brabandt <cb@256bit.org>
parents: 8962
diff changeset
5 " Last Update: 2016 Oct 7
8962
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 " Maintainer: Marius Ghita <mhitza@gmail.com>
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 let s:cpo_save = &cpo
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 set cpo&vim
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 syn case ignore
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 syn keyword avraRegister r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 syn keyword avraRegister r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 syn keyword avraRegister r28 r29 r30 r31
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 syn keyword avraInstr add adc adiw sub subi sbc sbci sbiw and andi or ori eor
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 syn keyword avraInstr com neg sbr cbr inc dec tst clr ser mul muls mulsu fmul
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 syn keyword avraInstr fmuls fmulsu des rjmp ijmp eijmp jmp rcall icall eicall
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 syn keyword avraInstr call ret reti cpse cp cpc cpi sbrc sbrs sbic sbis brbs
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 syn keyword avraInstr brbc breq brne brcs brcc brsh brlo brmi brpl brge brlt
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 syn keyword avraInstr brhs brhc brts brtc brvs brvc brie brid mov movw ldi lds
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 syn keyword avraInstr ld ldd sts st std lpm elpm spm in out push pop xch las
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 syn keyword avraInstr lac lat lsl lsr rol ror asr swap bset bclr sbi cbi bst bld
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 syn keyword avraInstr sec clc sen cln sez clz sei cli ses cls sev clv set clt
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 syn keyword avraInstr seh clh break nop sleep wdr
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 syn keyword avraDirective .byte .cseg .db .def .device .dseg .dw .endmacro .equ
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 syn keyword avraDirective .eseg .exit .include .list .listmac .macro .nolist
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 syn keyword avraDirective .org .set .define .undef .ifdef .ifndef .if .else
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 syn keyword avraDirective .elif .elseif .warning
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 syn keyword avraOperator low high byte2 byte3 byte4 lwrd hwrd page exp2 log2
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 syn match avraNumericOperator "[-*/+]"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 syn match avraUnaryOperator "!"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 syn match avraBinaryOperator "<<\|>>\|<\|<=\|>\|>=\|==\|!="
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 syn match avraBitwiseOperator "[~&^|]\|&&\|||"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 syn match avraBinaryNumber "\<0[bB][0-1]*\>"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 syn match avraHexNumber "\<0[xX][0-9a-fA-F]\+\>"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42 syn match avraDecNumber "\<\(0\|[1-9]\d*\)\>"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 syn region avraComment start=";" end="$"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45 syn region avraString start="\"" end="\"\|$"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 syn match avraLabel "^\s*[^; \t]\+:"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49 hi def link avraBinaryNumber avraNumber
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50 hi def link avraHexNumber avraNumber
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51 hi def link avraDecNumber avraNumber
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53 hi def link avraNumericOperator avraOperator
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54 hi def link avraUnaryOperator avraOperator
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55 hi def link avraBinaryOperator avraOperator
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56 hi def link avraBitwiseOperator avraOperator
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59 hi def link avraOperator operator
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 hi def link avraComment comment
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 hi def link avraDirective preproc
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62 hi def link avraRegister type
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63 hi def link avraNumber constant
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64 hi def link avraString String
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
65 hi def link avraInstr keyword
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66 hi def link avraLabel label
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68 let b:current_syntax = "avra"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
69
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
70 let &cpo = s:cpo_save
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
71 unlet s:cpo_save