equal
deleted
inserted
replaced
10 object Protocol |
10 object Protocol |
11 { |
11 { |
12 /* markers for inlined messages */ |
12 /* markers for inlined messages */ |
13 |
13 |
14 val Loading_Theory_Marker = Protocol_Message.Marker("loading_theory") |
14 val Loading_Theory_Marker = Protocol_Message.Marker("loading_theory") |
15 val Export_Marker = Protocol_Message.Marker("export") |
|
16 val Meta_Info_Marker = Protocol_Message.Marker("meta_info") |
15 val Meta_Info_Marker = Protocol_Message.Marker("meta_info") |
17 val Command_Timing_Marker = Protocol_Message.Marker("command_timing") |
16 val Command_Timing_Marker = Protocol_Message.Marker("command_timing") |
18 val Theory_Timing_Marker = Protocol_Message.Marker("theory_timing") |
17 val Theory_Timing_Marker = Protocol_Message.Marker("theory_timing") |
19 val Session_Timing_Marker = Protocol_Message.Marker("session_timing") |
18 val Session_Timing_Marker = Protocol_Message.Marker("session_timing") |
20 val ML_Statistics_Marker = Protocol_Message.Marker("ML_statistics") |
19 val ML_Statistics_Marker = Protocol_Message.Marker("ML_statistics") |
196 executable: Boolean, |
195 executable: Boolean, |
197 compress: Boolean, |
196 compress: Boolean, |
198 strict: Boolean) |
197 strict: Boolean) |
199 { |
198 { |
200 def compound_name: String = isabelle.Export.compound_name(theory_name, name) |
199 def compound_name: String = isabelle.Export.compound_name(theory_name, name) |
201 } |
|
202 |
|
203 object Marker |
|
204 { |
|
205 def unapply(line: String): Option[(Args, Path)] = |
|
206 line match { |
|
207 case Export_Marker(text) => |
|
208 val props = XML.Decode.properties(YXML.parse_body(text)) |
|
209 props match { |
|
210 case |
|
211 List( |
|
212 (Markup.SERIAL, Value.Long(serial)), |
|
213 (Markup.THEORY_NAME, theory_name), |
|
214 (Markup.NAME, name), |
|
215 (Markup.EXECUTABLE, Value.Boolean(executable)), |
|
216 (Markup.COMPRESS, Value.Boolean(compress)), |
|
217 (Markup.STRICT, Value.Boolean(strict)), |
|
218 (Markup.FILE, file)) if isabelle.Path.is_valid(file) => |
|
219 val args = Args(None, serial, theory_name, name, executable, compress, strict) |
|
220 Some((args, isabelle.Path.explode(file))) |
|
221 case _ => None |
|
222 } |
|
223 case _ => None |
|
224 } |
|
225 } |
200 } |
226 |
201 |
227 def unapply(props: Properties.T): Option[Args] = |
202 def unapply(props: Properties.T): Option[Args] = |
228 props match { |
203 props match { |
229 case |
204 case |