codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: Structured Query Report Writer (SQR)3" Maintainer: Nathan Stratton Treadway (nathanst at ontko dot com)4" URL: http://www.ontko.com/sqr/#editor_config_files5"6" Modification History:7" 2002-Apr-12: Updated for SQR v6.x8" 2002-Jul-30: Added { and } to iskeyword definition9" 2003-Oct-15: Allow "." in variable names10" highlight entire open '... literal when it contains11" "''" inside it (e.g. "'I can''t say" is treated12" as one open string, not one terminated and one open)13" {} variables can occur inside of '...' literals14"15" Thanks to the previous maintainer of this file, Jeff Lanzarotta:16" http://lanzarotta.tripod.com/vim.html17" jefflanzarotta at yahoo dot com18 19" quit when a syntax file was already loaded20if exists("b:current_syntax")21 finish22endif23 24setlocal iskeyword=@,48-57,_,-,#,$,{,}25 26syn case ignore27 28" BEGIN GENERATED SECTION ============================================29 30" Generated by generate_vim_syntax.sqr at 2002/04/11 13:0431" (based on the UltraEdit syntax file for SQR 6.1.432" found at http://www.ontko.com/sqr/#editor_config_files )33 34syn keyword sqrSection begin-footing begin-heading begin-procedure35syn keyword sqrSection begin-program begin-report begin-setup36syn keyword sqrSection end-footing end-heading end-procedure37syn keyword sqrSection end-program end-report end-setup38 39syn keyword sqrParagraph alter-color-map alter-connection40syn keyword sqrParagraph alter-locale alter-printer alter-report41syn keyword sqrParagraph begin-document begin-execute begin-select42syn keyword sqrParagraph begin-sql declare-chart declare-image43syn keyword sqrParagraph declare-color-map declare-connection44syn keyword sqrParagraph declare-layout declare-printer45syn keyword sqrParagraph declare-report declare-procedure46syn keyword sqrParagraph declare-toc declare-variable end-declare47syn keyword sqrParagraph end-document end-select exit-select end-sql48syn keyword sqrParagraph load-lookup49 50syn keyword sqrReserved #current-column #current-date #current-line51syn keyword sqrReserved #end-file #page-count #return-status52syn keyword sqrReserved #sql-count #sql-status #sqr-max-columns53syn keyword sqrReserved #sqr-max-lines #sqr-pid #sqr-toc-level54syn keyword sqrReserved #sqr-toc-page $sqr-database {sqr-database}55syn keyword sqrReserved $sqr-dbcs {sqr-dbcs} $sqr-encoding56syn keyword sqrReserved {sqr-encoding} $sqr-encoding-console57syn keyword sqrReserved {sqr-encoding-console}58syn keyword sqrReserved $sqr-encoding-database59syn keyword sqrReserved {sqr-encoding-database}60syn keyword sqrReserved $sqr-encoding-file-input61syn keyword sqrReserved {sqr-encoding-file-input}62syn keyword sqrReserved $sqr-encoding-file-output63syn keyword sqrReserved {sqr-encoding-file-output}64syn keyword sqrReserved $sqr-encoding-report-input65syn keyword sqrReserved {sqr-encoding-report-input}66syn keyword sqrReserved $sqr-encoding-report-output67syn keyword sqrReserved {sqr-encoding-report-output}68syn keyword sqrReserved $sqr-encoding-source {sqr-encoding-source}69syn keyword sqrReserved $sql-error $sqr-hostname {sqr-hostname}70syn keyword sqrReserved $sqr-locale $sqr-platform {sqr-platform}71syn keyword sqrReserved $sqr-program $sqr-report $sqr-toc-text72syn keyword sqrReserved $sqr-ver $username73 74syn keyword sqrPreProc #define #else #end-if #endif #if #ifdef75syn keyword sqrPreProc #ifndef #include76 77syn keyword sqrCommand add array-add array-divide array-multiply78syn keyword sqrCommand array-subtract ask break call clear-array79syn keyword sqrCommand close columns commit concat connect80syn keyword sqrCommand create-array create-color-palette date-time81syn keyword sqrCommand display divide do dollar-symbol else encode82syn keyword sqrCommand end-evaluate end-if end-while evaluate83syn keyword sqrCommand execute extract find get get-color goto84syn keyword sqrCommand graphic if input last-page let lookup85syn keyword sqrCommand lowercase mbtosbs money-symbol move86syn keyword sqrCommand multiply new-page new-report next-column87syn keyword sqrCommand next-listing no-formfeed open page-number88syn keyword sqrCommand page-size position print print-bar-code89syn keyword sqrCommand print-chart print-direct print-image90syn keyword sqrCommand printer-deinit printer-init put read91syn keyword sqrCommand rollback security set-color set-delay-print92syn keyword sqrCommand set-generations set-levels set-members93syn keyword sqrCommand sbtombs show stop string subtract toc-entry94syn keyword sqrCommand unstring uppercase use use-column95syn keyword sqrCommand use-printer-type use-procedure use-report96syn keyword sqrCommand while write97 98syn keyword sqrParam 3d-effects after after-bold after-page99syn keyword sqrParam after-report after-toc and as at-end before100syn keyword sqrParam background batch-mode beep before-bold101syn keyword sqrParam before-page before-report before-toc blink102syn keyword sqrParam bold border bottom-margin box break by103syn keyword sqrParam caption center char char-size char-width104syn keyword sqrParam chars-inch chart-size checksum cl105syn keyword sqrParam clear-line clear-screen color color-palette106syn keyword sqrParam cs color_ data-array107syn keyword sqrParam data-array-column-count108syn keyword sqrParam data-array-column-labels109syn keyword sqrParam data-array-row-count data-labels date110syn keyword sqrParam date-edit-mask date-seperator111syn keyword sqrParam day-of-week-case day-of-week-full112syn keyword sqrParam day-of-week-short decimal decimal-seperator113syn keyword sqrParam default-numeric delay distinct dot-leader114syn keyword sqrParam edit-option-ad edit-option-am115syn keyword sqrParam edit-option-bc edit-option-na116syn keyword sqrParam edit-option-pm encoding entry erase-page117syn keyword sqrParam extent field fill fixed fixed_nolf float118syn keyword sqrParam font font-style font-type footing119syn keyword sqrParam footing-size foreground for-append120syn keyword sqrParam for-reading for-reports for-tocs121syn keyword sqrParam for-writing format formfeed from goto-top122syn keyword sqrParam group having heading heading-size height123syn keyword sqrParam horz-line image-size in indentation124syn keyword sqrParam init-string input-date-edit-mask insert125syn keyword sqrParam integer into item-color item-size key126syn keyword sqrParam layout left-margin legend legend-placement127syn keyword sqrParam legend-presentation legend-title level128syn keyword sqrParam line-height line-size line-width lines-inch129syn keyword sqrParam local locale loops max-columns max-lines130syn keyword sqrParam maxlen money money-edit-mask money-sign131syn keyword sqrParam money-sign-location months-case months-full132syn keyword sqrParam months-short name need newline newpage133syn keyword sqrParam no-advance nolf noline noprompt normal not134syn keyword sqrParam nowait number number-edit-mask on-break135syn keyword sqrParam on-error or order orientation page-depth136syn keyword sqrParam paper-size pie-segment-explode137syn keyword sqrParam pie-segment-percent-display138syn keyword sqrParam pie-segment-quantity-display pitch139syn keyword sqrParam point-markers point-size printer140syn keyword sqrParam printer-type quiet record reset-string141syn keyword sqrParam return_value reverse right-margin rows save142syn keyword sqrParam select size skip skiplines sort source143syn keyword sqrParam sqr-database sqr-platform startup-file144syn keyword sqrParam status stop sub-title symbol-set system145syn keyword sqrParam table text thousand-seperator146syn keyword sqrParam time-seperator times title to toc147syn keyword sqrParam top-margin type underline update using148syn keyword sqrParam value vary vert-line wait warn when149syn keyword sqrParam when-other where with x-axis-grid150syn keyword sqrParam x-axis-label x-axis-major-increment151syn keyword sqrParam x-axis-major-tick-marks x-axis-max-value152syn keyword sqrParam x-axis-min-value x-axis-minor-increment153syn keyword sqrParam x-axis-minor-tick-marks x-axis-rotate154syn keyword sqrParam x-axis-scale x-axis-tick-mark-placement xor155syn keyword sqrParam y-axis-grid y-axis-label156syn keyword sqrParam y-axis-major-increment157syn keyword sqrParam y-axis-major-tick-marks y-axis-max-value158syn keyword sqrParam y-axis-min-value y-axis-minor-increment159syn keyword sqrParam y-axis-minor-tick-marks y-axis-scale160syn keyword sqrParam y-axis-tick-mark-placement y2-type161syn keyword sqrParam y2-data-array y2-data-array-row-count162syn keyword sqrParam y2-data-array-column-count163syn keyword sqrParam y2-data-array-column-labels164syn keyword sqrParam y2-axis-color-palette y2-axis-label165syn keyword sqrParam y2-axis-major-increment166syn keyword sqrParam y2-axis-major-tick-marks y2-axis-max-value167syn keyword sqrParam y2-axis-min-value y2-axis-minor-increment168syn keyword sqrParam y2-axis-minor-tick-marks y2-axis-scale169 170syn keyword sqrFunction abs acos asin atan array ascii asciic ceil171syn keyword sqrFunction cos cosh chr cond deg delete dateadd172syn keyword sqrFunction datediff datenow datetostr e10 exp edit173syn keyword sqrFunction exists floor getenv instr instrb isblank174syn keyword sqrFunction isnull log log10 length lengthb lengthp175syn keyword sqrFunction lengtht lower lpad ltrim mod nvl power rad176syn keyword sqrFunction round range replace roman rpad rtrim rename177syn keyword sqrFunction sign sin sinh sqrt substr substrb substrp178syn keyword sqrFunction substrt strtodate tan tanh trunc to_char179syn keyword sqrFunction to_multi_byte to_number to_single_byte180syn keyword sqrFunction transform translate unicode upper wrapdepth181 182" END GENERATED SECTION ==============================================183 184" Variables185syn match sqrVariable /\(\$\|#\|&\)\(\k\|\.\)*/186 187 188" Debug compiler directives189syn match sqrPreProc /\s*#debug\a\=\(\s\|$\)/190syn match sqrSubstVar /{\k*}/191 192 193" Strings194" Note: if an undoubled ! is found, this is not a valid string195" (SQR will treat the end of the line as a comment)196syn match sqrString /'\(!!\|[^!']\)*'/ contains=sqrSubstVar197syn match sqrStrOpen /'\(!!\|''\|[^!']\)*$/198" If we find a ' followed by an unmatched ! before a matching ',199" flag the error.200syn match sqrError /'\(!!\|[^'!]\)*![^!]/me=e-1201syn match sqrError /'\(!!\|[^'!]\)*!$/202 203" Numbers:204syn match sqrNumber /-\=\<\d*\.\=[0-9_]\>/205 206 207 208" Comments:209" Handle comments that start with "!=" specially; they are only valid210" in the first column of the source line. Also, "!!" is only treated211" as a start-comment if there is only whitespace ahead of it on the line.212 213syn keyword sqrTodo TODO FIXME XXX DEBUG NOTE ###214syn match sqrTodo /???/215 216" See also the sqrString section above for handling of ! characters217" inside of strings. (Those patterns override the ones below.)218syn match sqrComment /!\@<!!\([^!=].*\|$\)/ contains=sqrTodo219" the ! can't be preceded by another !,220" and must be followed by at least one221" character other than ! or =, or immediately222" by the end-of-line223syn match sqrComment /^!=.*/ contains=sqrTodo224syn match sqrComment /^!!.*/ contains=sqrTodo225syn match sqrError /^\s\+\zs!=.*/226" it's an error to have "!=" preceded by227" just whitespace on the line ("!="228" preceded by non-whitespace is treated229" as neither a comment nor an error, since230" it is often correct, i.e.231" if #count != 7232syn match sqrError /.\+\zs!!.*/233" a "!!" anywhere but at the beginning of234" the line is always an error235 236 237" Define the default highlighting.238" Only when an item doesn't have highlighting yet.239 240hi def link sqrSection Statement241hi def link sqrParagraph Statement242hi def link sqrReserved Statement243hi def link sqrParameter Statement244hi def link sqrPreProc PreProc245hi def link sqrSubstVar PreProc246hi def link sqrCommand Statement247hi def link sqrParam Type248hi def link sqrFunction Special249 250hi def link sqrString String251hi def link sqrStrOpen Todo252hi def link sqrNumber Number253hi def link sqrVariable Identifier254 255hi def link sqrComment Comment256hi def link sqrTodo Todo257hi def link sqrError Error258 259 260let b:current_syntax = "sqr"261 262" vim: ts=8 sw=2263 