Merge remote-tracking branch 'origin/hw2'

* origin/hw2:
  Fixed common.ml/Syntax.ml
  Fixed common.mlyet again
  Fixed SM.run
  Added SM.run
  Fixed common.ml
  Sync
  Added CONST instruction
This commit is contained in:
Podkopaev Anton 2018-03-06 17:58:54 +03:00
commit 29cd925266
4 changed files with 281 additions and 7 deletions

View file

@ -94,12 +94,9 @@ type t = Stmt.t
(* Top-level evaluator
eval : t -> int list -> int list
eval : int list -> t -> int list
Takes a program and its input stream, and returns the output stream
*)
let eval p i =
let eval i p =
let _, _, o = Stmt.eval (Expr.empty, i, []) p in o
(* Top-level parser *)
let parse = Stmt.parse