| changeset 212 | c86e40fb3b21 |
| parent 195 | 4bacbe753e66 |
| 211:1859d978b18e | 212:c86e40fb3b21 |
|---|---|
238 "\n return 0;\n}" |
238 "\n return 0;\n}" |
239 } |
239 } |
240 |
240 |
241 def compile(name: String, prog: String) = { |
241 def compile(name: String, prog: String) = { |
242 val fw = new java.io.FileWriter(name + ".c") |
242 val fw = new java.io.FileWriter(name + ".c") |
243 fw.write(compile_str(prog)) |
243 val is = compile_str(prog) |
244 println(is) |
|
245 fw.write(is) |
|
244 fw.close() |
246 fw.close() |
245 } |
247 } |
246 |
248 |
247 import sys.process._ |
249 import sys.process._ |
248 |
250 |