src/Pure/Syntax/syntax.ML
changeset 3739 13f7107676a0
parent 3526 df4d0dad2b4e
child 3779 ce8594f7e0c6
equal deleted inserted replaced
3738:27f7473d029a 3739:13f7107676a0
   351     val {lexicon, gram, parse_ast_trtab, logtypes, ...} = tabs;
   351     val {lexicon, gram, parse_ast_trtab, logtypes, ...} = tabs;
   352     val root' = if root mem logtypes then logic else root;
   352     val root' = if root mem logtypes then logic else root;
   353     val chars = SymbolFont.read_charnames (explode str);
   353     val chars = SymbolFont.read_charnames (explode str);
   354     val pts = parse gram root' (tokenize lexicon xids chars);
   354     val pts = parse gram root' (tokenize lexicon xids chars);
   355 
   355 
   356     fun show_pt pt = warning (str_of_ast (pt_to_ast (K None) pt));
   356     fun show_pt pt =
       
   357       warning (Pretty.string_of (pretty_ast (pt_to_ast (K None) pt)));
   357   in
   358   in
   358     if length pts > ! ambiguity_level then
   359     if length pts > ! ambiguity_level then
   359       (warning ("Ambiguous input " ^ quote str);
   360       (warning ("Ambiguous input " ^ quote str);
   360        warning "produces the following parse trees:";
   361        warning "produces the following parse trees:";
   361        seq show_pt pts)
   362        seq show_pt pts)