src/Pure/Syntax/syntax.ML
changeset 33955 fff6f11b1f09
parent 33919 3711139cffc3
child 33957 e9afca2118d4
equal deleted inserted replaced
33954:1bc3b688548c 33955:fff6f11b1f09
   497     else
   497     else
   498       (warning (cat_lines
   498       (warning (cat_lines
   499         (("Ambiguous input" ^ Position.str_of pos ^
   499         (("Ambiguous input" ^ Position.str_of pos ^
   500           "\nproduces " ^ string_of_int len ^ " parse trees" ^
   500           "\nproduces " ^ string_of_int len ^ " parse trees" ^
   501           (if len <= limit then "" else " (" ^ string_of_int limit ^ " displayed)") ^ ":") ::
   501           (if len <= limit then "" else " (" ^ string_of_int limit ^ " displayed)") ^ ":") ::
   502           map show_pt (Library.take (limit, pts)))));
   502           map show_pt ((uncurry take) (limit, pts)))));
   503     SynTrans.pts_to_asts ctxt (lookup_tr parse_ast_trtab) pts
   503     SynTrans.pts_to_asts ctxt (lookup_tr parse_ast_trtab) pts
   504   end;
   504   end;
   505 
   505 
   506 
   506 
   507 (* read *)
   507 (* read *)
   543               \You may still want to disambiguate your grammar or your input."
   543               \You may still want to disambiguate your grammar or your input."
   544           else (); hd results)
   544           else (); hd results)
   545         else cat_error (ambig_msg ()) (cat_lines
   545         else cat_error (ambig_msg ()) (cat_lines
   546           (("Ambiguous input, " ^ string_of_int len ^ " terms are type correct" ^
   546           (("Ambiguous input, " ^ string_of_int len ^ " terms are type correct" ^
   547             (if len <= limit then "" else " (" ^ string_of_int limit ^ " displayed)") ^ ":") ::
   547             (if len <= limit then "" else " (" ^ string_of_int limit ^ " displayed)") ^ ":") ::
   548             map (Pretty.string_of_term pp) (Library.take (limit, results))))
   548             map (Pretty.string_of_term pp) ((uncurry take) (limit, results))))
   549       end;
   549       end;
   550 
   550 
   551 fun standard_parse_term pp check get_sort map_const map_free map_type map_sort
   551 fun standard_parse_term pp check get_sort map_const map_free map_type map_sort
   552     ctxt is_logtype syn ty (syms, pos) =
   552     ctxt is_logtype syn ty (syms, pos) =
   553   read ctxt is_logtype syn ty (syms, pos)
   553   read ctxt is_logtype syn ty (syms, pos)