Mercurial > vim
annotate runtime/syntax/mmix.vim @ 22958:e7c125224b1a
Update runtime files
Commit: https://github.com/vim/vim/commit/4466ad6baa22485abb1147aca3340cced4778a66
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 21 13:16:30 2020 +0100
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 21 Nov 2020 13:30:04 +0100 |
parents | 5b7ea82bc18f |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: MMIX | |
22723 | 3 " Maintainer: Dirk Hüsken, <huesken@informatik.uni-tuebingen.de> |
3557 | 4 " Last Change: 2012 Jun 01 |
5 " (Dominique Pelle added @Spell) | |
7 | 6 " Filenames: *.mms |
7 " URL: http://homepages.uni-tuebingen.de/student/dirk.huesken/vim/syntax/mmix.vim | |
8 | |
9 " Limitations: Comments must start with either % or // | |
3557 | 10 " (preferably %, Knuth-Style) |
7 | 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 | 14 finish |
15 endif | |
16 | |
17 syn case ignore | |
18 | |
19 " MMIX data types | |
20 syn keyword mmixType byte wyde tetra octa | |
21 | |
22 " different literals... | |
23 syn match decNumber "[0-9]*" | |
24 syn match octNumber "0[0-7][0-7]\+" | |
25 syn match hexNumber "#[0-9a-fA-F]\+" | |
3557 | 26 syn region mmixString start=+"+ skip=+\\"+ end=+"+ contains=@Spell |
7 | 27 syn match mmixChar "'.'" |
28 | |
29 " ...and more special MMIX stuff | |
30 syn match mmixAt "@" | |
31 syn keyword mmixSegments Data_Segment Pool_Segment Stack_Segment | |
32 | |
33 syn match mmixIdentifier "[a-z_][a-z0-9_]*" | |
34 | |
35 " labels (for branches etc) | |
36 syn match mmixLabel "^[a-z0-9_:][a-z0-9_]*" | |
37 syn match mmixLabel "[0-9][HBF]" | |
38 | |
39 " pseudo-operations | |
40 syn keyword mmixPseudo is loc greg | |
41 | |
42 " comments | |
3557 | 43 syn match mmixComment "%.*" contains=@Spell |
44 syn match mmixComment "//.*" contains=@Spell | |
45 syn match mmixComment "^\*.*" contains=@Spell | |
7 | 46 |
47 | |
48 syn keyword mmixOpcode trap fcmp fun feql fadd fix fsub fixu | |
49 syn keyword mmixOpcode fmul fcmpe fune feqle fdiv fsqrt frem fint | |
50 | |
51 syn keyword mmixOpcode floti flotui sfloti sflotui i | |
52 syn keyword mmixOpcode muli mului divi divui | |
53 syn keyword mmixOpcode addi addui subi subui | |
54 syn keyword mmixOpcode 2addui 4addui 8addui 16addui | |
55 syn keyword mmixOpcode cmpi cmpui negi negui | |
56 syn keyword mmixOpcode sli slui sri srui | |
57 syn keyword mmixOpcode bnb bzb bpb bodb | |
58 syn keyword mmixOpcode bnnb bnzb bnpb bevb | |
59 syn keyword mmixOpcode pbnb pbzb pbpb pbodb | |
60 syn keyword mmixOpcode pbnnb pbnzb pbnpb pbevb | |
61 syn keyword mmixOpcode csni cszi cspi csodi | |
62 syn keyword mmixOpcode csnni csnzi csnpi csevi | |
63 syn keyword mmixOpcode zsni zszi zspi zsodi | |
64 syn keyword mmixOpcode zsnni zsnzi zsnpi zsevi | |
65 syn keyword mmixOpcode ldbi ldbui ldwi ldwui | |
66 syn keyword mmixOpcode ldti ldtui ldoi ldoui | |
67 syn keyword mmixOpcode ldsfi ldhti cswapi ldunci | |
68 syn keyword mmixOpcode ldvtsi preldi pregoi goi | |
69 syn keyword mmixOpcode stbi stbui stwi stwui | |
70 syn keyword mmixOpcode stti sttui stoi stoui | |
71 syn keyword mmixOpcode stsfi sthti stcoi stunci | |
72 syn keyword mmixOpcode syncdi presti syncidi pushgoi | |
73 syn keyword mmixOpcode ori orni nori xori | |
74 syn keyword mmixOpcode andi andni nandi nxori | |
75 syn keyword mmixOpcode bdifi wdifi tdifi odifi | |
76 syn keyword mmixOpcode muxi saddi mori mxori | |
77 syn keyword mmixOpcode muli mului divi divui | |
78 | |
79 syn keyword mmixOpcode flot flotu sflot sflotu | |
80 syn keyword mmixOpcode mul mulu div divu | |
81 syn keyword mmixOpcode add addu sub subu | |
82 syn keyword mmixOpcode 2addu 4addu 8addu 16addu | |
83 syn keyword mmixOpcode cmp cmpu neg negu | |
84 syn keyword mmixOpcode sl slu sr sru | |
85 syn keyword mmixOpcode bn bz bp bod | |
86 syn keyword mmixOpcode bnn bnz bnp bev | |
87 syn keyword mmixOpcode pbn pbz pbp pbod | |
88 syn keyword mmixOpcode pbnn pbnz pbnp pbev | |
89 syn keyword mmixOpcode csn csz csp csod | |
90 syn keyword mmixOpcode csnn csnz csnp csev | |
91 syn keyword mmixOpcode zsn zsz zsp zsod | |
92 syn keyword mmixOpcode zsnn zsnz zsnp zsev | |
93 syn keyword mmixOpcode ldb ldbu ldw ldwu | |
94 syn keyword mmixOpcode ldt ldtu ldo ldou | |
95 syn keyword mmixOpcode ldsf ldht cswap ldunc | |
96 syn keyword mmixOpcode ldvts preld prego go | |
97 syn keyword mmixOpcode stb stbu stw stwu | |
98 syn keyword mmixOpcode stt sttu sto stou | |
99 syn keyword mmixOpcode stsf stht stco stunc | |
100 syn keyword mmixOpcode syncd prest syncid pushgo | |
101 syn keyword mmixOpcode or orn nor xor | |
102 syn keyword mmixOpcode and andn nand nxor | |
103 syn keyword mmixOpcode bdif wdif tdif odif | |
104 syn keyword mmixOpcode mux sadd mor mxor | |
105 | |
106 syn keyword mmixOpcode seth setmh setml setl inch incmh incml incl | |
107 syn keyword mmixOpcode orh ormh orml orl andh andmh andml andnl | |
108 syn keyword mmixOpcode jmp pushj geta put | |
109 syn keyword mmixOpcode pop resume save unsave sync swym get trip | |
110 syn keyword mmixOpcode set lda | |
111 | |
112 " switch back to being case sensitive | |
113 syn case match | |
114 | |
115 " general-purpose and special-purpose registers | |
116 syn match mmixRegister "$[0-9]*" | |
117 syn match mmixRegister "r[A-Z]" | |
118 syn keyword mmixRegister rBB rTT rWW rXX rYY rZZ | |
119 | |
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 | 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 | 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 | 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 | 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 | 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 | 148 |
149 | |
150 let b:current_syntax = "mmix" | |
151 | |
152 " vim: ts=8 |