equal
deleted
inserted
replaced
340 if (proc == null) error("Cannot output to Isabelle: no process") |
340 if (proc == null) error("Cannot output to Isabelle: no process") |
341 if (closing) error("Cannot output to Isabelle: already closing") |
341 if (closing) error("Cannot output to Isabelle: already closing") |
342 command_input ! Input(" \\<^sync>\n; " + text + " \\<^sync>;\n") |
342 command_input ! Input(" \\<^sync>\n; " + text + " \\<^sync>;\n") |
343 } |
343 } |
344 |
344 |
345 def command(text: String) = input("Isabelle.command " + Isabelle_Syntax.encode_string(text)) |
|
346 |
|
347 def command(props: List[(String, String)], text: String) = |
|
348 input("Isabelle.command " + Isabelle_Syntax.encode_properties(props) + " " + |
|
349 Isabelle_Syntax.encode_string(text)) |
|
350 |
|
351 def ML_val(text: String) = input("ML_val " + Isabelle_Syntax.encode_string(text)) |
|
352 def ML_command(text: String) = input("ML_command " + Isabelle_Syntax.encode_string(text)) |
|
353 |
|
354 def close() = synchronized { // FIXME avoid synchronized |
345 def close() = synchronized { // FIXME avoid synchronized |
355 command_input ! Close |
346 command_input ! Close |
356 closing = true |
347 closing = true |
357 } |
348 } |
358 |
349 |