equal
deleted
inserted
replaced
241 println(s"BF pre-processing of $name") |
241 println(s"BF pre-processing of $name") |
242 val bf_string = bf_str(prog) |
242 val bf_string = bf_str(prog) |
243 println(s"BF parsing (program length ${bf_string.length} characters)") |
243 println(s"BF parsing (program length ${bf_string.length} characters)") |
244 val (time, bf_prog) = |
244 val (time, bf_prog) = |
245 time_needed(1, fastparse.parse(bf_string, Stmts(_)).get.value) |
245 time_needed(1, fastparse.parse(bf_string, Stmts(_)).get.value) |
246 println(s"BF generated WHILE program (needed $time for parsing)") |
246 println(s"BF generated WHILE program (needed $time secs for parsing)") |
247 compile_and_run(bf_prog, name) |
247 compile_and_run(bf_prog, name) |
248 } |
248 } |
249 |
249 |
250 // a benchmark program (counts down from 'Z' to 'A') |
250 // a benchmark program (counts down from 'Z' to 'A') |
251 val bf0 = """>++[<+++++++++++++>-]<[[>+>+<<-]>[<+>-]++++++++ |
251 val bf0 = """>++[<+++++++++++++>-]<[[>+>+<<-]>[<+>-]++++++++ |