src/Pure/Isar/isar_syn.ML
changeset 6013 6da9ae6d40f5
parent 5991 832ec852fc4e
child 6108 2c9ed58c30ba
equal deleted inserted replaced
6012:1894bfc4aee9 6013:6da9ae6d40f5
   295 
   295 
   296 (* proof context *)
   296 (* proof context *)
   297 
   297 
   298 val assumeP =
   298 val assumeP =
   299   OuterSyntax.parser false "assume" "assume propositions"
   299   OuterSyntax.parser false "assume" "assume propositions"
   300     (opt_thm_name ":" -- Scan.repeat1 propp >>
   300     (opt_thm_name ":" -- and_list1 propp >>
   301       (fn ((x, y), z) => Toplevel.print o Toplevel.proof (IsarThy.assume x y z)));
   301       (fn ((x, y), z) => Toplevel.print o Toplevel.proof (IsarThy.assume x y z)));
   302 
   302 
   303 val fixP =
   303 val fixP =
   304   OuterSyntax.parser false "fix" "fix variables (Skolem constants)"
   304   OuterSyntax.parser false "fix" "fix variables (Skolem constants)"
   305     (Scan.repeat1 (name -- Scan.option ($$$ "::" |-- typ))
   305     (and_list1 (name -- Scan.option ($$$ "::" |-- typ))
   306       >> (fn xs => Toplevel.print o Toplevel.proof (IsarThy.fix xs)));
   306       >> (fn xs => Toplevel.print o Toplevel.proof (IsarThy.fix xs)));
   307 
   307 
   308 val letP =
   308 val letP =
   309   OuterSyntax.parser false "let" "bind text variables"
   309   OuterSyntax.parser false "let" "bind text variables"
   310     (enum1 "and" (enum1 "as" term -- ($$$ "=" |-- term))
   310     (and_list1 (enum1 "as" term -- ($$$ "=" |-- term))
   311       >> (fn bs => Toplevel.print o Toplevel.proof (IsarThy.match_bind bs)));
   311       >> (fn bs => Toplevel.print o Toplevel.proof (IsarThy.match_bind bs)));
   312 
   312 
   313 
   313 
   314 (* proof structure *)
   314 (* proof structure *)
   315 
   315 
   506   outer_parse.ML, otherwise be prepared for unexpected errors*)
   506   outer_parse.ML, otherwise be prepared for unexpected errors*)
   507 
   507 
   508 val keywords =
   508 val keywords =
   509  ["(", ")", "*", "+", "--", ",", ":", "::", ";", "<", "<=", "=", "==", "=>",
   509  ["(", ")", "*", "+", "--", ",", ":", "::", ";", "<", "<=", "=", "==", "=>",
   510   "?", "[", "]", "and", "as", "binder", "infixl", "infixr", "is",
   510   "?", "[", "]", "and", "as", "binder", "infixl", "infixr", "is",
   511   "mixfix", "output", "{", "|", "}"];
   511   "output", "{", "|", "}"];
   512 
   512 
   513 val parsers = [
   513 val parsers = [
   514   (*theory structure*)
   514   (*theory structure*)
   515   contextP, theoryP, endP,
   515   contextP, theoryP, endP,
   516   (*theory sections*)
   516   (*theory sections*)