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 / elf.vim < prev    next >
Encoding:
Text File  |  2003-05-04  |  2.7 KB  |  96 lines

  1. " Vim syntax file
  2. " Language:    ELF
  3. " Maintainer:  Christian V. J. Brⁿssow <cvjb@cvjb.de>
  4. " Last Change: Son 22 Sep 2002 00:12:38 CEST
  5. " Filenames:   *.ab,*.am
  6. " URL:           http://www.cvjb.de/comp/vim/elf.vim
  7. " $Id: elf.vim,v 1.2 2002/09/21 22:15:05 bobby Exp bobby $
  8. "
  9. " ELF: Extensible Language Facility
  10. "      This is the Applix Inc., Macro and Builder programming language.
  11. "      It has nothing in common with the binary format called ELF.
  12.  
  13. " For version 5.x: Clear all syntax items
  14. " For version 6.x: Quit when a syntax file was already loaded
  15. if version < 600
  16.    syntax clear
  17. elseif exists("b:current_syntax")
  18.    finish
  19. endif
  20.  
  21. " Case does not matter
  22. syn case ignore
  23.  
  24. " Environments
  25. syn region elfEnvironment transparent matchgroup=Special start="{" matchgroup=Special end="}" contains=ALLBUT,elfBraceError
  26.  
  27. " Unmatched braces
  28. syn match elfBraceError "}"
  29.  
  30. " All macros must have at least one of these definitions
  31. syn keyword elfSpecial endmacro
  32. syn region elfSpecial transparent matchgroup=Special start="^\(\(macro\)\|\(set\)\) \S\+$" matchgroup=Special end="^\(\(endmacro\)\|\(endset\)\)$" contains=ALLBUT,elfBraceError
  33.  
  34. " Preprocessor Commands
  35. syn keyword elfPPCom define include
  36.  
  37. " Some keywords
  38. syn keyword elfKeyword  false true null
  39. syn keyword elfKeyword    var format object function endfunction
  40.  
  41. " Conditionals and loops
  42. syn keyword elfConditional if else case of endcase for to next while until return goto
  43.  
  44. " All built-in elf macros end with an '@'
  45. syn match elfMacro "[0-9_A-Za-z]\+@"
  46.  
  47. " Strings and characters
  48. syn region elfString start=+"+  skip=+\\\\\|\\"+  end=+"+
  49.  
  50. " Numbers
  51. syn match elfNumber "-\=\<[0-9]*\.\=[0-9_]\>"
  52.  
  53. " Comments
  54. syn region elfComment start="/\*"  end="\*/"
  55. syn match elfComment  "\'.*$"
  56.  
  57. syn sync ccomment elfComment
  58.  
  59. " Parenthesis
  60. syn match elfParens "[\[\]()]"
  61.  
  62. " Punctuation
  63. syn match elfPunct "[,;]"
  64.  
  65. " Define the default highlighting.
  66. " For version 5.7 and earlier: only when not done already
  67. " For version 5.8 and later: only when an item doesn't have highlighting yet
  68. if version >= 508 || !exists("did_elf_syn_inits")
  69.    if version < 508
  70.       let did_elf_syn_inits = 1
  71.       command -nargs=+ HiLink hi link <args>
  72.    else
  73.       command -nargs=+ HiLink hi def link <args>
  74.    endif
  75.  
  76.   " The default methods for highlighting. Can be overridden later.
  77.   HiLink elfComment Comment
  78.   HiLink elfPPCom Include
  79.   HiLink elfKeyword Keyword
  80.   HiLink elfSpecial Special
  81.   HiLink elfEnvironment Special
  82.   HiLink elfBraceError Error
  83.   HiLink elfConditional Conditional
  84.   HiLink elfMacro Function
  85.   HiLink elfNumber Number
  86.   HiLink elfString String
  87.   HiLink elfParens Delimiter
  88.   HiLink elfPunct Delimiter
  89.  
  90.   delcommand HiLink
  91. endif
  92.  
  93. let b:current_syntax = "elf"
  94.  
  95. " vim:ts=8:sw=3:
  96.