annotate runtime/syntax/plsql.vim @ 6545:1ef8ce97fc40 v7.4.599

updated for version 7.4.599 Problem: Out-of-memory error. Solution: Avoid trying to allocate a negative amount of memory, use size_t instead of int. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Tue, 27 Jan 2015 14:40:00 +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: Oracle Procedureal SQL (PL/SQL)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Jeff Lanzarotta (jefflanzarotta at yahoo dot com)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Original Maintainer: C. Laurence Gonsalves (clgonsal@kami.com)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " URL: http://lanzarotta.tripod.com/vim/syntax/plsql.vim.zip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Last Change: September 18, 2002
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " History: Geoff Evans & Bill Pribyl (bill at plnet dot org)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " Added 9i keywords.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " Austin Ziegler (austin at halostatue dot ca)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " Added 8i+ features.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " For version 5.x, clear all syntax items.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " For version 6.x, quit when a syntax file was already loaded.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " Todo.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword plsqlTodo TODO FIXME XXX DEBUG NOTE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn cluster plsqlCommentGroup contains=plsqlTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match plsqlGarbage "[^ \t()]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match plsqlIdentifier "[a-z][a-z0-9$_#]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match plsqlHostIdentifier ":[a-z][a-z0-9$_#]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " When wanted, highlight the trailing whitespace.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 if exists("c_space_errors")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 if !exists("c_no_trail_space_error")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match plsqlSpaceError "\s\+$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 if !exists("c_no_tab_space_error")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match plsqlSpaceError " \+\t"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " Symbols.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match plsqlSymbol "\(;\|,\|\.\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " Operators.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match plsqlOperator "\(+\|-\|\*\|/\|=\|<\|>\|@\|\*\*\|!=\|\~=\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match plsqlOperator "\(^=\|<=\|>=\|:=\|=>\|\.\.\|||\|<<\|>>\|\"\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " Some of Oracle's SQL keywords.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword plsqlSQLKeyword ABORT ACCESS ACCESSED ADD AFTER ALL ALTER AND ANY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword plsqlSQLKeyword AS ASC ATTRIBUTE AUDIT AUTHORIZATION AVG BASE_TABLE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword plsqlSQLKeyword BEFORE BETWEEN BY CASCADE CAST CHECK CLUSTER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword plsqlSQLKeyword CLUSTERS COLAUTH COLUMN COMMENT COMPRESS CONNECT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword plsqlSQLKeyword CONSTRAINT CRASH CREATE CURRENT DATA DATABASE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword plsqlSQLKeyword DATA_BASE DBA DEFAULT DELAY DELETE DESC DISTINCT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword plsqlSQLKeyword DROP DUAL ELSE EXCLUSIVE EXISTS EXTENDS EXTRACT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword plsqlSQLKeyword FILE FORCE FOREIGN FROM GRANT GROUP HAVING HEAP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword plsqlSQLKeyword IDENTIFIED IDENTIFIER IMMEDIATE IN INCLUDING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword plsqlSQLKeyword INCREMENT INDEX INDEXES INITIAL INSERT INSTEAD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword plsqlSQLKeyword INTERSECT INTO INVALIDATE IS ISOLATION KEY LIBRARY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword plsqlSQLKeyword LIKE LOCK MAXEXTENTS MINUS MODE MODIFY MULTISET
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword plsqlSQLKeyword NESTED NOAUDIT NOCOMPRESS NOT NOWAIT OF OFF OFFLINE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword plsqlSQLKeyword ON ONLINE OPERATOR OPTION OR ORDER ORGANIZATION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword plsqlSQLKeyword PCTFREE PRIMARY PRIOR PRIVATE PRIVILEGES PUBLIC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword plsqlSQLKeyword QUOTA RELEASE RENAME REPLACE RESOURCE REVOKE ROLLBACK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword plsqlSQLKeyword ROW ROWLABEL ROWS SCHEMA SELECT SEPARATE SESSION SET
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn keyword plsqlSQLKeyword SHARE SIZE SPACE START STORE SUCCESSFUL SYNONYM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword plsqlSQLKeyword SYSDATE TABLE TABLES TABLESPACE TEMPORARY TO TREAT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword plsqlSQLKeyword TRIGGER TRUNCATE UID UNION UNIQUE UNLIMITED UPDATE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword plsqlSQLKeyword USE USER VALIDATE VALUES VIEW WHENEVER WHERE WITH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 " PL/SQL's own keywords.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword plsqlKeyword AGENT AND ANY ARRAY ASSIGN AS AT AUTHID BEGIN BODY BY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword plsqlKeyword BULK C CASE CHAR_BASE CHARSETFORM CHARSETID CLOSE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword plsqlKeyword COLLECT CONSTANT CONSTRUCTOR CONTEXT CURRVAL DECLARE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn keyword plsqlKeyword DVOID EXCEPTION EXCEPTION_INIT EXECUTE EXIT FETCH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn keyword plsqlKeyword FINAL FUNCTION GOTO HASH IMMEDIATE IN INDICATOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword plsqlKeyword INSTANTIABLE IS JAVA LANGUAGE LIBRARY MAP MAXLEN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn keyword plsqlKeyword MEMBER NAME NEW NOCOPY NUMBER_BASE OBJECT OCICOLL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn keyword plsqlKeyword OCIDATE OCIDATETIME OCILOBLOCATOR OCINUMBER OCIRAW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn keyword plsqlKeyword OCISTRING OF OPAQUE OPEN OR ORDER OTHERS OUT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword plsqlKeyword OVERRIDING PACKAGE PARALLEL_ENABLE PARAMETERS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword plsqlKeyword PARTITION PIPELINED PRAGMA PROCEDURE RAISE RANGE REF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword plsqlKeyword RESULT RETURN REVERSE ROWTYPE SB1 SELF SHORT SIZE_T
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn keyword plsqlKeyword SQL SQLCODE SQLERRM STATIC STRUCT SUBTYPE TDO THEN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn keyword plsqlKeyword TABLE TIMEZONE_ABBR TIMEZONE_HOUR TIMEZONE_MINUTE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn keyword plsqlKeyword TIMEZONE_REGION TYPE UNDER UNSIGNED USING VARIANCE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn keyword plsqlKeyword VARRAY VARYING WHEN WRITE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn match plsqlKeyword "\<END\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match plsqlKeyword "\.COUNT\>"hs=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn match plsqlKeyword "\.EXISTS\>"hs=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn match plsqlKeyword "\.FIRST\>"hs=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match plsqlKeyword "\.LAST\>"hs=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn match plsqlKeyword "\.DELETE\>"hs=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn match plsqlKeyword "\.PREV\>"hs=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn match plsqlKeyword "\.NEXT\>"hs=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 " PL/SQL functions.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn keyword plsqlFunction ABS ACOS ADD_MONTHS ASCII ASCIISTR ASIN ATAN ATAN2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn keyword plsqlFunction BFILENAME BITAND CEIL CHARTOROWID CHR COALESCE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn keyword plsqlFunction COMMIT COMMIT_CM COMPOSE CONCAT CONVERT COS COSH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn keyword plsqlFunction COUNT CUBE CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn keyword plsqlFunction DBTIMEZONE DECODE DECOMPOSE DEREF DUMP EMPTY_BLOB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn keyword plsqlFunction EMPTY_CLOB EXISTS EXP FLOOR FROM_TZ GETBND GLB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn keyword plsqlFunction GREATEST GREATEST_LB GROUPING HEXTORAW INITCAP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn keyword plsqlFunction INSTR INSTR2 INSTR4 INSTRB INSTRC ISNCHAR LAST_DAY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn keyword plsqlFunction LEAST LEAST_UB LENGTH LENGTH2 LENGTH4 LENGTHB LENGTHC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn keyword plsqlFunction LN LOCALTIME LOCALTIMESTAMP LOG LOWER LPAD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn keyword plsqlFunction LTRIM LUB MAKE_REF MAX MIN MOD MONTHS_BETWEEN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn keyword plsqlFunction NCHARTOROWID NCHR NEW_TIME NEXT_DAY NHEXTORAW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn keyword plsqlFunction NLS_CHARSET_DECL_LEN NLS_CHARSET_ID NLS_CHARSET_NAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn keyword plsqlFunction NLS_INITCAP NLS_LOWER NLSSORT NLS_UPPER NULLFN NULLIF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn keyword plsqlFunction NUMTODSINTERVAL NUMTOYMINTERVAL NVL POWER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn keyword plsqlFunction RAISE_APPLICATION_ERROR RAWTOHEX RAWTONHEX REF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn keyword plsqlFunction REFTOHEX REPLACE ROLLBACK_NR ROLLBACK_SV ROLLUP ROUND
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn keyword plsqlFunction ROWIDTOCHAR ROWIDTONCHAR ROWLABEL RPAD RTRIM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn keyword plsqlFunction SAVEPOINT SESSIONTIMEZONE SETBND SET_TRANSACTION_USE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 syn keyword plsqlFunction SIGN SIN SINH SOUNDEX SQLCODE SQLERRM SQRT STDDEV
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn keyword plsqlFunction SUBSTR SUBSTR2 SUBSTR4 SUBSTRB SUBSTRC SUM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn keyword plsqlFunction SYS_AT_TIME_ZONE SYS_CONTEXT SYSDATE SYS_EXTRACT_UTC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 syn keyword plsqlFunction SYS_GUID SYS_LITERALTODATE SYS_LITERALTODSINTERVAL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 syn keyword plsqlFunction SYS_LITERALTOTIME SYS_LITERALTOTIMESTAMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn keyword plsqlFunction SYS_LITERALTOTZTIME SYS_LITERALTOTZTIMESTAMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 syn keyword plsqlFunction SYS_LITERALTOYMINTERVAL SYS_OVER__DD SYS_OVER__DI
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 syn keyword plsqlFunction SYS_OVER__ID SYS_OVER_IID SYS_OVER_IIT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 syn keyword plsqlFunction SYS_OVER__IT SYS_OVER__TI SYS_OVER__TT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 syn keyword plsqlFunction SYSTIMESTAMP TAN TANH TO_ANYLOB TO_BLOB TO_CHAR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 syn keyword plsqlFunction TO_CLOB TO_DATE TO_DSINTERVAL TO_LABEL TO_MULTI_BYTE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 syn keyword plsqlFunction TO_NCHAR TO_NCLOB TO_NUMBER TO_RAW TO_SINGLE_BYTE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 syn keyword plsqlFunction TO_TIME TO_TIMESTAMP TO_TIMESTAMP_TZ TO_TIME_TZ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 syn keyword plsqlFunction TO_YMINTERVAL TRANSLATE TREAT TRIM TRUNC TZ_OFFSET UID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 syn keyword plsqlFunction UNISTR UPPER UROWID USER USERENV VALUE VARIANCE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 syn keyword plsqlFunction VSIZE WORK XOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 syn match plsqlFunction "\<SYS\$LOB_REPLICATION\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 " PL/SQL Exceptions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 syn keyword plsqlException ACCESS_INTO_NULL CASE_NOT_FOUND COLLECTION_IS_NULL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 syn keyword plsqlException CURSOR_ALREADY_OPEN DUP_VAL_ON_INDEX INVALID_CURSOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 syn keyword plsqlException INVALID_NUMBER LOGIN_DENIED NO_DATA_FOUND
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 syn keyword plsqlException NOT_LOGGED_ON PROGRAM_ERROR ROWTYPE_MISMATCH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 syn keyword plsqlException SELF_IS_NULL STORAGE_ERROR SUBSCRIPT_BEYOND_COUNT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 syn keyword plsqlException SUBSCRIPT_OUTSIDE_LIMIT SYS_INVALID_ROWID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 syn keyword plsqlException TIMEOUT_ON_RESOURCE TOO_MANY_ROWS VALUE_ERROR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 syn keyword plsqlException ZERO_DIVIDE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 " Oracle Pseudo Colums.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 syn keyword plsqlPseudo CURRVAL LEVEL NEXTVAL ROWID ROWNUM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 if exists("plsql_highlight_triggers")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 syn keyword plsqlTrigger INSERTING UPDATING DELETING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 " Conditionals.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 syn keyword plsqlConditional ELSIF ELSE IF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 syn match plsqlConditional "\<END\s\+IF\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 " Loops.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 syn keyword plsqlRepeat FOR LOOP WHILE FORALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 syn match plsqlRepeat "\<END\s\+LOOP\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 " Various types of comments.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 if exists("c_comment_strings")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 syntax match plsqlCommentSkip contained "^\s*\*\($\|\s\+\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 syntax region plsqlCommentString contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=plsqlCommentSkip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 syntax region plsqlComment2String contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end="$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 syntax region plsqlCommentL start="--" skip="\\$" end="$" keepend contains=@plsqlCommentGroup,plsqlComment2String,plsqlCharLiteral,plsqlBooleanLiteral,plsqlNumbersCom,plsqlSpaceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 syntax region plsqlComment start="/\*" end="\*/" contains=@plsqlCommentGroup,plsqlComment2String,plsqlCharLiteral,plsqlBooleanLiteral,plsqlNumbersCom,plsqlSpaceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 syntax region plsqlCommentL start="--" skip="\\$" end="$" keepend contains=@plsqlCommentGroup,plsqlSpaceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 syntax region plsqlComment start="/\*" end="\*/" contains=@plsqlCommentGroup,plsqlSpaceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 syn sync ccomment plsqlComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 syn sync ccomment plsqlCommentL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 " To catch unterminated string literals.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 syn match plsqlStringError "'.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 " Various types of literals.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 syn match plsqlNumbers transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=plsqlIntLiteral,plsqlFloatLiteral
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 syn match plsqlNumbersCom contained transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=plsqlIntLiteral,plsqlFloatLiteral
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 syn match plsqlIntLiteral contained "[+-]\=\d\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 syn match plsqlFloatLiteral contained "[+-]\=\d\+\.\d*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 syn match plsqlFloatLiteral contained "[+-]\=\d*\.\d*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 syn match plsqlCharLiteral "'[^']'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 syn match plsqlStringLiteral "'\([^']\|''\)*'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 syn keyword plsqlBooleanLiteral TRUE FALSE NULL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 " The built-in types.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 syn keyword plsqlStorage ANYDATA ANYTYPE BFILE BINARY_INTEGER BLOB BOOLEAN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 syn keyword plsqlStorage BYTE CHAR CHARACTER CLOB CURSOR DATE DAY DEC DECIMAL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 syn keyword plsqlStorage DOUBLE DSINTERVAL_UNCONSTRAINED FLOAT HOUR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 syn keyword plsqlStorage INT INTEGER INTERVAL LOB LONG MINUTE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 syn keyword plsqlStorage MLSLABEL MONTH NATURAL NATURALN NCHAR NCHAR_CS NCLOB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 syn keyword plsqlStorage NUMBER NUMERIC NVARCHAR PLS_INT PLS_INTEGER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 syn keyword plsqlStorage POSITIVE POSITIVEN PRECISION RAW REAL RECORD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 syn keyword plsqlStorage SECOND SIGNTYPE SMALLINT STRING SYS_REFCURSOR TABLE TIME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 syn keyword plsqlStorage TIMESTAMP TIMESTAMP_UNCONSTRAINED
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 syn keyword plsqlStorage TIMESTAMP_TZ_UNCONSTRAINED
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 syn keyword plsqlStorage TIMESTAMP_LTZ_UNCONSTRAINED UROWID VARCHAR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 syn keyword plsqlStorage VARCHAR2 YEAR YMINTERVAL_UNCONSTRAINED ZONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 " A type-attribute is really a type.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 syn match plsqlTypeAttribute "%\(TYPE\|ROWTYPE\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 " All other attributes.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 syn match plsqlAttribute "%\(BULK_EXCEPTIONS\|BULK_ROWCOUNT\|ISOPEN\|FOUND\|NOTFOUND\|ROWCOUNT\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 " This'll catch mis-matched close-parens.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 syn cluster plsqlParenGroup contains=plsqlParenError,@plsqlCommentGroup,plsqlCommentSkip,plsqlIntLiteral,plsqlFloatLiteral,plsqlNumbersCom
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 if exists("c_no_bracket_error")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 syn region plsqlParen transparent start='(' end=')' contains=ALLBUT,@plsqlParenGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 syn match plsqlParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 syn match plsqlErrInParen contained "[{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 syn region plsqlParen transparent start='(' end=')' contains=ALLBUT,@plsqlParenGroup,plsqlErrInBracket
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 syn match plsqlParenError "[\])]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 syn match plsqlErrInParen contained "[{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 syn region plsqlBracket transparent start='\[' end=']' contains=ALLBUT,@plsqlParenGroup,plsqlErrInParen
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 syn match plsqlErrInBracket contained "[);{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 " Syntax Synchronizing
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 syn sync minlines=10 maxlines=100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 " For version 5.x and earlier, only when not done already.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 " 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
228 if version >= 508 || !exists("did_plsql_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 let did_plsql_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 HiLink plsqlAttribute Macro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 HiLink plsqlBlockError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 HiLink plsqlBooleanLiteral Boolean
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 HiLink plsqlCharLiteral Character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 HiLink plsqlComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 HiLink plsqlCommentL Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 HiLink plsqlConditional Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 HiLink plsqlError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 HiLink plsqlErrInBracket Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 HiLink plsqlErrInBlock Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 HiLink plsqlErrInParen Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 HiLink plsqlException Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 HiLink plsqlFloatLiteral Float
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 HiLink plsqlFunction Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 HiLink plsqlGarbage Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 HiLink plsqlHostIdentifier Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 HiLink plsqlIdentifier Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 HiLink plsqlIntLiteral Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 HiLink plsqlOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 HiLink plsqlParen Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 HiLink plsqlParenError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257 HiLink plsqlSpaceError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 HiLink plsqlPseudo PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 HiLink plsqlKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 HiLink plsqlRepeat Repeat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261 HiLink plsqlStorage StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262 HiLink plsqlSQLKeyword Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 HiLink plsqlStringError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 HiLink plsqlStringLiteral String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 HiLink plsqlCommentString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266 HiLink plsqlComment2String String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 HiLink plsqlSymbol Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268 HiLink plsqlTrigger Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269 HiLink plsqlTypeAttribute StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270 HiLink plsqlTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275 let b:current_syntax = "plsql"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277 " vim: ts=8 sw=2