diff -r fddf099a82f8 -r 64ec1884d860 solutions/cw3/parser.sc --- a/solutions/cw3/parser.sc Sat Dec 02 21:37:04 2023 +0000 +++ b/solutions/cw3/parser.sc Wed Feb 21 09:14:12 2024 +0000 @@ -244,6 +244,13 @@ def eval(bl: Block) : Env = eval_bl(bl, Map()) + +//println(tokenise(os.read(os.pwd / "primes.while"))) + +//println(eval(Stmts.parse_all(tokenise(os.read(os.pwd / "primes.while"))).head)) + + + @main def run(file: String) = { val contents = os.read(os.pwd / file) @@ -267,7 +274,7 @@ /* println("Loops eval") val start = System.nanoTime() -println(eval(Stmts.parse_all(tokenise(os.read(os.pwd / "loops.while"))).head)) +println(eval(Stmts.parse_all(tokenise(os.read(os.pwd / "primes.while"))).head)) val end = System.nanoTime() println("Time taken in seconds: ") println((end - start)/(1.0e9))