home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / runtime / syntax / sqr.vim < prev    next >
Encoding:
Text File  |  2003-05-11  |  13.5 KB  |  289 lines

  1. " Vim syntax file
  2. "    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_files
  5. "
  6. " Modification History:
  7. "     2002-Apr-12: Updated for SQR v6.x
  8. "     2002-Jul-30: Added { and } to iskeyword definition
  9. "
  10. "  Thanks to the previous maintainer of this file, Jeff Lanzarotta:
  11. "    http://lanzarotta.tripod.com/vim.html
  12. "    jefflanzarotta at yahoo dot com
  13.  
  14. " For version 5.x, clear all syntax items.
  15. " For version 6.x, quit when a syntax file was already loaded.
  16. if version < 600
  17.   syntax clear
  18. elseif exists("b:current_syntax")
  19.   finish
  20. endif
  21.  
  22. if version >= 600
  23.   setlocal iskeyword=@,48-57,_,-,#,$,{,}
  24. else
  25.   set iskeyword=@,48-57,_,-,#,$,{,}
  26. endif
  27.  
  28. syn case ignore
  29.  
  30. " BEGIN GENERATED SECTION ============================================
  31.  
  32. " Generated by generate_vim_syntax.sqr at 2002/04/11 13:04
  33. " (based on the UltraEdit syntax file for SQR 6.1.4
  34. " found at http://www.ontko.com/sqr/#editor_config_files )
  35.  
  36. syn keyword    sqrSection     begin-footing begin-heading begin-procedure
  37. syn keyword    sqrSection     begin-program begin-report begin-setup
  38. syn keyword    sqrSection     end-footing end-heading end-procedure
  39. syn keyword    sqrSection     end-program end-report end-setup
  40.  
  41. syn keyword    sqrParagraph   alter-color-map alter-conection
  42. syn keyword    sqrParagraph   alter-locale alter-printer alter-report
  43. syn keyword    sqrParagraph   begin-document begin-execute begin-select
  44. syn keyword    sqrParagraph   begin-sql declare-chart declare-image
  45. syn keyword    sqrParagraph   declare-color-map declare-conection
  46. syn keyword    sqrParagraph   declare-layout declare-printer
  47. syn keyword    sqrParagraph   declare-report declare-procedure
  48. syn keyword    sqrParagraph   declare-toc declare-variable end-declare
  49. syn keyword    sqrParagraph   end-document end-select exit-select end-sql
  50. syn keyword    sqrParagraph   load-lookup
  51.  
  52. syn keyword    sqrReserved    #current-column #current-date #current-line
  53. syn keyword    sqrReserved    #end-file #page-count #return-status
  54. syn keyword    sqrReserved    #sql-count #sql-status #sqr-max-columns
  55. syn keyword    sqrReserved    #sqr-max-lines #sqr-pid #sqr-toc-level
  56. syn keyword    sqrReserved    #sqr-toc-page $sqr-database {sqr-database}
  57. syn keyword    sqrReserved    $sqr-dbcs {sqr-dbcs} $sqr-encoding
  58. syn keyword    sqrReserved    {sqr-encoding} $sqr-encoding-console
  59. syn keyword    sqrReserved    {sqr-encoding-console}
  60. syn keyword    sqrReserved    $sqr-encoding-database
  61. syn keyword    sqrReserved    {sqr-encoding-database}
  62. syn keyword    sqrReserved    $sqr-encoding-file-input
  63. syn keyword    sqrReserved    {sqr-encoding-file-input}
  64. syn keyword    sqrReserved    $sqr-encoding-file-output
  65. syn keyword    sqrReserved    {sqr-encoding-file-output}
  66. syn keyword    sqrReserved    $sqr-encoding-report-input
  67. syn keyword    sqrReserved    {sqr-encoding-report-input}
  68. syn keyword    sqrReserved    $sqr-encoding-report-output
  69. syn keyword    sqrReserved    {sqr-encoding-report-output}
  70. syn keyword    sqrReserved    $sqr-encoding-source {sqr-encoding-source}
  71. syn keyword    sqrReserved    $sql-error $sqr-hostname {sqr-hostname}
  72. syn keyword    sqrReserved    $sqr-locale $sqr-platform {sqr-platform}
  73. syn keyword    sqrReserved    $sqr-program $sqr-report $sqr-toc-text
  74. syn keyword    sqrReserved    $sqr-ver $username
  75.  
  76. syn keyword    sqrPreProc     #define #else #end-if #endif #if #ifdef
  77. syn keyword    sqrPreProc     #ifndef #include
  78.  
  79. syn keyword    sqrCommand     add array-add array-divide array-multiply
  80. syn keyword    sqrCommand     array-subtract ask break call clear-array
  81. syn keyword    sqrCommand     close columns commit concat connect
  82. syn keyword    sqrCommand     create-array create-color-palette date-time
  83. syn keyword    sqrCommand     display divide do dollar-symbol else encode
  84. syn keyword    sqrCommand     end-evaluate end-if end-while evaluate
  85. syn keyword    sqrCommand     execute extract find get get-color goto
  86. syn keyword    sqrCommand     graphic if input last-page let lookup
  87. syn keyword    sqrCommand     lowercase mbtosbs money-symbol move
  88. syn keyword    sqrCommand     multiply new-page new-report next-column
  89. syn keyword    sqrCommand     next-listing no-formfeed open page-number
  90. syn keyword    sqrCommand     page-size position print print-bar-code
  91. syn keyword    sqrCommand     print-chart print-direct print-image
  92. syn keyword    sqrCommand     printer-deinit printer-init put read
  93. syn keyword    sqrCommand     rollback security set-color set-delay-print
  94. syn keyword    sqrCommand     set-generations set-levels set-members
  95. syn keyword    sqrCommand     sbtombs show stop string subtract toc-entry
  96. syn keyword    sqrCommand     unstring uppercase use use-column
  97. syn keyword    sqrCommand     use-printer-type use-procedure use-report
  98. syn keyword    sqrCommand     while write
  99.  
  100. syn keyword    sqrParam       3d-effects after after-bold after-page
  101. syn keyword    sqrParam       after-report after-toc and as at-end before
  102. syn keyword    sqrParam       background batch-mode beep before-bold
  103. syn keyword    sqrParam       before-page before-report before-toc blink
  104. syn keyword    sqrParam       bold border bottom-margin box break by
  105. syn keyword    sqrParam       caption center char char-size char-width
  106. syn keyword    sqrParam       chars-inch chart-size checksum cl
  107. syn keyword    sqrParam       clear-line clear-screen color color-palette
  108. syn keyword    sqrParam       cs color_ data-array
  109. syn keyword    sqrParam       data-array-column-count
  110. syn keyword    sqrParam       data-array-column-labels
  111. syn keyword    sqrParam       data-array-row-count data-labels date
  112. syn keyword    sqrParam       date-edit-mask date-seperator
  113. syn keyword    sqrParam       day-of-week-case day-of-week-full
  114. syn keyword    sqrParam       day-of-week-short decimal decimal-seperator
  115. syn keyword    sqrParam       default-numeric delay distinct dot-leader
  116. syn keyword    sqrParam       edit-option-ad edit-option-am
  117. syn keyword    sqrParam       edit-option-bc edit-option-na
  118. syn keyword    sqrParam       edit-option-pm encoding entry erase-page
  119. syn keyword    sqrParam       extent field fill fixed fixed_nolf float
  120. syn keyword    sqrParam       font font-style font-type footing
  121. syn keyword    sqrParam       footing-size foreground for-append
  122. syn keyword    sqrParam       for-reading for-reports for-tocs
  123. syn keyword    sqrParam       for-writing format formfeed from goto-top
  124. syn keyword    sqrParam       group having heading heading-size height
  125. syn keyword    sqrParam       horz-line image-size in indentation
  126. syn keyword    sqrParam       init-string input-date-edit-mask insert
  127. syn keyword    sqrParam       integer into item-color item-size key
  128. syn keyword    sqrParam       layout left-margin legend legend-placement
  129. syn keyword    sqrParam       legend-presentation legend-title level
  130. syn keyword    sqrParam       line-height line-size line-width lines-inch
  131. syn keyword    sqrParam       local locale loops max-columns max-lines
  132. syn keyword    sqrParam       maxlen money money-edit-mask money-sign
  133. syn keyword    sqrParam       money-sign-location months-case months-full
  134. syn keyword    sqrParam       months-short name need newline newpage
  135. syn keyword    sqrParam       no-advance nolf noline noprompt normal not
  136. syn keyword    sqrParam       nowait number number-edit-mask on-break
  137. syn keyword    sqrParam       on-error or order orientation page-depth
  138. syn keyword    sqrParam       paper-size pie-segment-explode
  139. syn keyword    sqrParam       pie-segment-percent-display
  140. syn keyword    sqrParam       pie-segment-quantity-display pitch
  141. syn keyword    sqrParam       point-markers point-size printer
  142. syn keyword    sqrParam       printer-type quiet record reset-string
  143. syn keyword    sqrParam       return_value reverse right-margin rows save
  144. syn keyword    sqrParam       select size skip skiplines sort source
  145. syn keyword    sqrParam       sqr-database sqr-platform startup-file
  146. syn keyword    sqrParam       status stop sub-title symbol-set system
  147. syn keyword    sqrParam       table text thousand-seperator
  148. syn keyword    sqrParam       time-seperator times title to toc
  149. syn keyword    sqrParam       top-margin type underline update using
  150. syn keyword    sqrParam       value vary vert-line wait warn when
  151. syn keyword    sqrParam       when-other where with x-axis-grid
  152. syn keyword    sqrParam       x-axis-label x-axis-major-increment
  153. syn keyword    sqrParam       x-axis-major-tick-marks x-axis-max-value
  154. syn keyword    sqrParam       x-axis-min-value x-axis-minor-increment
  155. syn keyword    sqrParam       x-axis-minor-tick-marks x-axis-rotate
  156. syn keyword    sqrParam       x-axis-scale x-axis-tick-mark-placement xor
  157. syn keyword    sqrParam       y-axis-grid y-axis-label
  158. syn keyword    sqrParam       y-axis-major-increment
  159. syn keyword    sqrParam       y-axis-major-tick-marks y-axis-max-value
  160. syn keyword    sqrParam       y-axis-min-value y-axis-minor-increment
  161. syn keyword    sqrParam       y-axis-minor-tick-marks y-axis-scale
  162. syn keyword    sqrParam       y-axis-tick-mark-placement y2-type
  163. syn keyword    sqrParam       y2-data-array y2-data-array-row-count
  164. syn keyword    sqrParam       y2-data-array-column-count
  165. syn keyword    sqrParam       y2-data-array-column-labels
  166. syn keyword    sqrParam       y2-axis-color-palette y2-axis-label
  167. syn keyword    sqrParam       y2-axis-major-increment
  168. syn keyword    sqrParam       y2-axis-major-tick-marks y2-axis-max-value
  169. syn keyword    sqrParam       y2-axis-min-value y2-axis-minor-increment
  170. syn keyword    sqrParam       y2-axis-minor-tick-marks y2-axis-scale
  171.  
  172. syn keyword    sqrFunction    abs acos asin atan array ascii asciic ceil
  173. syn keyword    sqrFunction    cos cosh chr cond deg delete dateadd
  174. syn keyword    sqrFunction    datediff datenow datetostr e10 exp edit
  175. syn keyword    sqrFunction    exists floor getenv instr instrb isblank
  176. syn keyword    sqrFunction    isnull log log10 length lengthb lengthp
  177. syn keyword    sqrFunction    lengtht lower lpad ltrim mod nvl power rad
  178. syn keyword    sqrFunction    round range replace roman rpad rtrim rename
  179. syn keyword    sqrFunction    sign sin sinh sqrt substr substrb substrp
  180. syn keyword    sqrFunction    substrt strtodate tan tanh trunc to_char
  181. syn keyword    sqrFunction    to_multi_byte to_number to_single_byte
  182. syn keyword    sqrFunction    transform translate unicode upper wrapdepth
  183.  
  184. " END GENERATED SECTION ==============================================
  185.  
  186. " Variables
  187. syn match      sqrVariable    /\(\$\|#\|&\)\k*/
  188. syn match      sqrPreProc    /{\k*}/
  189.  
  190.  
  191. " Debug compiler directives
  192. syn match      sqrPreProc    /\s*#debug\a\=\(\s\|$\)/
  193.  
  194.  
  195. " Strings
  196. " Note: if an undoubled ! is found, this is not a valid string
  197. " (SQR will treat the end of the line as a comment)
  198. syn match      sqrString    /'\(!!\|[^!']\)*'/
  199. syn match      sqrStrOpen    /'\(!!\|[^!']\)*$/
  200. " If we find a ' followed by an unmatched ! before a matching ',
  201. " flag the error.
  202. syn match      sqrError    /'\(!!\|[^'!]\)*![^!]/me=e-1
  203. syn match      sqrError    /'\(!!\|[^'!]\)*!$/
  204.  
  205. " Numbers:
  206. syn match      sqrNumber    /-\=\<\d*\.\=[0-9_]\>/
  207.  
  208.  
  209. " Comments:
  210. " Handle comments that start with "!=" specially; they are only valid
  211. " in the first column of the source line.  Also, "!!" is only treated
  212. " as a start-comment if there is only whitespace ahead of it on the line.
  213.  
  214. syn keyword    sqrTodo        TODO FIXME XXX DEBUG NOTE ###
  215. syn match    sqrTodo        /???/
  216.  
  217. if version >= 600
  218.   " See also the sqrString section above for handling of ! characters
  219.   " inside of strings.  (Those patterns override the ones below.)
  220.   syn match    sqrComment    /!\@<!!\([^!=].*\|$\)/ contains=sqrTodo
  221.   "                  the ! can't be preceeded by another !,
  222.   "                  and must be followed by at least one
  223.   "                  character other than ! or =, or immediately
  224.   "                  by the end-of-line
  225.   syn match    sqrComment    /^!=.*/ contains=sqrTodo
  226.   syn match    sqrComment    /^!!.*/ contains=sqrTodo
  227.   syn match    sqrError    /^\s\+\zs!=.*/
  228.   "                  it's an error to have "!=" preceeded by
  229.   "                  just whitespace on the line ("!="
  230.   "                  preceeded by non-whitespace is treated
  231.   "                  as neither a comment nor an error, since
  232.   "                  it is often correct, i.e.
  233.   "                    if #count != 7
  234.   syn match    sqrError    /.\+\zs!!.*/
  235.   "                  a "!!" anywhere but at the beginning of
  236.   "                  the line is always an error
  237. else "For versions before 6.0, same idea as above but we are limited
  238.      "to simple patterns only.    Also, the sqrString patterns above
  239.      "don't seem to take precedence in v5 as they do in v6, so
  240.      "we split the last rule to ignore comments found inside of
  241.      "string literals.
  242.   syn match    sqrComment    /!\([^!=].*\|$\)/ contains=sqrTodo
  243.   syn match    sqrComment    /^!=.*/ contains=sqrTodo
  244.   syn match    sqrComment    /^!!.*/ contains=sqrTodo
  245.   syn match    sqrError    /^\s\+!=.*/
  246.   syn match    sqrError    /^[^'!]\+!!/
  247.   "                flag !! on lines that don't have ! or '
  248.   syn match    sqrError    /^\([^!']*'[^']*'[^!']*\)\+!!/
  249.   "                flag !! found after matched ' ' chars
  250.   "                (that aren't also commented)
  251. endif
  252.  
  253.  
  254. " Define the default highlighting.
  255. " For version 5.7 and earlier, only when not done already.
  256. " For version 5.8 and later, only when an item doesn;t have hightlighting yet.
  257. if version >= 508 || !exists("did_sqr_syn_inits")
  258.   if version < 508
  259.     let did_sqr_syn_inits = 1
  260.     command -nargs=+ HiLink hi link <args>
  261.   else
  262.     command -nargs=+ HiLink hi def link <args>
  263.   endif
  264.  
  265.   HiLink sqrSection Statement
  266.   HiLink sqrParagraph Statement
  267.   HiLink sqrReserved Statement
  268.   HiLink sqrParameter Statement
  269.   HiLink sqrPreProc PreProc
  270.   HiLink sqrCommand Statement
  271.   HiLink sqrParam Type
  272.   HiLink sqrFunction Special
  273.  
  274.   HiLink sqrString String
  275.   HiLink sqrStrOpen Todo
  276.   HiLink sqrNumber Number
  277.   HiLink sqrVariable Identifier
  278.  
  279.   HiLink sqrComment Comment
  280.   HiLink sqrTodo Todo
  281.   HiLink sqrError Error
  282.  
  283.   delcommand HiLink
  284. endif
  285.  
  286. let b:current_syntax = "sqr"
  287.  
  288. " vim: ts=8 sw=2
  289.