equal
deleted
inserted
replaced
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) |