annotate runtime/syntax/asm.vim @ 2913:07647a0545c9 v7.3.229

updated for version 7.3.229 Problem: Using fork() makes gvim crash on Mac when build with CoreFoundation. Solution: Disallow fork() when __APPLE__ is defined. (Hisashi T Fujinaka)
author Bram Moolenaar <bram@vim.org>
date Mon, 20 Jun 2011 00:53:15 +0200
parents b9e314fe473f
children ba708ee8d69d
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: GNU Assembler
2042
f3c987fb99b9 Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
3 " Maintainer: Erik Wognsen <erik.wognsen@gmail.com>
f3c987fb99b9 Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
4 " Previous maintainer:
f3c987fb99b9 Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
5 " Kevin Dahlhausen <kdahlhaus@yahoo.com>
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2042
diff changeset
6 " Last Change: 2010 Apr 18
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2042
diff changeset
7
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2042
diff changeset
8 " Thanks to Ori Avtalion for feedback on the comment markers!
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " For version 5.x: Clear all syntax items
2042
f3c987fb99b9 Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
11 " For version 6.0 and later: Quit when a syntax file was already loaded
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " storage types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match asmType "\.long"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match asmType "\.ascii"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match asmType "\.asciz"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match asmType "\.byte"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match asmType "\.double"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match asmType "\.float"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match asmType "\.hword"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match asmType "\.int"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match asmType "\.octa"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match asmType "\.quad"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match asmType "\.short"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match asmType "\.single"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match asmType "\.space"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match asmType "\.string"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match asmType "\.word"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match asmLabel "[a-z_][a-z0-9_]*:"he=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match asmIdentifier "[a-z_][a-z0-9_]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " Various #'s as defined by GAS ref manual sec 3.6.2.1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " Technically, the first decNumber def is actually octal,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " since the value of 0-7 octal is the same as 0-7 decimal,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " I prefer to map it as decimal:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match decNumber "0\+[1-7]\=[\t\n$,; ]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match decNumber "[1-9]\d*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match octNumber "0[0-7][0-7]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match hexNumber "0[xX][0-9a-fA-F]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match binNumber "0[bB][0-1]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2042
diff changeset
50 syn keyword asmTodo contained TODO
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2042
diff changeset
51
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2042
diff changeset
52 " GAS supports various comment markers as described here:
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2042
diff changeset
53 " http://sourceware.org/binutils/docs-2.19/as/Comments.html
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2042
diff changeset
54 " I have commented out the ARM comment marker "@" by default as I think more
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2042
diff changeset
55 " people are using "@" with the .type directive. See
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2042
diff changeset
56 " http://sourceware.org/binutils/docs-2.19/as/Type.html
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2042
diff changeset
57 syn region asmComment start="/\*" end="\*/" contains=asmTodo
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2042
diff changeset
58 syn match asmComment "[#;!|].*" contains=asmTodo
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2042
diff changeset
59 " syn match asmComment "@.*" contains=asmTodo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match asmInclude "\.include"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match asmCond "\.if"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match asmCond "\.else"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match asmCond "\.endif"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match asmMacro "\.macro"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match asmMacro "\.endm"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn match asmDirective "\.[a-z][a-z]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 " 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
76 if version >= 508 || !exists("did_asm_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 let did_asm_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 " The default methods for highlighting. Can be overridden later
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 HiLink asmSection Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 HiLink asmLabel Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 HiLink asmComment Comment
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2042
diff changeset
88 HiLink asmTodo Todo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 HiLink asmDirective Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 HiLink asmInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 HiLink asmCond PreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 HiLink asmMacro Macro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 HiLink hexNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 HiLink decNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 HiLink octNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 HiLink binNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 HiLink asmIdentifier Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 HiLink asmType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 let b:current_syntax = "asm"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 " vim: ts=8