3 " Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
4 " Last Change: Son 22 Jun 2003 20:43:14 CEST
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 $
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.
13 " For version 5.x: Clear all syntax items
14 " For version 6.x: Quit when a syntax file was already loaded
17 elseif exists("b:current_syntax")
21 " Case does not matter
25 syn region elfEnvironment transparent matchgroup=Special start="{" matchgroup=Special end="}" contains=ALLBUT,elfBraceError
28 syn match elfBraceError "}"
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
34 " Preprocessor Commands
35 syn keyword elfPPCom define include
38 syn keyword elfKeyword false true null
39 syn keyword elfKeyword var format object function endfunction
41 " Conditionals and loops
42 syn keyword elfConditional if else case of endcase for to next while until return goto
44 " All built-in elf macros end with an '@'
45 syn match elfMacro "[0-9_A-Za-z]\+@"
47 " Strings and characters
48 syn region elfString start=+"+ skip=+\\\\\|\\"+ end=+"+
51 syn match elfNumber "-\=\<[0-9]*\.\=[0-9_]\>"
54 syn region elfComment start="/\*" end="\*/"
55 syn match elfComment "\'.*$"
57 syn sync ccomment elfComment
60 syn match elfParens "[\[\]()]"
63 syn match elfPunct "[,;]"
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")
70 let did_elf_syn_inits = 1
71 command -nargs=+ HiLink hi link <args>
73 command -nargs=+ HiLink hi def link <args>
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
93 let b:current_syntax = "elf"
95 " vim:ts=8:sw=4:nocindent:smartindent: