src/Pure/System/isabelle_process.scala
changeset 38262 bb2df73fab2c
parent 38259 2b61c5e27399
child 38270 71bb3c273dd1
equal deleted inserted replaced
38261:4863a3816fc1 38262:bb2df73fab2c
   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