Procedures in SM

This commit is contained in:
Dmitry Boulytchev 2018-03-27 03:13:00 +03:00
parent b4ef95c8bc
commit 087bdfd10a
3 changed files with 65 additions and 30 deletions

View file

@ -42,7 +42,7 @@ let main =
let output =
if interpret
then Language.eval prog input
else failwith "Not implemented yet" (*SM.run (SM.compile prog) input*)
else SM.run (SM.compile prog) input
in
List.iter (fun i -> Printf.printf "%d\n" i) output
| `Fail er -> Printf.eprintf "Syntax error: %s\n" er