src/Pure/Isar/isar_syn.ML
changeset 8500 efa136cbde29
parent 8464 0f78101b249a
child 8521 4e42e1734004
equal deleted inserted replaced
8499:8958ece3bbdf 8500:efa136cbde29
    24     (OuterSyntax.theory_header >> (Toplevel.print oo IsarThy.theory));
    24     (OuterSyntax.theory_header >> (Toplevel.print oo IsarThy.theory));
    25 
    25 
    26 val end_excursionP =
    26 val end_excursionP =
    27   OuterSyntax.command "end" "end current excursion" K.thy_end
    27   OuterSyntax.command "end" "end current excursion" K.thy_end
    28     (Scan.succeed (Toplevel.print o Toplevel.exit));
    28     (Scan.succeed (Toplevel.print o Toplevel.exit));
    29 
       
    30 val kill_excursionP =
       
    31   OuterSyntax.improper_command "kill" "kill current excursion" K.control
       
    32     (Scan.succeed (Toplevel.print o Toplevel.kill));
       
    33 
    29 
    34 val contextP =
    30 val contextP =
    35   OuterSyntax.improper_command "context" "switch theory context" K.thy_switch
    31   OuterSyntax.improper_command "context" "switch theory context" K.thy_switch
    36     (P.name >> (Toplevel.print oo IsarThy.context));
    32     (P.name >> (Toplevel.print oo IsarThy.context));
    37 
    33 
   458 
   454 
   459 val undoP =
   455 val undoP =
   460   OuterSyntax.improper_command "undo" "undo last command" K.control
   456   OuterSyntax.improper_command "undo" "undo last command" K.control
   461     (Scan.succeed (Toplevel.print o IsarCmd.undo));
   457     (Scan.succeed (Toplevel.print o IsarCmd.undo));
   462 
   458 
       
   459 val killP =
       
   460   OuterSyntax.improper_command "kill" "kill current history node" K.control
       
   461     (Scan.succeed (Toplevel.print o IsarCmd.kill));
       
   462 
   463 
   463 
   464 
   464 
   465 (** diagnostic commands (for interactive mode only) **)
   465 (** diagnostic commands (for interactive mode only) **)
   466 
   466 
   467 val opt_modes = Scan.optional (P.$$$ "(" |-- P.!!! (Scan.repeat1 P.xname --| P.$$$ ")")) [];
   467 val opt_modes = Scan.optional (P.$$$ "(" |-- P.!!! (Scan.repeat1 P.xname --| P.$$$ ")")) [];
   624   "concl", "files", "in", "infixl", "infixr", "is", "output", "{",
   624   "concl", "files", "in", "infixl", "infixr", "is", "output", "{",
   625   "|", "}"];
   625   "|", "}"];
   626 
   626 
   627 val parsers = [
   627 val parsers = [
   628   (*theory structure*)
   628   (*theory structure*)
   629   theoryP, end_excursionP, kill_excursionP, contextP,
   629   theoryP, end_excursionP, contextP,
   630   (*markup commands*)
   630   (*markup commands*)
   631   headerP, chapterP, sectionP, subsectionP, subsubsectionP, textP,
   631   headerP, chapterP, sectionP, subsectionP, subsubsectionP, textP,
   632   text_rawP, sectP, subsectP, subsubsectP, txtP, txt_rawP,
   632   text_rawP, sectP, subsectP, subsubsectP, txtP, txt_rawP,
   633   (*theory sections*)
   633   (*theory sections*)
   634   classesP, classrelP, defaultsortP, typedeclP, typeabbrP, nontermP,
   634   classesP, classrelP, defaultsortP, typedeclP, typeabbrP, nontermP,
   641   theoremP, lemmaP, showP, haveP, thusP, henceP, assumeP, presumeP,
   641   theoremP, lemmaP, showP, haveP, thusP, henceP, assumeP, presumeP,
   642   defP, fixP, letP, caseP, thenP, fromP, withP, noteP, beginP, endP,
   642   defP, fixP, letP, caseP, thenP, fromP, withP, noteP, beginP, endP,
   643   nextP, qedP, terminal_proofP, immediate_proofP, default_proofP,
   643   nextP, qedP, terminal_proofP, immediate_proofP, default_proofP,
   644   skip_proofP, forget_proofP, deferP, preferP, applyP, apply_endP,
   644   skip_proofP, forget_proofP, deferP, preferP, applyP, apply_endP,
   645   proofP, alsoP, finallyP, backP, cannot_undoP, clear_undosP, redoP,
   645   proofP, alsoP, finallyP, backP, cannot_undoP, clear_undosP, redoP,
   646   undos_proofP, kill_proofP, undoP,
   646   undos_proofP, kill_proofP, undoP, killP,
   647   (*diagnostic commands*)
   647   (*diagnostic commands*)
   648   pretty_setmarginP, print_commandsP, print_contextP, print_theoryP,
   648   pretty_setmarginP, print_commandsP, print_contextP, print_theoryP,
   649   print_syntaxP, print_theoremsP, print_attributesP, print_methodsP,
   649   print_syntaxP, print_theoremsP, print_attributesP, print_methodsP,
   650   thms_containingP, print_bindsP, print_lthmsP, print_casesP,
   650   thms_containingP, print_bindsP, print_lthmsP, print_casesP,
   651   print_thmsP, print_propP, print_termP, print_typeP,
   651   print_thmsP, print_propP, print_termP, print_typeP,