equal
deleted
inserted
replaced
1172 | "spuriouscmd" => isarscript data |
1172 | "spuriouscmd" => isarscript data |
1173 | "badcmd" => isarscript data |
1173 | "badcmd" => isarscript data |
1174 (* improperproofcmd: improper commands which *do not* belong in script *) |
1174 (* improperproofcmd: improper commands which *do not* belong in script *) |
1175 | "dostep" => isarscript data |
1175 | "dostep" => isarscript data |
1176 | "undostep" => isarcmd "undos_proof 1" |
1176 | "undostep" => isarcmd "undos_proof 1" |
|
1177 | "redostep" => isarcmd "redo" |
1177 | "abortgoal" => isarcmd "ProofGeneral.kill_proof" |
1178 | "abortgoal" => isarcmd "ProofGeneral.kill_proof" |
1178 | "forget" => error "Not implemented" |
1179 | "forget" => error "Not implemented" |
1179 | "restoregoal" => error "Not implemented" (* could just treat as forget? *) |
1180 | "restoregoal" => error "Not implemented" (* could just treat as forget? *) |
1180 (* proofctxt: improper commands *) |
1181 (* proofctxt: improper commands *) |
1181 | "askids" => askids (thyname_attro attrs, objtype_attro attrs) |
1182 | "askids" => askids (thyname_attro attrs, objtype_attro attrs) |
1196 writeln ("Theory \""^thyname^"\" completed.")) |
1197 writeln ("Theory \""^thyname^"\" completed.")) |
1197 end |
1198 end |
1198 (* improperfilecmd: theory-level commands not in script *) |
1199 (* improperfilecmd: theory-level commands not in script *) |
1199 | "doitem" => isarscript data |
1200 | "doitem" => isarscript data |
1200 | "undoitem" => isarcmd "ProofGeneral.undo" |
1201 | "undoitem" => isarcmd "ProofGeneral.undo" |
|
1202 | "redoitem" => isarcmd "ProofGeneral.redo" |
1201 | "aborttheory" => isarcmd ("init_toplevel") |
1203 | "aborttheory" => isarcmd ("init_toplevel") |
1202 | "retracttheory" => isarcmd ("kill_thy " ^ (quote (thyname_attr attrs))) |
1204 | "retracttheory" => isarcmd ("kill_thy " ^ (quote (thyname_attr attrs))) |
1203 | "loadfile" => use_thy_or_ml_file (fileurl_of attrs) |
1205 | "loadfile" => use_thy_or_ml_file (fileurl_of attrs) |
1204 | "openfile" => (inform_file_retracted (fileurl_of attrs); |
1206 | "openfile" => (inform_file_retracted (fileurl_of attrs); |
1205 currently_open_file := SOME (fileurl_of attrs)) |
1207 currently_open_file := SOME (fileurl_of attrs)) |
1287 |
1289 |
1288 val undoP = (* undo without output *) |
1290 val undoP = (* undo without output *) |
1289 OuterSyntax.improper_command "ProofGeneral.undo" "(internal)" K.control |
1291 OuterSyntax.improper_command "ProofGeneral.undo" "(internal)" K.control |
1290 (Scan.succeed (Toplevel.no_timing o IsarCmd.undo)); |
1292 (Scan.succeed (Toplevel.no_timing o IsarCmd.undo)); |
1291 |
1293 |
|
1294 val redoP = (* redo without output *) |
|
1295 OuterSyntax.improper_command "ProofGeneral.redo" "(internal)" K.control |
|
1296 (Scan.succeed (Toplevel.no_timing o IsarCmd.redo)); |
|
1297 |
1292 val context_thy_onlyP = |
1298 val context_thy_onlyP = |
1293 OuterSyntax.improper_command "ProofGeneral.context_thy_only" "(internal)" K.control |
1299 OuterSyntax.improper_command "ProofGeneral.context_thy_only" "(internal)" K.control |
1294 (P.name >> (Toplevel.no_timing oo IsarThy.init_context update_thy_only)); |
1300 (P.name >> (Toplevel.no_timing oo IsarThy.init_context update_thy_only)); |
1295 |
1301 |
1296 val try_context_thy_onlyP = |
1302 val try_context_thy_onlyP = |
1322 OuterSyntax.improper_command "ProofGeneral.process_pgip" "(internal)" K.control |
1328 OuterSyntax.improper_command "ProofGeneral.process_pgip" "(internal)" K.control |
1323 (P.text >> (Toplevel.no_timing oo |
1329 (P.text >> (Toplevel.no_timing oo |
1324 (fn txt => Toplevel.imperative (fn () => process_pgip txt)))); |
1330 (fn txt => Toplevel.imperative (fn () => process_pgip txt)))); |
1325 |
1331 |
1326 fun init_outer_syntax () = OuterSyntax.add_parsers |
1332 fun init_outer_syntax () = OuterSyntax.add_parsers |
1327 [undoP, restartP, kill_proofP, context_thy_onlyP, try_context_thy_onlyP, |
1333 [undoP, redoP, restartP, kill_proofP, context_thy_onlyP, try_context_thy_onlyP, |
1328 inform_file_processedP, inform_file_retractedP, process_pgipP]; |
1334 inform_file_processedP, inform_file_retractedP, process_pgipP]; |
1329 |
1335 |
1330 end; |
1336 end; |
1331 |
1337 |
1332 |
1338 |