annotate runtime/syntax/sqlj.vim @ 1248:1ad8894bbc07

updated for version 7.1
author vimboss
date Sat, 12 May 2007 13:47:10 +0000
parents 1f3b1021f002
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: sqlj
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Andreas Fischbach <afisch@altavista.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " This file is based on sql.vim && java.vim (thanx)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " with a handful of additional sql words and still
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " a subset of whatever standard
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " Last change: 31th Dec 2001
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " au BufNewFile,BufRead *.sqlj so $VIM/syntax/sqlj.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " Remove any old syntax stuff hanging around
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " Read the Java syntax to start with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 source <sfile>:p:h/java.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " SQLJ extentions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " The SQL reserved words, defined as keywords.
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 syn keyword sqljSpecial null
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword sqljKeyword access add as asc by check cluster column
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword sqljKeyword compress connect current decimal default
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword sqljKeyword desc else exclusive file for from group
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword sqljKeyword having identified immediate increment index
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword sqljKeyword initial into is level maxextents mode modify
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword sqljKeyword nocompress nowait of offline on online start
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword sqljKeyword successful synonym table then to trigger uid
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword sqljKeyword unique user validate values view whenever
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword sqljKeyword where with option order pctfree privileges
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword sqljKeyword public resource row rowlabel rownum rows
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword sqljKeyword session share size smallint
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword sqljKeyword fetch database context iterator field join
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword sqljKeyword foreign outer inner isolation left right
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword sqljKeyword match primary key
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword sqljOperator not and or
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword sqljOperator in any some all between exists
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword sqljOperator like escape
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword sqljOperator union intersect minus
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword sqljOperator prior distinct
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword sqljOperator sysdate
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword sqljOperator max min avg sum count hex
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword sqljStatement alter analyze audit comment commit create
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword sqljStatement delete drop explain grant insert lock noaudit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword sqljStatement rename revoke rollback savepoint select set
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword sqljStatement truncate update begin work
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword sqljType char character date long raw mlslabel number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword sqljType rowid varchar varchar2 float integer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword sqljType byte text serial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 " Strings and characters:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn region sqljString start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn region sqljString start=+'+ skip=+\\\\\|\\"+ end=+'+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " Numbers:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn match sqljNumber "-\=\<\d*\.\=[0-9_]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn match sqljPre "#sql"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " Comments:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn region sqljComment start="/\*" end="\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn match sqlComment "--.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn sync ccomment sqljComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 if version >= 508 || !exists("did_sqlj_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 let did_sqlj_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 command! -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 command! -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 " The default methods for highlighting. Can be overridden later.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 HiLink sqljComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 HiLink sqljKeyword sqljSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 HiLink sqljNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 HiLink sqljOperator sqljStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 HiLink sqljSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 HiLink sqljStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 HiLink sqljString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 HiLink sqljType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 HiLink sqljPre PreProc
839
1f3b1021f002 updated for version 7.0e05
vimboss
parents: 7
diff changeset
97
1f3b1021f002 updated for version 7.0e05
vimboss
parents: 7
diff changeset
98 delcommand HiLink
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 let b:current_syntax = "sqlj"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102