equal
deleted
inserted
replaced
289 print(i.toString + ": ") |
289 print(i.toString + ": ") |
290 time(lexing_simp(WHILE_REGS, prog2 * i)) |
290 time(lexing_simp(WHILE_REGS, prog2 * i)) |
291 } |
291 } |
292 |
292 |
293 |
293 |
|
294 val fib = """ |
|
295 write "Fib"; |
|
296 read n; |
|
297 minus1 := 0; |
|
298 minus2 := 1; |
|
299 while n > 0 do { |
|
300 temp := minus2; |
|
301 minus2 := minus1 + minus2; |
|
302 minus1 := temp; |
|
303 n := n - 1 |
|
304 }; |
|
305 write "Result"; |
|
306 write minus2 |
|
307 """ |
|
308 |
|
309 println(env(lexing_simp(WHILE_REGS, prog2)).filterNot{_._1 == "w"}) |