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 / cdl.vim < prev    next >
Encoding:
Text File  |  2010-08-15  |  3.4 KB  |  90 lines

  1. " Vim syntax file
  2. " Language: Comshare Dimension Definition Language
  3. " Maintainer:    Raul Segura Acevedo <raulseguraaceved@netscape.net>
  4. " Last change:    2001 Jul 31
  5.  
  6. if version < 600
  7.     syntax clear
  8. elseif exists("b:current_syntax")
  9.     finish
  10. endif
  11.  
  12. sy case ignore
  13. sy sync fromstart
  14. sy keyword    cdlStatement    dimension hierarchy group grouphierarchy schedule class
  15. sy keyword    cdlType        add update file category main altername removeall required notrequired
  16. sy keyword    cdlConditional    if then elseif else endif and or not cons rpt xlt
  17. sy keyword    cdlFunction    ChildOf IChildOf LeafChildOf DescendantOf IDescendantOf LeafDescendantOf MemberIs CountOf
  18.  
  19. sy keyword    cdlIdentifier    contained id name desc description xlttype precision symbol curr_ name group_name rate_name
  20. sy keyword    cdlIdentifier    contained xcheck endbal accounttype natsign consolidate formula pctown usage periodicity
  21. sy match    cdlIdentifier    contained 'child\s*name'
  22. sy match    cdlIdentifier    contained 'parent\s*name'
  23. sy match    cdlIdentifier    contained 'grp\s*description'
  24. sy match    cdlIdentifier    contained 'grpchild\s*name'
  25. sy match    cdlIdentifier    contained 'grpparent\s*name'
  26. sy match    cdlIdentifier    contained 'preceding\s*member'
  27. sy match    cdlIdentifier    contained 'unit\s*name'
  28. sy match    cdlIdentifier    contained 'unit\s*id'
  29. sy match    cdlIdentifier    contained 'schedule\s*name'
  30. sy match    cdlIdentifier    contained 'schedule\s*id'
  31.  
  32. sy match    cdlString    /\[[^]]*]/    contains=cdlRestricted,cdlNotSupported
  33. sy match    cdlRestricted    contained /[&*,_]/
  34. " not supported , [, ]
  35. sy match    cdlNotSupported    contained /[:"!']/
  36.  
  37. sy keyword    cdlTodo        contained TODO FIXME XXX
  38. sy cluster    cdlCommentGroup contains=cdlTodo
  39. sy match    cdlComment    '//.*' contains=@cdlCommentGroup
  40. sy region    cdlComment    start="/\*" end="\*/" contains=@cdlCommentGroup fold
  41. sy match    cdlCommentE    "\*/"
  42.  
  43. sy region    cdlParen    transparent start='(' end=')' contains=ALLBUT,cdlParenE,cdlRestricted,cdlNotSupported
  44. "sy region    cdlParen    transparent start='(' end=')' contains=cdlIdentifier,cdlComment,cdlParenWordE
  45. sy match    cdlParenE    ")"
  46. "sy match    cdlParenWordE    contained "\k\+"
  47.  
  48. sy keyword    cdlFxType    allocation downfoot expr xltgain
  49. "sy keyword    cdlFxType    contained allocation downfoot expr xltgain
  50. "sy region    cdlFx        transparent start='\k\+(' end=')' contains=cdlConditional,cdlFunction,cdlString,cdlComment,cdlFxType
  51.  
  52. set foldmethod=expr
  53. set foldexpr=(getline(v:lnum+1)=~'{'\|\|getline(v:lnum)=~'//\\s\\*\\{5}.*table')?'>1':1
  54. %foldo!
  55. set foldmethod=manual
  56. let b:match_words='\<if\>:\<then\>:\<elseif\>:\<else\>:\<endif\>'
  57.  
  58. " Define the default highlighting.
  59. " For version 5.7 and earlier: only when not done already
  60. " For version 5.8 and later: only when an item doesn't have highlighting yet
  61. if version >= 508 || !exists("did_csc_syntax_inits")
  62.     if version < 508
  63.         let did_csc_syntax_inits = 1
  64.         command -nargs=+ HiLink hi link <args>
  65.     else
  66.         command -nargs=+ HiLink hi def link <args>
  67.     endif
  68.  
  69.     HiLink cdlStatement    Statement
  70.     HiLink cdlType        Type
  71.     HiLink cdlFxType    Type
  72.     HiLink cdlIdentifier    Identifier
  73.     HiLink cdlString    String
  74.     HiLink cdlRestricted    WarningMsg
  75.     HiLink cdlNotSupported    ErrorMsg
  76.     HiLink cdlTodo        Todo
  77.     HiLink cdlComment    Comment
  78.     HiLink cdlCommentE    ErrorMsg
  79.     HiLink cdlParenE    ErrorMsg
  80.     HiLink cdlParenWordE    ErrorMsg
  81.     HiLink cdlFunction    Function
  82.     HiLink cdlConditional    Conditional
  83.  
  84.     delcommand HiLink
  85. endif
  86.  
  87. let b:current_syntax = "cdl"
  88.  
  89. " vim: ts=8
  90.