annotate runtime/syntax/pic.vim @ 13908:b7ca1a8db3e8 v8.0.1825

patch 8.0.1825: might use NULL pointer when out of memory commit https://github.com/vim/vim/commit/dd1d7be4e6691f447667a8217844a3b2561203be Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 12 21:34:58 2018 +0200 patch 8.0.1825: might use NULL pointer when out of memory Problem: Might use NULL pointer when out of memory. (Coverity) Solution: Handle NULL pointer better.
author Christian Brabandt <cb@256bit.org>
date Sat, 12 May 2018 21:45:05 +0200
parents 46763b01cd9a
children
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
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
8 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
9 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syn keyword picTodo NOTE TODO XXX contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn match picIdentifier "[a-z_$][a-z0-9_$]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn match picLabel "^[A-Z_$][A-Z0-9_$]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match picLabel "^[A-Z_$][A-Z0-9_$]*:"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match picASCII "A\='.'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match picBinary "B'[0-1]\+'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match picDecimal "D'\d\+'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match picDecimal "\d\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match picHexadecimal "0x\x\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match picHexadecimal "H'\x\+'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match picHexadecimal "[0-9]\x*h"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match picOctal "O'[0-7]\o*'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match picComment ";.*" contains=picTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn region picString start=+"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword picRegister INDF TMR0 PCL STATUS FSR PORTA PORTB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword picRegister EEDATA EEADR PCLATH INTCON INDF OPTION_REG PCL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword picRegister FSR TRISA TRISB EECON1 EECON2 INTCON OPTION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " Register --- bits
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " STATUS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword picRegisterPart IRP RP1 RP0 TO PD Z DC C
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " PORTA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword picRegisterPart T0CKI
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match picRegisterPart "RA[0-4]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " PORTB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword picRegisterPart INT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match picRegisterPart "RB[0-7]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " INTCON
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword picRegisterPart GIE EEIE T0IE INTE RBIE T0IF INTF RBIF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " OPTION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword picRegisterPart RBPU INTEDG T0CS T0SE PSA PS2 PS1 PS0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " EECON2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword picRegisterPart EEIF WRERR WREN WR RD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 " INTCON
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword picRegisterPart GIE EEIE T0IE INTE RBIE T0IF INTF RBIF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " OpCodes...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword picOpcode ADDWF ANDWF CLRF CLRW COMF DECF DECFSZ INCF INCFSZ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword picOpcode IORWF MOVF MOVWF NOP RLF RRF SUBWF SWAPF XORWF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn keyword picOpcode BCF BSF BTFSC BTFSS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword picOpcode ADDLW ANDLW CALL CLRWDT GOTO IORLW MOVLW RETFIE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword picOpcode RETLW RETURN SLEEP SUBLW XORLW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword picOpcode GOTO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " Directives
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword picDirective __BADRAM BANKISEL BANKSEL CBLOCK CODE __CONFIG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn keyword picDirective CONSTANT DATA DB DE DT DW ELSE END ENDC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn keyword picDirective ENDIF ENDM ENDW EQU ERROR ERRORLEVEL EXITM EXPAND
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn keyword picDirective EXTERN FILL GLOBAL IDATA __IDLOCS IF IFDEF IFNDEF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword picDirective INCLUDE LIST LOCAL MACRO __MAXRAM MESSG NOEXPAND
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword picDirective NOLIST ORG PAGE PAGESEL PROCESSOR RADIX RES SET
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword picDirective SPACE SUBTITLE TITLE UDATA UDATA_OVR UDATA_SHR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn keyword picDirective VARIABLE WHILE INCLUDE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match picDirective "#\=UNDEFINE"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match picDirective "#\=INCLUDE"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn match picDirective "#\=DEFINE"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
91 " Only when an item doesn't have highlighting yet
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
92
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
93 hi def link picTodo Todo
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
94 hi def link picComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
95 hi def link picDirective Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
96 hi def link picLabel Label
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
97 hi def link picString String
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
99 "hi def link picOpcode Keyword
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
100 "hi def link picRegister Structure
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
101 "hi def link picRegisterPart Special
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
103 hi def link picASCII String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
104 hi def link picBinary Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
105 hi def link picDecimal Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
106 hi def link picHexadecimal Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
107 hi def link picOctal Number
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
109 hi def link picIdentifier Identifier
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 let b:current_syntax = "pic"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 " vim: ts=8