summaryrefslogtreecommitdiff
path: root/grammars/c/disambiguate.c
diff options
context:
space:
mode:
authorMatthew Sotoudeh <matthew@masot.net>2024-02-19 03:42:42 -0800
committerMatthew Sotoudeh <matthew@masot.net>2024-02-19 03:42:42 -0800
commite133f250761c67b4465181f41909e78c272901d3 (patch)
treefc75f55dd2a3f4dddc589a8c259f887e90ef3a1e /grammars/c/disambiguate.c
parentffc6388571004b17e3a3dee2511ec99076ee803a (diff)
Parse trees, dangling else, etc.
Diffstat (limited to 'grammars/c/disambiguate.c')
-rw-r--r--grammars/c/disambiguate.c11
1 files changed, 6 insertions, 5 deletions
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;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback