annotate runtime/syntax/elf.vim @ 7927:2a34dd90beba v7.4.1259

commit https://github.com/vim/vim/commit/3fc3e14282c182c046d1335f3d576bc0eeb605c5 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 4 21:53:33 2016 +0100 patch 7.4.1259 Problem: No test for what patch 7.3.414 fixed. Solution: Add a test. (Elias Diem)
author Christian Brabandt <cb@256bit.org>
date Thu, 04 Feb 2016 22:00:04 +0100
parents 7bc41231fbc7
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: ELF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: Son 22 Jun 2003 20:43:14 CEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Filenames: *.ab,*.am
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " URL: http://www.cvjb.de/comp/vim/elf.vim
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
7 " $Id: elf.vim,v 1.1 2004/06/13 19:52:27 vimboss Exp $
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " ELF: Extensible Language Facility
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " This is the Applix Inc., Macro and Builder programming language.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " It has nothing in common with the binary format called ELF.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " Case does not matter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 " Environments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn region elfEnvironment transparent matchgroup=Special start="{" matchgroup=Special end="}" contains=ALLBUT,elfBraceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " Unmatched braces
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match elfBraceError "}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " All macros must have at least one of these definitions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword elfSpecial endmacro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn region elfSpecial transparent matchgroup=Special start="^\(\(macro\)\|\(set\)\) \S\+$" matchgroup=Special end="^\(\(endmacro\)\|\(endset\)\)$" contains=ALLBUT,elfBraceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " Preprocessor Commands
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword elfPPCom define include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 " Some keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword elfKeyword false true null
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword elfKeyword var format object function endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " Conditionals and loops
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword elfConditional if else case of endcase for to next while until return goto
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " All built-in elf macros end with an '@'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match elfMacro "[0-9_A-Za-z]\+@"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " Strings and characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn region elfString start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " Numbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match elfNumber "-\=\<[0-9]*\.\=[0-9_]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn region elfComment start="/\*" end="\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match elfComment "\'.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn sync ccomment elfComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 " Parenthesis
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match elfParens "[\[\]()]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 " Punctuation
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match elfPunct "[,;]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 if version >= 508 || !exists("did_elf_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 let did_elf_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " The default methods for highlighting. Can be overridden later.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink elfComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink elfPPCom Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink elfKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 HiLink elfSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink elfEnvironment Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 HiLink elfBraceError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 HiLink elfConditional Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 HiLink elfMacro Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 HiLink elfNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 HiLink elfString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 HiLink elfParens Delimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 HiLink elfPunct Delimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 let b:current_syntax = "elf"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 " vim:ts=8:sw=4:nocindent:smartindent: