elf.vim 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. " Vim syntax file
  2. " Language: ELF
  3. " Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
  4. " Last Change: Son 22 Jun 2003 20:43:14 CEST
  5. " Filenames: *.ab,*.am
  6. " URL: http://www.cvjb.de/comp/vim/elf.vim
  7. " $Id: elf.vim,v 1.1 2004/06/13 19:52:27 vimboss Exp $
  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. " quit when a syntax file was already loaded
  13. if exists("b:current_syntax")
  14. finish
  15. endif
  16. " Case does not matter
  17. syn case ignore
  18. " Environments
  19. syn region elfEnvironment transparent matchgroup=Special start="{" matchgroup=Special end="}" contains=ALLBUT,elfBraceError
  20. " Unmatched braces
  21. syn match elfBraceError "}"
  22. " All macros must have at least one of these definitions
  23. syn keyword elfSpecial endmacro
  24. syn region elfSpecial transparent matchgroup=Special start="^\(\(macro\)\|\(set\)\) \S\+$" matchgroup=Special end="^\(\(endmacro\)\|\(endset\)\)$" contains=ALLBUT,elfBraceError
  25. " Preprocessor Commands
  26. syn keyword elfPPCom define include
  27. " Some keywords
  28. syn keyword elfKeyword false true null
  29. syn keyword elfKeyword var format object function endfunction
  30. " Conditionals and loops
  31. syn keyword elfConditional if else case of endcase for to next while until return goto
  32. " All built-in elf macros end with an '@'
  33. syn match elfMacro "[0-9_A-Za-z]\+@"
  34. " Strings and characters
  35. syn region elfString start=+"+ skip=+\\\\\|\\"+ end=+"+
  36. " Numbers
  37. syn match elfNumber "-\=\<[0-9]*\.\=[0-9_]\>"
  38. " Comments
  39. syn region elfComment start="/\*" end="\*/"
  40. syn match elfComment "\'.*$"
  41. syn sync ccomment elfComment
  42. " Parenthesis
  43. syn match elfParens "[\[\]()]"
  44. " Punctuation
  45. syn match elfPunct "[,;]"
  46. " Define the default highlighting.
  47. " Only when an item doesn't have highlighting yet
  48. " The default methods for highlighting. Can be overridden later.
  49. hi def link elfComment Comment
  50. hi def link elfPPCom Include
  51. hi def link elfKeyword Keyword
  52. hi def link elfSpecial Special
  53. hi def link elfEnvironment Special
  54. hi def link elfBraceError Error
  55. hi def link elfConditional Conditional
  56. hi def link elfMacro Function
  57. hi def link elfNumber Number
  58. hi def link elfString String
  59. hi def link elfParens Delimiter
  60. hi def link elfPunct Delimiter
  61. let b:current_syntax = "elf"
  62. " vim:ts=8:sw=4:nocindent:smartindent: