|
|
@ -153,15 +153,15 @@ let disassemble_cmd =
|
|
|
|
in
|
|
|
|
in
|
|
|
|
let param =
|
|
|
|
let param =
|
|
|
|
let%map_open input = anon ("<input>" %: string)
|
|
|
|
let%map_open input = anon ("<input>" %: string)
|
|
|
|
and llair =
|
|
|
|
and llair_txt_output =
|
|
|
|
flag "llair" (optional string)
|
|
|
|
flag "llair-txt-output" (optional string)
|
|
|
|
~doc:
|
|
|
|
~doc:
|
|
|
|
"<file> write generated textual LLAIR to <file>, or to standard \
|
|
|
|
"<file> write generated textual LLAIR to <file>, or to standard \
|
|
|
|
output if omitted"
|
|
|
|
output if omitted"
|
|
|
|
in
|
|
|
|
in
|
|
|
|
fun () ->
|
|
|
|
fun () ->
|
|
|
|
let program = unmarshal input () in
|
|
|
|
let program = unmarshal input () in
|
|
|
|
match llair with
|
|
|
|
match llair_txt_output with
|
|
|
|
| None -> Format.printf "%a@." Llair.pp program
|
|
|
|
| None -> Format.printf "%a@." Llair.pp program
|
|
|
|
| Some file ->
|
|
|
|
| Some file ->
|
|
|
|
Out_channel.with_file file ~f:(fun oc ->
|
|
|
|
Out_channel.with_file file ~f:(fun oc ->
|
|
|
|