/runtime/syntax/cl.vim

https://bitbucket.org/ultra_iter/vim-qt · Vim Script · 113 lines · 69 code · 23 blank · 21 comment · 5 complexity · f81375c97f51fb17767ab2011b4c54dc MD5 · raw file

  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. " For version 5.x: Clear all syntax items
  11. " For version 6.x: Quit when a syntax file was already loaded
  12. if version < 600
  13. syntax clear
  14. elseif exists("b:current_syntax")
  15. finish
  16. endif
  17. if version >= 600
  18. setlocal iskeyword=@,48-57,_,-,
  19. else
  20. set iskeyword=@,48-57,_,-,
  21. endif
  22. syn case ignore
  23. syn sync lines=300
  24. "If/else/elsif/endif and while/wend mismatch errors
  25. syn match clifError "\<wend\>"
  26. syn match clifError "\<elsif\>"
  27. syn match clifError "\<else\>"
  28. syn match clifError "\<endif\>"
  29. syn match clSpaceError "\s\+$"
  30. " If and while regions
  31. syn region clLoop transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure
  32. syn region clIf transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>" contains=ALLBUT,clBreak,clProcedure
  33. " Make those TODO notes and debugging stand out!
  34. syn keyword clTodo contained TODO BUG DEBUG FIX
  35. syn match clNeedsWork contained "NEED[S]*\s\s*WORK"
  36. syn keyword clDebug contained debug
  37. syn match clComment "#.*$" contains=clTodo,clNeedsWork
  38. syn region clProcedure oneline start="^\s*[{}]" end="$"
  39. syn match clInclude "^\s*include\s.*"
  40. " We don't put "debug" in the clSetOptions;
  41. " we contain it in clSet so we can make it stand out.
  42. syn keyword clSetOptions transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim
  43. syn match clSet "^\s*set\s.*" contains=clSetOptions,clDebug
  44. syn match clPreProc "^\s*#P.*"
  45. syn keyword clConditional else elsif
  46. syn keyword clWhile continue endloop
  47. " 'break' needs to be a region so we can sync on it above.
  48. syn region clBreak oneline start="^\s*break" end="$"
  49. syn match clOperator "[!;|)(:.><+*=-]"
  50. syn match clNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
  51. syn region clString matchgroup=clQuote start=+"+ end=+"+ skip=+\\"+
  52. syn region clString matchgroup=clQuote start=+'+ end=+'+ skip=+\\'+
  53. 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
  54. 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
  55. 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
  56. " Define the default highlighting.
  57. " For version 5.7 and earlier: only when not done already
  58. " For version 5.8 and later: only when an item doesn't have highlighting yet
  59. if version >= 508 || !exists("did_cl_syntax_inits")
  60. if version < 508
  61. let did_cl_syntax_inits = 1
  62. command -nargs=+ HiLink hi link <args>
  63. else
  64. command -nargs=+ HiLink hi def link <args>
  65. endif
  66. HiLink clifError Error
  67. HiLink clSpaceError Error
  68. HiLink clWhile Repeat
  69. HiLink clConditional Conditional
  70. HiLink clDebug Debug
  71. HiLink clNeedsWork Todo
  72. HiLink clTodo Todo
  73. HiLink clComment Comment
  74. HiLink clProcedure Procedure
  75. HiLink clBreak Procedure
  76. HiLink clInclude Include
  77. HiLink clSetOption Statement
  78. HiLink clSet Identifier
  79. HiLink clPreProc PreProc
  80. HiLink clOperator Operator
  81. HiLink clNumber Number
  82. HiLink clString String
  83. HiLink clQuote Delimiter
  84. HiLink clReserved Identifier
  85. HiLink clFunction Function
  86. HiLink clStatement Statement
  87. delcommand HiLink
  88. endif
  89. let b:current_syntax = "cl"
  90. " vim: ts=8 sw=4