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 / mac / vim55rt.sit / runtime / syntax / lace.vim < prev    next >
Encoding:
Text File  |  1999-09-25  |  3.9 KB  |  121 lines  |  [TEXT/VIM!]

  1. " Vim syntax file
  2. " Language:        lace
  3. " Maintainer:    Jocelyn Fiat <utilities@eiffel.com>
  4. " Last change:    1999 Jun 14
  5.  
  6. " Copyright Interactive Software Engineering, 1998
  7. " You are free to use this file as you please, but
  8. " if you make a change or improvement you must send
  9. " it to the maintainer at <utilities@eiffel.com>
  10.  
  11.  
  12. " Remove any old syntax stuff hanging around
  13. syn clear
  14.  
  15. " LACE is case insensitive, but the style guide lines are not.
  16.  
  17. if !exists("lace_case_insensitive")
  18.     syn case match
  19. else
  20.     syn case ignore
  21. endif
  22.  
  23. " A bunch of useful LACE keywords
  24. syn keyword laceTopStruct        system root default option visible cluster
  25. syn keyword laceTopStruct        external generate end
  26. syn keyword laceOptionClause    collect assertion debug optimize trace
  27. syn keyword laceOptionClause    profile inline precompiled multithreaded
  28. syn keyword laceOptionClause    exception_trace dead_code_removal
  29. syn keyword laceOptionClause    array_optimization
  30. syn keyword laceOptionClause    inlining_size inlining
  31. syn keyword laceOptionClause    console_application dynamic_runtime
  32. syn keyword laceOptionClause    line_generation
  33. syn keyword laceOptionMark        yes no all
  34. syn keyword laceOptionMark        require ensure invariant loop check
  35. syn keyword laceClusterProp        use include exclude
  36. syn keyword laceAdaptClassName    adapt ignore rename as
  37. syn keyword laceAdaptClassName    creation export visible
  38. syn keyword laceExternal        include_path object makefile
  39.  
  40. " Operators
  41. syn match   laceOperator        "\$"
  42. syn match   laceBrackets        "[[\]]"
  43. syn match   laceExport            "[{}]"
  44.  
  45. " Constants
  46. syn keyword laceBool        true false
  47. syn keyword laceBool        True False
  48. syn region  laceString        start=+"+ skip=+%"+ end=+"+ contains=laceEscape,laceStringError
  49. syn match   laceEscape        contained "%[^/]"
  50. syn match   laceEscape        contained "%/\d\+/"
  51. syn match   laceEscape        contained "^[ \t]*%"
  52. syn match   laceEscape        contained "%[ \t]*$"
  53. syn match   laceStringError    contained "%/[^0-9]"
  54. syn match   laceStringError    contained "%/\d\+[^0-9/]"
  55. syn match   laceStringError    "'\(%[^/]\|%/\d\+/\|[^'%]\)\+'"
  56. syn match   laceCharacter    "'\(%[^/]\|%/\d\+/\|[^'%]\)'" contains=laceEscape
  57. syn match   laceNumber        "-\=\<\d\+\(_\d\+\)*\>"
  58. syn match   laceNumber        "\<[01]\+[bB]\>"
  59. syn match   laceNumber        "-\=\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\)\=\([eE][-+]\=\d\+\(_\d\+\)*\)\="
  60. syn match   laceNumber        "-\=\.\d\+\(_\d\+\)*\([eE][-+]\=\d\+\(_\d\+\)*\)\="
  61. syn match   laceComment        "--.*" contains=laceTodo
  62.  
  63.  
  64. syn case match
  65.  
  66. " Case sensitive stuff
  67.  
  68. syn keyword laceTodo        TODO XXX FIXME
  69. syn match    laceClassName    "\<[A-Z][A-Z0-9_]*\>"
  70. syn match    laceCluster        "[a-zA-Z][a-zA-Z0-9_]*\s*:"
  71. syn match    laceCluster        "[a-zA-Z][a-zA-Z0-9_]*\s*(\s*[a-zA-Z][a-zA-Z0-9_]*\s*)\s*:"
  72.  
  73. " Catch mismatched parentheses
  74. syn match laceParenError    ")"
  75. syn match laceBracketError    "\]"
  76. syn region laceGeneric        transparent matchgroup=laceBrackets start="\[" end="\]" contains=ALLBUT,laceBracketError
  77. syn region laceParen        transparent start="(" end=")" contains=ALLBUT,laceParenError
  78.  
  79. " Should suffice for even very long strings and expressions
  80. syn sync lines=40
  81.  
  82. if !exists("did_lace_syntax_inits")
  83.   let did_lace_syntax_inits = 1
  84.   " The default methods for highlighting.  Can be overridden later
  85.   hi link laceTopStruct            PreProc
  86.  
  87.   hi link laceOptionClause        Statement
  88.   hi link laceOptionMark        Constant
  89.   hi link laceClusterProp        Label
  90.   hi link laceAdaptClassName    Label
  91.   hi link laceExternal            Statement
  92.   hi link laceCluster            ModeMsg
  93.  
  94.   hi link laceEscape            Special
  95.  
  96.   hi link laceBool                Boolean
  97.   hi link laceString            String
  98.   hi link laceCharacter            Character
  99.   hi link laceClassName            Type
  100.   hi link laceNumber            Number
  101.  
  102.   hi link laceOperator            Special
  103.   hi link laceArray                Special
  104.   hi link laceExport            Special
  105.   hi link laceCreation            Special
  106.   hi link laceBrackets            Special
  107.   hi link laceConstraint        Special
  108.  
  109.   hi link laceComment            Comment
  110.  
  111.   hi link laceError                Error
  112.   hi link laceStringError        Error
  113.   hi link laceParenError        Error
  114.   hi link laceBracketError        Error
  115.   hi link laceTodo                Todo
  116. endif
  117.  
  118. let b:current_syntax = "lace"
  119.  
  120. " vim: ts=4
  121.