src/Pure/Isar/isar_syn.ML
changeset 7415 bd819d0255e1
parent 7368 6b1b6b7c1df0
child 7462 f738df1d82e1
equal deleted inserted replaced
7414:9bc7797d1249 7415:bd819d0255e1
    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 
    29 
    30 val kill_excursionP =
    30 val kill_excursionP =
    31   OuterSyntax.improper_command "kill" "kill current excursion" K.control
    31   OuterSyntax.improper_command "kill" "kill current excursion" K.control
    32     (Scan.succeed (Toplevel.print o IsarCmd.kill_theory));
    32     (Scan.succeed (Toplevel.print o Toplevel.kill));
    33 
    33 
    34 val contextP =
    34 val contextP =
    35   OuterSyntax.improper_command "context" "switch theory context" K.thy_switch
    35   OuterSyntax.improper_command "context" "switch theory context" K.thy_switch
    36     (P.name >> (Toplevel.print oo IsarThy.context));
    36     (P.name >> (Toplevel.print oo IsarThy.context));
    37 
    37 
   315       (P.$$$ "==" |-- P.termp)) >> P.triple1) -- P.marg_comment
   315       (P.$$$ "==" |-- P.termp)) >> P.triple1) -- P.marg_comment
   316       >> (Toplevel.print oo (Toplevel.proof o IsarThy.local_def)));
   316       >> (Toplevel.print oo (Toplevel.proof o IsarThy.local_def)));
   317 
   317 
   318 val fixP =
   318 val fixP =
   319   OuterSyntax.command "fix" "fix variables (Skolem constants)" K.prf_asm
   319   OuterSyntax.command "fix" "fix variables (Skolem constants)" K.prf_asm
   320     (Scan.repeat1 (P.name -- Scan.option (P.$$$ "::" |-- P.typ)) -- P.marg_comment
   320     (P.and_list1 (Scan.repeat1 P.name -- Scan.option (P.$$$ "::" |-- P.typ) -- P.marg_comment)
   321       >> (Toplevel.print oo (Toplevel.proof o IsarThy.fix)));
   321       >> (Toplevel.print oo (Toplevel.proof o IsarThy.fix)));
   322 
   322 
   323 val letP =
   323 val letP =
   324   OuterSyntax.command "let" "bind text variables" K.prf_decl
   324   OuterSyntax.command "let" "bind text variables" K.prf_decl
   325     (P.and_list1 (P.enum1 "as" P.term -- (P.$$$ "=" |-- P.term) -- P.marg_comment)
   325     (P.and_list1 (P.enum1 "as" P.term -- (P.$$$ "=" |-- P.term) -- P.marg_comment)
   565 
   565 
   566 (*keep keywords consistent with the parsers, including those in
   566 (*keep keywords consistent with the parsers, including those in
   567   outer_parse.ML, otherwise be prepared for unexpected errors*)
   567   outer_parse.ML, otherwise be prepared for unexpected errors*)
   568 
   568 
   569 val keywords =
   569 val keywords =
   570  ["!", "!!", "%", "%%", "(", ")", "*", "+", ",", "--", ":", "::", ";",
   570  ["!", "!!", "%", "%%", "(", ")", "+", ",", "--", ":", "::", ";", "<",
   571   "<", "<=", "=", "==", "=>", "?", "[", "]", "and", "as", "binder",
   571   "<=", "=", "==", "=>", "?", "[", "]", "and", "as", "binder",
   572   "concl", "files", "infixl", "infixr", "is", "output", "{", "|",
   572   "concl", "files", "infixl", "infixr", "is", "output", "{", "|",
   573   "}"];
   573   "}"];
   574 
   574 
   575 val parsers = [
   575 val parsers = [
   576   (*theory structure*)
   576   (*theory structure*)