annotate runtime/syntax/mmix.vim @ 4267:22adc26aaa9f v7.3.884

updated for version 7.3.884 Problem: Compiler warning for variable shadowing another. (John Little) Solution: Rename the variable. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Sat, 06 Apr 2013 14:30:40 +0200
parents 9cb3a75a20b9
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: MMIX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Dirk Hüsken, <huesken@informatik.uni-tuebingen.de>
3557
9cb3a75a20b9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 " Last Change: 2012 Jun 01
9cb3a75a20b9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
5 " (Dominique Pelle added @Spell)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Filenames: *.mms
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " URL: http://homepages.uni-tuebingen.de/student/dirk.huesken/vim/syntax/mmix.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " Limitations: Comments must start with either % or //
3557
9cb3a75a20b9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
10 " (preferably %, Knuth-Style)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
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 " MMIX data types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword mmixType byte wyde tetra octa
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " different literals...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match decNumber "[0-9]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match octNumber "0[0-7][0-7]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match hexNumber "#[0-9a-fA-F]\+"
3557
9cb3a75a20b9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
27 syn region mmixString start=+"+ skip=+\\"+ end=+"+ contains=@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match mmixChar "'.'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " ...and more special MMIX stuff
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match mmixAt "@"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword mmixSegments Data_Segment Pool_Segment Stack_Segment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match mmixIdentifier "[a-z_][a-z0-9_]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " labels (for branches etc)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match mmixLabel "^[a-z0-9_:][a-z0-9_]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match mmixLabel "[0-9][HBF]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " pseudo-operations
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword mmixPseudo is loc greg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " comments
3557
9cb3a75a20b9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
44 syn match mmixComment "%.*" contains=@Spell
9cb3a75a20b9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
45 syn match mmixComment "//.*" contains=@Spell
9cb3a75a20b9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
46 syn match mmixComment "^\*.*" contains=@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword mmixOpcode trap fcmp fun feql fadd fix fsub fixu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword mmixOpcode fmul fcmpe fune feqle fdiv fsqrt frem fint
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword mmixOpcode floti flotui sfloti sflotui i
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword mmixOpcode muli mului divi divui
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword mmixOpcode addi addui subi subui
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword mmixOpcode 2addui 4addui 8addui 16addui
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword mmixOpcode cmpi cmpui negi negui
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword mmixOpcode sli slui sri srui
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword mmixOpcode bnb bzb bpb bodb
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword mmixOpcode bnnb bnzb bnpb bevb
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword mmixOpcode pbnb pbzb pbpb pbodb
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword mmixOpcode pbnnb pbnzb pbnpb pbevb
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword mmixOpcode csni cszi cspi csodi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword mmixOpcode csnni csnzi csnpi csevi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword mmixOpcode zsni zszi zspi zsodi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword mmixOpcode zsnni zsnzi zsnpi zsevi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn keyword mmixOpcode ldbi ldbui ldwi ldwui
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword mmixOpcode ldti ldtui ldoi ldoui
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword mmixOpcode ldsfi ldhti cswapi ldunci
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword mmixOpcode ldvtsi preldi pregoi goi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn keyword mmixOpcode stbi stbui stwi stwui
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword mmixOpcode stti sttui stoi stoui
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword mmixOpcode stsfi sthti stcoi stunci
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword mmixOpcode syncdi presti syncidi pushgoi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword mmixOpcode ori orni nori xori
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn keyword mmixOpcode andi andni nandi nxori
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn keyword mmixOpcode bdifi wdifi tdifi odifi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword mmixOpcode muxi saddi mori mxori
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn keyword mmixOpcode muli mului divi divui
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn keyword mmixOpcode flot flotu sflot sflotu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword mmixOpcode mul mulu div divu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword mmixOpcode add addu sub subu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword mmixOpcode 2addu 4addu 8addu 16addu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn keyword mmixOpcode cmp cmpu neg negu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn keyword mmixOpcode sl slu sr sru
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn keyword mmixOpcode bn bz bp bod
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn keyword mmixOpcode bnn bnz bnp bev
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn keyword mmixOpcode pbn pbz pbp pbod
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn keyword mmixOpcode pbnn pbnz pbnp pbev
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn keyword mmixOpcode csn csz csp csod
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn keyword mmixOpcode csnn csnz csnp csev
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn keyword mmixOpcode zsn zsz zsp zsod
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn keyword mmixOpcode zsnn zsnz zsnp zsev
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn keyword mmixOpcode ldb ldbu ldw ldwu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn keyword mmixOpcode ldt ldtu ldo ldou
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn keyword mmixOpcode ldsf ldht cswap ldunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn keyword mmixOpcode ldvts preld prego go
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn keyword mmixOpcode stb stbu stw stwu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn keyword mmixOpcode stt sttu sto stou
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn keyword mmixOpcode stsf stht stco stunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn keyword mmixOpcode syncd prest syncid pushgo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn keyword mmixOpcode or orn nor xor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn keyword mmixOpcode and andn nand nxor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn keyword mmixOpcode bdif wdif tdif odif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn keyword mmixOpcode mux sadd mor mxor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn keyword mmixOpcode seth setmh setml setl inch incmh incml incl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn keyword mmixOpcode orh ormh orml orl andh andmh andml andnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn keyword mmixOpcode jmp pushj geta put
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn keyword mmixOpcode pop resume save unsave sync swym get trip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn keyword mmixOpcode set lda
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 " switch back to being case sensitive
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 " general-purpose and special-purpose registers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 syn match mmixRegister "$[0-9]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn match mmixRegister "r[A-Z]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn keyword mmixRegister rBB rTT rWW rXX rYY rZZ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 " 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
124 if version >= 508 || !exists("did_mmix_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 let did_mmix_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 " The default methods for highlighting. Can be overridden later
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 HiLink mmixAt Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 HiLink mmixPseudo Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 HiLink mmixRegister Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 HiLink mmixSegments Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 HiLink mmixLabel Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 HiLink mmixComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 HiLink mmixOpcode Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 HiLink hexNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 HiLink decNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 HiLink octNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 HiLink mmixString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 HiLink mmixChar String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 HiLink mmixType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 HiLink mmixIdentifier Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 HiLink mmixSpecialComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 " My default color overrides:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 " hi mmixSpecialComment ctermfg=red
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 "hi mmixLabel ctermfg=lightcyan
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 " hi mmixType ctermbg=black ctermfg=brown
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 let b:current_syntax = "mmix"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 " vim: ts=8