src/Pure/Isar/isar_syn.ML
changeset 6501 392333eb31cb
parent 6404 2daaf2943c79
child 6512 d174c937bf93
equal deleted inserted replaced
6500:68ba555ac59a 6501:392333eb31cb
     1 (*  Title:      Pure/Isar/isar_syn.ML
     1 (*  Title:      Pure/Isar/isar_syn.ML
     2     ID:         $Id$
     2     ID:         $Id$
     3     Author:     Markus Wenzel, TU Muenchen
     3     Author:     Markus Wenzel, TU Muenchen
     4 
     4 
     5 Isar/Pure outer syntax.
     5 Isar/Pure outer syntax.
     6 
       
     7 TODO:
       
     8   - '--' (comment) option almost everywhere:
       
     9   - add_parsers: warn if command name coincides with other keyword (if
       
    10     not already present) (!?);
       
    11   - 'result' (interactive): print current result (?);
       
    12   - check evaluation of transformers (exns!);
       
    13   - 'thms': xthms1 (vs. 'thm' (!?));
       
    14 *)
     6 *)
    15 
     7 
    16 signature ISAR_SYN =
     8 signature ISAR_SYN =
    17 sig
     9 sig
    18   val keywords: string list
    10   val keywords: string list
   258     (statement IsarThy.show >> (fn f => Toplevel.print o Toplevel.proof f));
   250     (statement IsarThy.show >> (fn f => Toplevel.print o Toplevel.proof f));
   259 
   251 
   260 val haveP =
   252 val haveP =
   261   OuterSyntax.command "have" "state local goal"
   253   OuterSyntax.command "have" "state local goal"
   262     (statement IsarThy.have >> (fn f => Toplevel.print o Toplevel.proof f));
   254     (statement IsarThy.have >> (fn f => Toplevel.print o Toplevel.proof f));
       
   255 
       
   256 val thusP =
       
   257   OuterSyntax.command "thus" "abbreviates \"then show\""
       
   258     (statement IsarThy.thus >> (fn f => Toplevel.print o Toplevel.proof f));
       
   259 
       
   260 val henceP =
       
   261   OuterSyntax.command "hence" "abbreviates \"then have\""
       
   262     (statement IsarThy.hence >> (fn f => Toplevel.print o Toplevel.proof f));
   263 
   263 
   264 
   264 
   265 (* facts *)
   265 (* facts *)
   266 
   266 
   267 val thenP =
   267 val thenP =
   507   constdefsP, theoremsP, lemmasP, globalP, localP, pathP, useP, mlP,
   507   constdefsP, theoremsP, lemmasP, globalP, localP, pathP, useP, mlP,
   508   setupP, parse_ast_translationP, parse_translationP,
   508   setupP, parse_ast_translationP, parse_translationP,
   509   print_translationP, typed_print_translationP,
   509   print_translationP, typed_print_translationP,
   510   print_ast_translationP, token_translationP, oracleP,
   510   print_ast_translationP, token_translationP, oracleP,
   511   (*proof commands*)
   511   (*proof commands*)
   512   theoremP, lemmaP, showP, haveP, assumeP, fixP, letP, thenP, fromP,
   512   theoremP, lemmaP, showP, haveP, thusP, henceP, assumeP, fixP, letP,
   513   factsP, beginP, nextP, kill_proofP, qed_withP, qedP,
   513   thenP, fromP, factsP, beginP, nextP, kill_proofP, qed_withP, qedP,
   514   terminal_proofP, immediate_proofP, default_proofP, refineP,
   514   terminal_proofP, immediate_proofP, default_proofP, refineP,
   515   then_refineP, proofP, clear_undoP, undoP, redoP, undosP, redosP,
   515   then_refineP, proofP, clear_undoP, undoP, redoP, undosP, redosP,
   516   backP, prevP, upP, topP,
   516   backP, prevP, upP, topP,
   517   (*diagnostic commands*)
   517   (*diagnostic commands*)
   518   print_commandsP, print_theoryP, print_syntaxP, print_attributesP,
   518   print_commandsP, print_theoryP, print_syntaxP, print_attributesP,