annotate runtime/syntax/pic.vim @ 6717:f242cf1f9897 v7.4.682

updated for version 7.4.682 Problem: The search highlighting and match highlighting replaces the cursorline highlighting, this doesn't look good. Solution: Combine the highlighting. (Yasuhiro Matsumoto)
author Bram Moolenaar <bram@vim.org>
date Tue, 24 Mar 2015 18:22:41 +0100
parents 3fc0f57ecb91
children 43efa4f5a8ea
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: PIC16F84 Assembler (Microchip's microcontroller)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Aleksandar Veselinovic <aleksa@cs.cmu.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2003 May 11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " URL: http://galeb.etf.bg.ac.yu/~alexa/vim/syntax/pic.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Revision: 1.01
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn keyword picTodo NOTE TODO XXX contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match picIdentifier "[a-z_$][a-z0-9_$]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match picLabel "^[A-Z_$][A-Z0-9_$]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match picLabel "^[A-Z_$][A-Z0-9_$]*:"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match picASCII "A\='.'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match picBinary "B'[0-1]\+'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match picDecimal "D'\d\+'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match picDecimal "\d\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match picHexadecimal "0x\x\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match picHexadecimal "H'\x\+'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match picHexadecimal "[0-9]\x*h"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match picOctal "O'[0-7]\o*'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match picComment ";.*" contains=picTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn region picString start=+"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword picRegister INDF TMR0 PCL STATUS FSR PORTA PORTB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword picRegister EEDATA EEADR PCLATH INTCON INDF OPTION_REG PCL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword picRegister FSR TRISA TRISB EECON1 EECON2 INTCON OPTION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " Register --- bits
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " STATUS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword picRegisterPart IRP RP1 RP0 TO PD Z DC C
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " PORTA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword picRegisterPart T0CKI
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match picRegisterPart "RA[0-4]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " PORTB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword picRegisterPart INT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match picRegisterPart "RB[0-7]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " INTCON
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword picRegisterPart GIE EEIE T0IE INTE RBIE T0IF INTF RBIF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " OPTION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword picRegisterPart RBPU INTEDG T0CS T0SE PSA PS2 PS1 PS0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 " EECON2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword picRegisterPart EEIF WRERR WREN WR RD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 " INTCON
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword picRegisterPart GIE EEIE T0IE INTE RBIE T0IF INTF RBIF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " OpCodes...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword picOpcode ADDWF ANDWF CLRF CLRW COMF DECF DECFSZ INCF INCFSZ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword picOpcode IORWF MOVF MOVWF NOP RLF RRF SUBWF SWAPF XORWF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword picOpcode BCF BSF BTFSC BTFSS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword picOpcode ADDLW ANDLW CALL CLRWDT GOTO IORLW MOVLW RETFIE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn keyword picOpcode RETLW RETURN SLEEP SUBLW XORLW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn keyword picOpcode GOTO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " Directives
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn keyword picDirective __BADRAM BANKISEL BANKSEL CBLOCK CODE __CONFIG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword picDirective CONSTANT DATA DB DE DT DW ELSE END ENDC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword picDirective ENDIF ENDM ENDW EQU ERROR ERRORLEVEL EXITM EXPAND
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword picDirective EXTERN FILL GLOBAL IDATA __IDLOCS IF IFDEF IFNDEF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn keyword picDirective INCLUDE LIST LOCAL MACRO __MAXRAM MESSG NOEXPAND
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn keyword picDirective NOLIST ORG PAGE PAGESEL PROCESSOR RADIX RES SET
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn keyword picDirective SPACE SUBTITLE TITLE UDATA UDATA_OVR UDATA_SHR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn keyword picDirective VARIABLE WHILE INCLUDE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn match picDirective "#\=UNDEFINE"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match picDirective "#\=INCLUDE"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn match picDirective "#\=DEFINE"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 if version >= 508 || !exists("did_pic16f84_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 let did_pic16f84_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 HiLink picTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 HiLink picComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 HiLink picDirective Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 HiLink picLabel Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 HiLink picString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 "HiLink picOpcode Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 "HiLink picRegister Structure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 "HiLink picRegisterPart Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 HiLink picASCII String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 HiLink picBinary Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 HiLink picDecimal Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 HiLink picHexadecimal Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 HiLink picOctal Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 HiLink picIdentifier Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 let b:current_syntax = "pic"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 " vim: ts=8