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 / runtime / dos / syntax / cl.vim < prev    next >
Encoding:
Text File  |  2012-05-31  |  4.3 KB  |  114 lines

  1. " Vim syntax file
  2. " Language:        CL
  3. "            (pronounced alphabetically, and NOT known as Clever)
  4. "            (CL was created by Multibase, http://www.mbase.com.au)
  5. " Filename extensions:    *.ent
  6. "            *.eni
  7. " Maintainer:        Philip Uren    <philuSPAX@ieee.org> Remove SPAX spam block
  8. " Version:              4
  9. " Last Change:        May 11 2012
  10.  
  11. " For version 5.x: Clear all syntax items
  12. " For version 6.x: Quit when a syntax file was already loaded
  13. if version < 600
  14.     syntax clear
  15. elseif exists("b:current_syntax")
  16.     finish
  17. endif
  18.  
  19. if version >= 600
  20.     setlocal iskeyword=@,48-57,_,-,
  21. else
  22.     set iskeyword=@,48-57,_,-,
  23. endif
  24.  
  25. syn case ignore
  26.  
  27. syn sync lines=300
  28.  
  29. "If/else/elsif/endif and while/wend mismatch errors
  30. syn match   clifError        "\<wend\>"
  31. syn match   clifError        "\<elsif\>"
  32. syn match   clifError        "\<else\>"
  33. syn match   clifError        "\<endif\>"
  34.  
  35. syn match   clSpaceError    "\s\+$"
  36.  
  37. " If and while regions
  38. syn region  clLoop    transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure
  39. syn region  clIf    transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>"   contains=ALLBUT,clBreak,clProcedure
  40.  
  41. " Make those TODO notes and debugging stand out!
  42. syn keyword clTodo    contained   TODO BUG DEBUG FIX
  43. syn match   clNeedsWork    contained   "NEED[S]*\s\s*WORK"
  44. syn keyword clDebug    contained   debug
  45.  
  46. syn match   clComment    "#.*$"        contains=clTodo,clNeedsWork
  47. syn region  clProcedure    oneline        start="^\s*[{}]" end="$"
  48. syn match   clInclude    "^\s*include\s.*"
  49.  
  50. " We don't put "debug" in the clSetOptions;
  51. " we contain it in clSet so we can make it stand out.
  52. syn keyword clSetOptions    transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim
  53. syn match   clSet    "^\s*set\s.*" contains=clSetOptions,clDebug
  54.  
  55. syn match   clPreProc    "^\s*#P.*"
  56.  
  57. syn keyword clConditional   else elsif
  58. syn keyword clWhile    continue endloop
  59. " 'break' needs to be a region so we can sync on it above.
  60. syn region  clBreak    oneline start="^\s*break" end="$"
  61.  
  62. syn match   clOperator    "[!;|)(:.><+*=-]"
  63.  
  64. syn match   clNumber    "\<\d\+\(u\=l\=\|lu\|f\)\>"
  65.  
  66. syn region  clString    matchgroup=clQuote  start=+"+ end=+"+    skip=+\\"+
  67. syn region  clString    matchgroup=clQuote  start=+'+ end=+'+    skip=+\\'+
  68.  
  69. syn keyword clReserved    ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH
  70.  
  71. syn keyword clFunction    asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match
  72.  
  73. syn keyword clStatement    clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do
  74.  
  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 highlighting yet
  78. if  version >= 508 || !exists("did_cl_syntax_inits")
  79.     if    version < 508
  80.     let did_cl_syntax_inits = 1
  81.     command -nargs=+ HiLink hi link <args>
  82.     else
  83.     command -nargs=+ HiLink hi def link <args>
  84.     endif
  85.  
  86.     HiLink clifError    Error
  87.     HiLink clSpaceError    Error
  88.     HiLink clWhile    Repeat
  89.     HiLink clConditional    Conditional
  90.     HiLink clDebug    Debug
  91.     HiLink clNeedsWork    Todo
  92.     HiLink clTodo    Todo
  93.     HiLink clComment    Comment
  94.     HiLink clProcedure    Procedure
  95.     HiLink clBreak    Procedure
  96.     HiLink clInclude    Include
  97.     HiLink clSetOption    Statement
  98.     HiLink clSet    Identifier
  99.     HiLink clPreProc    PreProc
  100.     HiLink clOperator    Operator
  101.     HiLink clNumber    Number
  102.     HiLink clString    String
  103.     HiLink clQuote    Delimiter
  104.     HiLink clReserved    Identifier
  105.     HiLink clFunction    Function
  106.     HiLink clStatement    Statement
  107.  
  108.     delcommand HiLink
  109. endif
  110.  
  111. let b:current_syntax = "cl"
  112.  
  113. " vim: ts=8 sw=4
  114.