# HG changeset patch # User wenzelm # Date 1122646604 -7200 # Node ID 1b4a3110c64a15267f3248155e230bbd8b44cfae # Parent 8dcd14e8db7ae747a0602f6961591dde67246bb6 P.opt_locale_target; diff -r 8dcd14e8db7a -r 1b4a3110c64a src/Pure/proof_general.ML --- a/src/Pure/proof_general.ML Fri Jul 29 15:20:29 2005 +0200 +++ b/src/Pure/proof_general.ML Fri Jul 29 16:16:44 2005 +0200 @@ -858,7 +858,7 @@ val thmnameP = (* see isar_syn.ML/theoremsP *) let val name_facts = P.and_list1 ((P.opt_thm_name "=" --| P.xthms1) >> #1) - val theoremsP = P.locale_target |-- name_facts >> (fn [] => "" | x::_ => x) + val theoremsP = P.opt_locale_target |-- name_facts >> (fn [] => "" | x::_ => x) in theoremsP end @@ -896,12 +896,12 @@ statement >> pair [] || Scan.repeat P.locale_elem_or_expr -- (P.$$$ "shows" |-- statement); val gen_theoremP = - P.locale_target -- Scan.optional (P.opt_thm_name ":" --| + P.opt_locale_target -- Scan.optional (P.opt_thm_name ":" --| Scan.ahead (P.locale_keyword || P.$$$ "shows")) ("", []) -- general_statement >> (fn ((locale, a), (elems, concl)) => fst a) (* a : (bstring * Args.src list) *) - val nameP = P.locale_target |-- (Scan.optional ((P.opt_thm_name ":") >> #1) "") + val nameP = P.opt_locale_target |-- (Scan.optional ((P.opt_thm_name ":") >> #1) "") (* TODO: add preference values for attributes val prefval = XML.element "prefval" [("name","thm-kind"),("value",name)] *)