annotate runtime/syntax/mmix.vim @ 13699:6b162e33d63a

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