Git - code.swisschili.sh
code.swisschili.sh
/
riscv-reference
/
refs/heads/master
/
.
/
tojson.py
blob: f1ac3f850b795b4b841d8fe298858371483b5fba [
file
] [
log
] [
blame
]
swissChili
1c16681
2022-07-16 21:57:06 -0700
[
diff
] [
blame
]
1
import
toml
2
import
json
3
4
data
=
toml
.
load
(
open
(
"instructions.toml"
,
"r"
))
5
6
newdata
=
[]
7
8
for
op
in
data
:
9
vals
=
data
[
op
].
copy
()
10
vals
[
"mnemonic"
]
=
op
11
newdata
.
append
(
vals
)
12
13
json
.
dump
(
newdata
,
open
(
"instructions.json"
,
"w"
))