Removed multiple input functions, added tuples, fixed parser

This commit is contained in:
elvis
2024-11-15 17:23:04 +01:00
parent 0ff17560ee
commit 7ad217dfb0
15 changed files with 808 additions and 307 deletions

View File

@ -1,7 +1,7 @@
open MiniImp
let get_result x =
Lexing.from_string x |> Parser.prg MiniImp.Lexer.lex |> Semantics.reduce
Lexing.from_string x |> Parser.prg Lexer.lex |> Semantics.reduce
(* -------------------------------------------------------------------------- *)
(* Identity program *)
@ -118,7 +118,6 @@ let program =
if (not y == 1) {result := 1} else {skip}
}
}"
;;
(* should return 0 because prime *)