2 " Language: Structured Query Report Writer (SQR)
3 " Maintainer: Jeff Lanzarotta (frizbeefanatic@yahoo.com)
4 " URL: http://lanzarotta.tripod.com/vim/syntax/sqr.vim.zip
5 " Last Change: April 30, 2001
7 " For version 5.x, clear all syntax items.
8 " For version 6.x, quit when a syntax file was already loaded.
11 elseif exists("b:current_syntax")
16 setlocal iskeyword=@,48-57,_,-
18 set iskeyword=@,48-57,_,-
23 " The STP reserved words, defined as keywords.
24 syn region sqrIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+
25 syn match sqrIncluded contained "<[^>]*>"
26 syn match sqrInclude "^\s*#\s*include\>\s*["<]" contains=sqrIncluded
28 syn keyword sqrDefine #define #else #end-if #if #ifdef #ifndef
30 syn keyword sqrOperator not and or desc group having in any some all between exists
31 syn keyword sqrOperator like from order to union intersect minus distinct use xor as
33 syn keyword sqrStatement array-add array-divide array-multiply array-subtract ask begin-document
34 syn keyword sqrStatement begin-footing begin-heading begin-procedure begin-report begin-select
35 syn keyword sqrStatement begin-setup begin-sql break close add
36 syn keyword sqrStatement call commit concat connect create create-array date-time display divide
37 syn keyword sqrStatement do edit else encode end-document end-evaluate end-footing end-heading
38 syn keyword sqrStatement end-if end-procedure end-report end-select end-setup end-sql end-while
39 syn keyword sqrStatement evaluate execute upper exit-select extract fill find get goto if input
40 syn keyword sqrStatement into let isnull load-lookup lookup lower lowercase match move multiply
41 syn keyword sqrStatement new-column new-page new-report next-listing no-formfeed nop on-break
42 syn keyword sqrStatement on-error open page-number page-size position printer-init put read
43 syn keyword sqrStatement rollback select set show stop string subtract unstring uppercase
44 syn keyword sqrStatement use-column when when-other where while with wrap write noline output print
45 syn keyword sqrStatement declare-layout end-declare declare-report loops
46 syn keyword sqrStatement insert update delete values
48 syn keyword sqrType char varchar datetime smalldatetime float int smallint number money tinyint
51 syn keyword sqrFunction abs acos asin atan ceil cos cosh def e10 exp floor log log10 mod
52 syn keyword sqrFunction power rad round sign sin sinh sqrt tan tanh trunc
53 syn keyword sqrFunction datepart datename
55 " Miscellaneous Functions.
56 syn keyword sqrFunction ascii chr cond edit instr isnull length lower lpad ltrim nvl range rpad
57 syn keyword sqrFunction rtrim substr to_char to_number translate upper
59 syn keyword sqrParameter quiet for-reading record status
61 syn keyword sqrTodo TODO FIXME XXX DEBUG NOTE
63 " Strings and characters:
64 syn region sqrString start=+"+ skip=+\\\\|\\"+ end=+"+
65 syn region sqrString start=+'+ skip=+\\\\|\\"+ end=+'+
68 syn match sqrNumber "-\=\<\d*\.\=[0-9_]\>"
71 syn region sqrComment start="/\*" end="\*/" contains=sqrTodo
72 syn match sqrComment "!.*" contains=sqrTodo
73 syn sync ccomment sqrComment
75 " Define the default highlighting.
76 " For version 5.7 and earlier, only when not done already.
77 " For version 5.8 and later, only when an item doesn;t have hightlighting yet.
78 if version >= 508 || !exists("did_sqr_syn_inits")
80 let did_sqr_syn_inits = 1
81 command -nargs=+ HiLink hi link <args>
83 command -nargs=+ HiLink hi def link <args>
86 HiLink sqrComment Comment
87 HiLink sqrNumber Number
88 HiLink sqrOperator Operator
89 HiLink sqrStatement Statement
90 HiLink sqrString String
92 HiLink sqrDefine Macro
93 HiLink sqrInclude Include
95 HiLink sqrFunction Function
96 HiLink sqrParameter Function
101 let b:current_syntax = "sqr"