mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-24 07:38:46 +00:00
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:
commit
29cd925266
4 changed files with 281 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue