Git - code.swisschili.sh
code.swisschili.sh
/
riscv-reference
/
refs/heads/master
/
.
/
tojson.py
blob: f1ac3f850b795b4b841d8fe298858371483b5fba [
file
] [
log
] [
blame
]
import
toml
import
json
data
=
toml
.
load
(
open
(
"instructions.toml"
,
"r"
))
newdata
=
[]
for
op
in
data
:
vals
=
data
[
op
].
copy
()
vals
[
"mnemonic"
]
=
op
newdata
.
append
(
vals
)
json
.
dump
(
newdata
,
open
(
"instructions.json"
,
"w"
))