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