src/Pure/Syntax/syntax.ML
changeset 16661 507438b27f66
parent 16613 76e57e08dcb5
child 16669 4748b1adad9c
equal deleted inserted replaced
16660:76613dff2c9a 16661:507438b27f66
   367     fun show_pt pt =
   367     fun show_pt pt =
   368       Pretty.string_of (Ast.pretty_ast (hd (SynTrans.pts_to_asts thy (K NONE) [pt])));
   368       Pretty.string_of (Ast.pretty_ast (hd (SynTrans.pts_to_asts thy (K NONE) [pt])));
   369   in
   369   in
   370     conditional (length pts > ! ambiguity_level) (fn () =>
   370     conditional (length pts > ! ambiguity_level) (fn () =>
   371       if ! ambiguity_is_error then error ("Ambiguous input " ^ quote str)
   371       if ! ambiguity_is_error then error ("Ambiguous input " ^ quote str)
   372       else warning (cat_lines ("Ambiguous input " ^ quote str ::
   372       else (warning ("Ambiguous input " ^ quote str ^ "\n" ^
   373         "produces the following parse trees:" :: map show_pt pts)));
   373           "produces " ^ string_of_int (length pts) ^ " parse trees (see trace).");
       
   374          List.app (tracing o show_pt) pts));
   374     SynTrans.pts_to_asts thy (lookup_tr parse_ast_trtab) pts
   375     SynTrans.pts_to_asts thy (lookup_tr parse_ast_trtab) pts
   375   end;
   376   end;
   376 
   377 
   377 
   378 
   378 (* read *)
   379 (* read *)