Доброго времени суток. помогите начинающему функциональному програмисту есть код на ocaml
.....
if not !Sys.interactive then
let args = parse_cmdline in
deend_use_multi args.deend_multi;
deend_use args.deend;
(* get trace from one source *)
print_string "Getting trace\n";
flush stdout;
let prog =
Printf.printf "statefile %s\n" args.state_file;
List.iter
(fun (x,y) -> Printf.printf "%Lx %Lx\n" x y)
args.state_ranges;
........
let lines = ref [] in
let chan = open_in filename in
try
while true; do
lines := input_line chan :: !lines
done; []
with End_of_file ->
close_in chan;
List.rev !lines
if not !Sys.interactive then
let args = parse_cmdline in
deend_use_multi args.deend_multi;
deend_use args.deend;
(* get trace from one source *)
print_string "Getting trace\n";
flush stdout;
(* get list ijmp not go*)
let filename = "test.ijmp.graphist.result" in
let lines = ref [] in
let chan = open_in filename in
try
while true; do
lines := input_line chan :: !lines
done; []
with End_of_file ->
close_in chan;
List.rev !lines
let prog =
Printf.printf "statefile %s\n" args.state_file;
List.iter
(fun (x,y) -> Printf.printf "%Lx %Lx\n" x y)
args.state_ranges;
ocamlfind ocamldep -I ../ocaml ../trace_mine_2 appreplay.ml > ._d/appreplay.d
File "appreplay.ml", line 606, characters 2-4:
Syntax error
make[3]: *** Deleting file `._d/appreplay.d'
ocamlfind ocamlopt -package gdome2,str,ocamlgraph,extlib,unix -c -I ../ocaml -I ../trace_mine_2 -I ../stp/ocaml -I ../stp appreplay.ml
File "appreplay.ml", line 606, characters 2-4:
Syntax error
заранее огромное спасибо!