From e133f250761c67b4465181f41909e78c272901d3 Mon Sep 17 00:00:00 2001 From: Matthew Sotoudeh Date: Mon, 19 Feb 2024 03:42:42 -0800 Subject: Parse trees, dangling else, etc. --- grammars/c/disambiguate.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'grammars/c/disambiguate.c') diff --git a/grammars/c/disambiguate.c b/grammars/c/disambiguate.c index 9a8bf08..a2d69d1 100644 --- a/grammars/c/disambiguate.c +++ b/grammars/c/disambiguate.c @@ -1,8 +1,8 @@ int disambiguator(struct state *old, struct state *new) { - // printf("Old tree: "); - // print_parse_tree2(old); - // printf("New tree: "); - // print_parse_tree2(new); + // printf("Old tree:\n"); + // print_parse_tree(old, 4); + // printf("New tree:\n"); + // print_parse_tree(new, 4); if (old->start_idx != new->start_idx) { // printf("\t\tIGNORING "); print_parse_tree2(old); @@ -44,6 +44,7 @@ int disambiguator(struct state *old, struct state *new) { } } } - printf("TOTALLY UNKNOWN!\n"); + + fprintf(stderr, "TOTALLY UNKNOWN!\n"); return 2; } -- cgit v1.2.3