annotate runtime/syntax/avra.vim @ 8962:b4be6f6610a0

commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 21 18:01:28 2016 +0200 updated runtime files. Add avra syntax.
author Christian Brabandt <cb@256bit.org>
date Thu, 21 Apr 2016 18:15:05 +0200
parents
children bdd7fc1a38c0
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
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 " Maintainer: Marius Ghita <mhitza@gmail.com>
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 let s:cpo_save = &cpo
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 set cpo&vim
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 setlocal iskeyword=a-z,A-Z,48-57,.,_
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 " 'isident' is a global option, better not set it
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 " setlocal isident=a-z,A-Z,48-57,.,_
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 syn case ignore
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 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
16 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
17 syn keyword avraRegister r28 r29 r30 r31
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 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
20 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
21 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
22 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
23 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
24 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
25 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
26 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
27 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
28 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
29
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 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
31 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
32 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
33 syn keyword avraDirective .elif .elseif .warning
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 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
36
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 syn match avraNumericOperator "[-*/+]"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 syn match avraUnaryOperator "!"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 syn match avraBinaryOperator "<<\|>>\|<\|<=\|>\|>=\|==\|!="
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 syn match avraBitwiseOperator "[~&^|]\|&&\|||"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42 syn match avraBinaryNumber "\<0[bB][0-1]*\>"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 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
44 syn match avraDecNumber "\<\(0\|[1-9]\d*\)\>"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46 syn region avraComment start=";" end="$"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 syn region avraString start="\"" end="\"\|$"
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 syn match avraLabel "^\s*[^; \t]\+:"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51 hi def link avraBinaryNumber avraNumber
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52 hi def link avraHexNumber avraNumber
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53 hi def link avraDecNumber avraNumber
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55 hi def link avraNumericOperator avraOperator
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56 hi def link avraUnaryOperator avraOperator
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57 hi def link avraBinaryOperator avraOperator
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58 hi def link avraBitwiseOperator avraOperator
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 hi def link avraOperator operator
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62 hi def link avraComment comment
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63 hi def link avraDirective preproc
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64 hi def link avraRegister type
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
65 hi def link avraNumber constant
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66 hi def link avraString String
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67 hi def link avraInstr keyword
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68 hi def link avraLabel label
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 b:current_syntax = "avra"
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
71
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
72 let &cpo = s:cpo_save
b4be6f6610a0 commit https://github.com/vim/vim/commit/0c1ff16b5467f97ce08134fdbc8198127bbe492a
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
73 unlet s:cpo_save