Mercurial > vim
annotate runtime/syntax/abap.vim @ 13899:a22bfa7581f2
Added tag v8.0.1820 for changeset ea0e6c71ba51acdc5f108f10c44b97fc8b231087
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 12 May 2018 17:45:06 +0200 |
parents | 46763b01cd9a |
children | 8b334e4cb97f |
rev | line source |
---|---|
22 | 1 " Vim ABAP syntax file |
828 | 2 " Language: SAP - ABAP/R4 |
3920 | 3 " Revision: 2.1 |
3893 | 4 " Maintainer: Marius Piedallu van Wyk <lailoken@gmail.com> |
4911 | 5 " Last Change: 2013 Jun 13 |
3893 | 6 " Comment: Thanks to EPI-USE Labs for all your assistance. :) |
22 | 7 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4911
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:
4911
diff
changeset
|
9 if exists("b:current_syntax") |
22 | 10 finish |
11 endif | |
12 | |
13 " Always ignore case | |
14 syn case ignore | |
15 | |
3920 | 16 " Symbol Operators (space delimited) |
3893 | 17 syn match abapSymbolOperator "\W+\W" |
18 syn match abapSymbolOperator "\W-\W" | |
19 syn match abapSymbolOperator "\W/\W" | |
20 syn match abapSymbolOperator "\W%\W" | |
21 syn match abapSymbolOperator "\W=\W" | |
22 syn match abapSymbolOperator "\W<\W" | |
23 syn match abapSymbolOperator "\W>\W" | |
24 syn match abapSymbolOperator "\W\*\W" | |
25 syn match abapSymbolOperator "\W[<>]=\W" | |
26 syn match abapSymbolOperator "\W<>\W" | |
27 syn match abapSymbolOperator "\W\*\*\W" | |
28 syn match abapSymbolOperator "\[\]" | |
29 syn match abapSymbolOperator "->\*\?" | |
30 syn match abapSymbolOperator "=>" | |
31 syn match abapSymbolOperator "[()~:,\.&$]" | |
22 | 32 |
33 " Literals | |
3893 | 34 syn region abapCharString matchgroup=abapCharString start="'" end="'" contains=abapCharStringEscape |
35 syn match abapCharStringEscape contained "''" | |
22 | 36 |
3893 | 37 syn region abapString matchgroup=abapString start="`" end="`" contains=abapStringEscape |
38 syn match abapStringEscape contained "``" | |
39 | |
40 syn match abapNumber "\-\=\<\d\+\>" | |
22 | 41 syn region abapHex matchgroup=abapHex start="X'" end="'" |
42 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4911
diff
changeset
|
43 setlocal iskeyword=48-57,_,A-Z,a-z,/ |
22 | 44 |
3920 | 45 syn match abapNamespace "\</\w\+/" |
3893 | 46 |
47 " multi-word statements | |
3920 | 48 syn match abapComplexStatement "\<\(WITH\W\+\(HEADER\W\+LINE\|FRAME\|KEY\)\|WITH\)\>" |
49 syn match abapComplexStatement "\<NO\W\+STANDARD\W\+PAGE\W\+HEADING\>" | |
50 syn match abapComplexStatement "\<\(EXIT\W\+FROM\W\+STEP\W\+LOOP\|EXIT\)\>" | |
51 syn match abapComplexStatement "\<\(BEGIN\W\+OF\W\+\(BLOCK\|LINE\)\|BEGIN\W\+OF\)\>" | |
52 syn match abapComplexStatement "\<\(END\W\+OF\W\+\(BLOCK\|LINE\)\|END\W\+OF\)\>" | |
53 syn match abapComplexStatement "\<NO\W\+INTERVALS\>" | |
54 syn match abapComplexStatement "\<RESPECTING\W\+BLANKS\>" | |
55 syn match abapComplexStatement "\<SEPARATED\W\+BY\>" | |
56 syn match abapComplexStatement "\<USING\(\W\+EDIT\W\+MASK\)\?\>" | |
57 syn match abapComplexStatement "\<WHERE\(\W\+LINE\)\?\>" | |
58 syn match abapComplexStatement "\<RADIOBUTTON\W\+GROUP\>" | |
59 syn match abapComplexStatement "\<REF\W\+TO\>" | |
60 syn match abapComplexStatement "\<\(PUBLIC\|PRIVATE\|PROTECTED\)\(\W\+SECTION\)\?\>" | |
61 syn match abapComplexStatement "\<DELETING\W\+\(TRAILING\|LEADING\)\>" | |
62 syn match abapComplexStatement "\<\(ALL\W\+OCCURRENCES\)\|\(\(FIRST\|LAST\)\W\+OCCURRENCE\)\>" | |
63 syn match abapComplexStatement "\<INHERITING\W\+FROM\>" | |
64 syn match abapComplexStatement "\<\(UP\W\+\)\?TO\>" | |
3893 | 65 |
66 " hyphenated-word statements | |
3920 | 67 syn match abapComplexStatement "\<LINE-COUNT\>" |
68 syn match abapComplexStatement "\<ADD-CORRESPONDING\>" | |
69 syn match abapComplexStatement "\<AUTHORITY-CHECK\>" | |
70 syn match abapComplexStatement "\<BREAK-POINT\>" | |
71 syn match abapComplexStatement "\<CLASS-DATA\>" | |
72 syn match abapComplexStatement "\<CLASS-METHODS\>" | |
73 syn match abapComplexStatement "\<CLASS-METHOD\>" | |
74 syn match abapComplexStatement "\<DIVIDE-CORRESPONDING\>" | |
75 syn match abapComplexStatement "\<EDITOR-CALL\>" | |
76 syn match abapComplexStatement "\<END-OF-DEFINITION\>" | |
77 syn match abapComplexStatement "\<END-OF-PAGE\>" | |
78 syn match abapComplexStatement "\<END-OF-SELECTION\>" | |
79 syn match abapComplexStatement "\<FIELD-GROUPS\>" | |
80 syn match abapComplexStatement "\<FIELD-SYMBOLS\>" | |
81 syn match abapComplexStatement "\<FUNCTION-POOL\>" | |
82 syn match abapComplexStatement "\<IS\W\+\(NOT\W\+\)\?\(ASSIGNED\|BOUND\|INITIAL\|SUPPLIED\)\>" | |
83 syn match abapComplexStatement "\<MOVE-CORRESPONDING\>" | |
84 syn match abapComplexStatement "\<MULTIPLY-CORRESPONDING\>" | |
85 syn match abapComplexStatement "\<NEW-LINE\>" | |
86 syn match abapComplexStatement "\<NEW-PAGE\>" | |
87 syn match abapComplexStatement "\<NEW-SECTION\>" | |
88 syn match abapComplexStatement "\<PRINT-CONTROL\>" | |
89 syn match abapComplexStatement "\<RP-PROVIDE-FROM-LAST\>" | |
90 syn match abapComplexStatement "\<SELECT-OPTIONS\>" | |
91 syn match abapComplexStatement "\<SELECTION-SCREEN\>" | |
92 syn match abapComplexStatement "\<START-OF-SELECTION\>" | |
93 syn match abapComplexStatement "\<SUBTRACT-CORRESPONDING\>" | |
94 syn match abapComplexStatement "\<SYNTAX-CHECK\>" | |
95 syn match abapComplexStatement "\<SYNTAX-TRACE\>" | |
96 syn match abapComplexStatement "\<TOP-OF-PAGE\>" | |
97 syn match abapComplexStatement "\<TYPE-POOL\>" | |
98 syn match abapComplexStatement "\<TYPE-POOLS\>" | |
99 syn match abapComplexStatement "\<LINE-SIZE\>" | |
100 syn match abapComplexStatement "\<LINE-COUNT\>" | |
101 syn match abapComplexStatement "\<MESSAGE-ID\>" | |
102 syn match abapComplexStatement "\<DISPLAY-MODE\>" | |
103 syn match abapComplexStatement "\<READ\(-ONLY\)\?\>" | |
3893 | 104 |
22 | 105 " ABAP statements |
3893 | 106 syn keyword abapStatement ADD ALIAS ALIASES ASSERT ASSIGN ASSIGNING AT |
3920 | 107 syn keyword abapStatement BACK |
3893 | 108 syn keyword abapStatement CALL CASE CATCH CHECK CLASS CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY |
109 syn keyword abapStatement DATA DEFINE DEFINITION DEFERRED DELETE DESCRIBE DETAIL DIVIDE DO | |
110 syn keyword abapStatement ELSE ELSEIF ENDAT ENDCASE ENDCLASS ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDTRY ENDWHILE EVENT EVENTS EXEC EXIT EXPORT EXPORTING EXTRACT | |
111 syn keyword abapStatement FETCH FIELDS FORM FORMAT FREE FROM FUNCTION | |
22 | 112 syn keyword abapStatement GENERATE GET |
113 syn keyword abapStatement HIDE | |
3920 | 114 syn keyword abapStatement IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INTERFACE INTERFACES INPUT INSERT IMPLEMENTATION |
3893 | 115 syn keyword abapStatement LEAVE LIKE LINE LOAD LOCAL LOOP |
116 syn keyword abapStatement MESSAGE METHOD METHODS MODIFY MODULE MOVE MULTIPLY | |
117 syn keyword abapStatement ON OVERLAY OPTIONAL OTHERS | |
118 syn keyword abapStatement PACK PARAMETERS PERFORM POSITION PROGRAM PROVIDE PUT | |
3920 | 119 syn keyword abapStatement RAISE RANGES RECEIVE RECEIVING REDEFINITION REFERENCE REFRESH REJECT REPLACE REPORT RESERVE RESTORE RETURNING ROLLBACK |
3893 | 120 syn keyword abapStatement SCAN SCROLL SEARCH SELECT SET SHIFT SKIP SORT SORTED SPLIT STANDARD STATICS STEP STOP SUBMIT SUBTRACT SUM SUMMARY SUPPRESS |
121 syn keyword abapStatement TABLES TIMES TRANSFER TRANSLATE TRY TYPE TYPES | |
122 syn keyword abapStatement UNASSIGN ULINE UNPACK UPDATE | |
22 | 123 syn keyword abapStatement WHEN WHILE WINDOW WRITE |
124 | |
125 " More statemets | |
3920 | 126 syn keyword abapStatement LINES |
127 syn keyword abapStatement INTO GROUP BY HAVING ORDER BY SINGLE | |
128 syn keyword abapStatement APPENDING CORRESPONDING FIELDS OF TABLE | |
129 syn keyword abapStatement LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER ROWS CONNECTING | |
22 | 130 syn keyword abapStatement OCCURS STRUCTURE OBJECT PROPERTY |
131 syn keyword abapStatement CASTING APPEND RAISING VALUE COLOR | |
3893 | 132 syn keyword abapStatement CHANGING EXCEPTION EXCEPTIONS DEFAULT CHECKBOX COMMENT |
133 syn keyword abapStatement ID NUMBER FOR TITLE OUTPUT | |
22 | 134 |
135 " Special ABAP specific tables: | |
4911 | 136 syn match abapSpecialTables "\<\(sy\|\(hrp\|p\|pa\)\d\d\d\d\|t\d\d\d.\|innnn\)-"me=e-1 contained |
3920 | 137 syn match abapStructure "\<\w\+-[^\>]"me=e-2 contains=abapSpecialTables,abapStatement,abapComplexStatement |
138 syn match abapField "-\w\+"ms=s+1 | |
22 | 139 |
140 " Pointer | |
141 syn match abapSpecial "<\w\+>" | |
142 | |
3920 | 143 " Abap common constants: |
22 | 144 syn keyword abapSpecial TRUE FALSE NULL SPACE |
145 | |
146 " Includes | |
147 syn region abapInclude start="include" end="." contains=abapComment | |
148 | |
149 " Types | |
3893 | 150 syn keyword abapTypes c n i p f d t x string xstring decfloat16 decfloat34 |
22 | 151 |
152 " Atritmitic operators | |
153 syn keyword abapOperator abs sign ceil floor trunc frac acos asin atan cos sin tan | |
154 syn keyword abapOperator cosh sinh tanh exp log log10 sqrt | |
155 | |
156 " String operators | |
3920 | 157 syn keyword abapStatement strlen xstrlen charlen numofchar dbmaxlen |
22 | 158 |
159 syn keyword abapOperator EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN | |
160 | |
161 " An error? Not strictly... but cannot think of reason this is intended. | |
162 syn match abapError "\.\." | |
163 | |
164 " Comments | |
165 syn region abapComment start="^\*" end="$" contains=abapTodo | |
166 syn match abapComment "\".*" contains=abapTodo | |
828 | 167 syn keyword abapTodo contained TODO NOTE |
3893 | 168 syn match abapTodo "\#EC\W\+\w\+" |
22 | 169 |
170 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4911
diff
changeset
|
171 " Only when an item doesn't have highlighting yet |
22 | 172 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
173 hi def link abapError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
174 hi def link abapComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
175 hi def link abapInclude Include |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
176 hi def link abapStatement Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
177 hi def link abapComplexStatement Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
178 hi def link abapSpecial Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
179 hi def link abapNamespace Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
180 hi def link abapSpecialTables Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
181 hi def link abapSymbolOperator abapOperator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
182 hi def link abapOperator Operator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
183 hi def link abapCharString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
184 hi def link abapString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
185 hi def link abapFloat Float |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
186 hi def link abapTypes Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
187 hi def link abapSymbol Structure |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
188 hi def link abapStructure Structure |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
189 hi def link abapField Variable |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
190 hi def link abapNumber Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
191 hi def link abapHex Number |
22 | 192 |
193 | |
194 let b:current_syntax = "abap" | |
195 | |
196 " vim: ts=8 sw=2 | |
828 | 197 |