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