annotate runtime/syntax/abap.vim @ 3259:9eb7fdfb5e63 v7.3.398

updated for version 7.3.398 Problem: When creating more than 10 location lists and adding items one by one a previous location may be used. (Audrius Ka?ukauskas) Solution: Clear the location list completely when adding the tenth one.
author Bram Moolenaar <bram@vim.org>
date Tue, 10 Jan 2012 17:13:52 +0100
parents 01583c79d5f4
children c3036f1dca68
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
1 " Vim ABAP syntax file
828
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
2 " Language: SAP - ABAP/R4
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
3 " Revision: 1.0
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
4 " Maintainer: Marius Piedallu van Wyk <marius@e.co.za>
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
5 " Last Change: 2006 Apr 13
22
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
6
828
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
7 " For version < 6.0: Clear all syntax items
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
8 " For version >= 6.0: Quit when a syntax file was already loaded
22
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
9 if version < 600
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
10 syntax clear
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
12 finish
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
13 endif
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
14
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
15 " Always ignore case
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
16 syn case ignore
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
17
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
18 " Symbol Operators
828
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
19 syn match abapSymbolOperator "[+\-/=<>$]"
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
20 syn match abapSymbolOperator "\*"
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
21 syn match abapSymbolOperator "[<>]="
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
22 syn match abapSymbolOperator "<>"
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
23 syn match abapSymbolOperator "\*\*"
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
24 syn match abapSymbolOperator "[()]"
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
25 syn match abapSymbolOperator "[:,\.]"
22
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
26
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
27 " Literals
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
28 syn region abapString matchgroup=abapString start="'" end="'" contains=abapStringEscape
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
29 syn match abapStringEscape contained "''"
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
30
828
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
31 syn match abapNumber "-\=\<\d\+\>"
22
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
32 syn region abapHex matchgroup=abapHex start="X'" end="'"
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
33
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
34 if version >= 600
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
35 setlocal iskeyword=-,48-57,_,A-Z,a-z
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
36 else
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
37 set iskeyword=-,48-57,_,A-Z,a-z
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
38 endif
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
39
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
40 " ABAP statements
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
41 syn keyword abapStatement ADD ADD-CORRESPONDING ASSIGN AT AUTHORITY-CHECK
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
42 syn keyword abapStatement BACK BREAK-POINT
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
43 syn keyword abapStatement CALL CASE CHECK CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
44 syn keyword abapStatement DATA DEFINE DELETE DESCRIBE DETAIL DIVIDE DIVIDE-CORRESPONDING DO
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
45 syn keyword abapStatement EDITOR-CALL ELSE ELSEIF END-OF-DEFINITION END-OF-PAGE END-OF-SELECTION ENDAT ENDCASE ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDLOOP ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDWHILE EXEC EXPORT EXPORTING EXTRACT
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
46 syn keyword abapStatement FETCH FIELD-GROUPS FIELD-SYMBOLS FIELDS FORM FORMAT FREE FUNCTION FUNCTION-POOL
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
47 syn keyword abapStatement GENERATE GET
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
48 syn keyword abapStatement HIDE
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
49 syn keyword abapStatement IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INPUT INSERT
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
50 syn keyword abapStatement LEAVE LIKE LOAD LOCAL LOOP
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
51 syn keyword abapStatement MESSAGE MODIFY MODULE MOVE MOVE-CORRESPONDING MULTIPLY MULTIPLY-CORRESPONDING
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
52 syn keyword abapStatement NEW-LINE NEW-PAGE NEW-SECTION
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
53 syn keyword abapStatement ON OVERLAY
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
54 syn keyword abapStatement PACK PARAMETERS PERFORM POSITION PRINT-CONTROL PROGRAM PROVIDE PUT
828
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
55 syn keyword abapStatement RAISE RANGES READ RECEIVE REFRESH REJECT REPLACE REPORT RESERVE RESTORE ROLLBACK RP-PROVIDE-FROM-LAST
22
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
56 syn keyword abapStatement SCAN SCROLL SEARCH SELECT SELECT-OPTIONS SELECTION-SCREEN SET SHIFT SKIP SORT SPLIT START-OF-SELECTION STATICS STOP SUBMIT SUBTRACT SUBTRACT-CORRESPONDING SUM SUMMARY SUPPRESS SYNTAX-CHECK SYNTAX-TRACE
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
57 syn keyword abapStatement TABLES TOP-OF-PAGE TRANSFER TRANSLATE TYPE TYPE-POOL TYPE-POOLS TYPES
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
58 syn keyword abapStatement UNPACK UPDATE
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
59 syn keyword abapStatement WHEN WHILE WINDOW WRITE
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
60
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
61 " More statemets
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
62 syn keyword abapStatement OCCURS STRUCTURE OBJECT PROPERTY
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
63 syn keyword abapStatement CASTING APPEND RAISING VALUE COLOR
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
64 syn keyword abapStatement LINE-SIZE LINE-COUNT MESSAGE-ID
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
65 syn keyword abapStatement CHANGING EXCEPTIONS DEFAULT CHECKBOX COMMENT
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
66 syn keyword abapStatement ID NUMBER FOR DISPLAY-MODE TITLE OUTPUT
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
67
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
68 " More multi-word statements
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
69 syn match abapStatement "\(\W\|^\)\(WITH\W\+\(HEADER\W\+LINE\|FRAME\|KEY\)\|WITH\)\(\W\|$\)"ms=s+1,me=e-1
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
70 syn match abapStatement "\(\W\|^\)NO\W\+STANDARD\W\+PAGE\W\+HEADING\(\W\|$\)"ms=s+1,me=e-1
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
71 syn match abapStatement "\(\W\|^\)\(EXIT\W\+FROM\W\+STEP\W\+LOOP\|EXIT\)\(\W\|$\)"ms=s+1,me=e-1
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
72 syn match abapStatement "\(\W\|^\)\(BEGIN\W\+OF\W\+\(BLOCK\|LINE\)\|BEGIN\W\+OF\)\(\W\|$\)"ms=s+1,me=e-1
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
73 syn match abapStatement "\(\W\|^\)\(END\W\+OF\W\+\(BLOCK\|LINE\)\|END\W\+OF\)\(\W\|$\)"ms=s+1,me=e-1
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
74 syn match abapStatement "\(\W\|^\)IS\W\+INITIAL\(\W\|$\)"ms=s+1,me=e-1
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
75 syn match abapStatement "\(\W\|^\)NO\W\+INTERVALS\(\W\|$\)"ms=s+1,me=e-1
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
76 syn match abapStatement "\(\W\|^\)SEPARATED\W\+BY\(\W\|$\)"ms=s+1,me=e-1
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
77 syn match abapStatement "\(\W\|^\)\(USING\W\+\(EDIT\W\+MASK\)\|USING\)\(\W\|$\)"ms=s+1,me=e-1
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
78 syn match abapStatement "\(\W\|^\)\(WHERE\W\+\(LINE\)\)\(\W\|$\)"ms=s+1,me=e-1
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
79 syn match abapStatement "\(\W\|^\)RADIOBUTTON\W\+GROUP\(\W\|$\)"ms=s+1,me=e-1
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
80 syn match abapStatement "\(\W\|^\)REF\W\+TO\(\W\|$\)"ms=s+1,me=e-1
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
81
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
82 " Special ABAP specific tables:
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
83 syn match abapSpecial "\(\W\|^\)\(sy\|\(p\|pa\)\d\d\d\d\|t\d\d\d.\|innnn\)\(\W\|$\)"ms=s+1,me=e-1
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
84 syn match abapSpecialTables "\(sy\|\(p\|pa\)\d\d\d\d\|t\d\d\d.\|innnn\)-"me=e-1 contained
828
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
85 syn match abapSpecial "\(\W\|^\)\w\+-\(\w\+-\w\+\|\w\+\)"ms=s+1 contains=abapSpecialTables
22
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
86
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
87 " Pointer
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
88 syn match abapSpecial "<\w\+>"
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
89
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
90 " Abap constants:
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
91 syn keyword abapSpecial TRUE FALSE NULL SPACE
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
92
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
93 " Includes
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
94 syn region abapInclude start="include" end="." contains=abapComment
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
95
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
96 " Types
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
97 syn keyword abapTypes c n i p f d t x
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
98
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
99 " Atritmitic operators
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
100 syn keyword abapOperator abs sign ceil floor trunc frac acos asin atan cos sin tan
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
101 syn keyword abapOperator cosh sinh tanh exp log log10 sqrt
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
102
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
103 " String operators
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
104 syn keyword abapOperator strlen xstrlen charlen numofchar dbmaxlen
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
105
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
106 " Table operators
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
107 syn keyword abapOperator lines
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
108
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
109 " Table operators (SELECT operators)
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
110 syn keyword abapOperator INTO FROM WHERE GROUP BY HAVING ORDER BY SINGLE
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
111 syn keyword abapOperator APPENDING CORRESPONDING FIELDS OF TABLE
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
112 syn keyword abapOperator LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER UP TO ROWS CONNECTING
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
113 syn keyword abapOperator EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
114
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
115 " An error? Not strictly... but cannot think of reason this is intended.
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
116 syn match abapError "\.\."
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
117
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
118 " Comments
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
119 syn region abapComment start="^\*" end="$" contains=abapTodo
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
120 syn match abapComment "\".*" contains=abapTodo
828
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
121 syn keyword abapTodo contained TODO NOTE
22
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
122
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
123 " Define the default highlighting.
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
124 " For version 5.7 and earlier: only when not done already
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
125 " For version 5.8 and later: only when an item doesn't have highlighting yet
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
126 if version >= 508 || !exists("did_abap_syntax_inits")
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
127 if version < 508
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
128 let did_abap_syntax_inits = 1
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
129 command -nargs=+ HiLink hi link <args>
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
130 else
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
131 command -nargs=+ HiLink hi def link <args>
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
132 endif
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
133
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
134 HiLink abapError Error
828
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
135 HiLink abapComment Comment
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
136 HiLink abapInclude Include
22
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
137 HiLink abapSpecial Special
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
138 HiLink abapSpecialTables PreProc
828
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
139 HiLink abapSymbolOperator abapOperator
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
140 HiLink abapOperator Operator
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
141 HiLink abapStatement Statement
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
142 HiLink abapString String
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
143 HiLink abapFloat Float
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
144 HiLink abapNumber Number
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
145 HiLink abapHex Number
22
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
146
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
147 delcommand HiLink
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
148 endif
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
149
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
150 let b:current_syntax = "abap"
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
151
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
152 " vim: ts=8 sw=2
828
01583c79d5f4 updated for version 7.0d03
vimboss
parents: 22
diff changeset
153