1" Vim syntax file 2" Language: ELF 3" Maintainer: Christian V. J. Br�ssow <[email protected]> 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 13" For version 5.x: Clear all syntax items 14" For version 6.x: Quit when a syntax file was already loaded 15if version < 600 16 syntax clear 17elseif exists("b:current_syntax") 18 finish 19endif 20 21" Case does not matter 22syn case ignore 23 24" Environments 25syn region elfEnvironment transparent matchgroup=Special start="{" matchgroup=Special end="}" contains=ALLBUT,elfBraceError 26 27" Unmatched braces 28syn match elfBraceError "}" 29 30" All macros must have at least one of these definitions 31syn keyword elfSpecial endmacro 32syn region elfSpecial transparent matchgroup=Special start="^\(\(macro\)\|\(set\)\) \S\+$" matchgroup=Special end="^\(\(endmacro\)\|\(endset\)\)$" contains=ALLBUT,elfBraceError 33 34" Preprocessor Commands 35syn keyword elfPPCom define include 36 37" Some keywords 38syn keyword elfKeyword false true null 39syn keyword elfKeyword var format object function endfunction 40 41" Conditionals and loops 42syn keyword elfConditional if else case of endcase for to next while until return goto 43 44" All built-in elf macros end with an '@' 45syn match elfMacro "[0-9_A-Za-z]\+@" 46 47" Strings and characters 48syn region elfString start=+"+ skip=+\\\\\|\\"+ end=+"+ 49 50" Numbers 51syn match elfNumber "-\=\<[0-9]*\.\=[0-9_]\>" 52 53" Comments 54syn region elfComment start="/\*" end="\*/" 55syn match elfComment "\'.*$" 56 57syn sync ccomment elfComment 58 59" Parenthesis 60syn match elfParens "[\[\]()]" 61 62" Punctuation 63syn 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 68if 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 91endif 92 93let b:current_syntax = "elf" 94 95" vim:ts=8:sw=4:nocindent:smartindent: 96