aboutsummaryrefslogtreecommitdiff
path: root/lpprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'lpprint.c')
-rw-r--r--lpprint.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/lpprint.c b/lpprint.c
index 03239fd..0730ca9 100644
--- a/lpprint.c
+++ b/lpprint.c
@@ -165,7 +165,8 @@ static const char *tagnames[] = {
165 "not", "and", 165 "not", "and",
166 "call", "opencall", "rule", "grammar", 166 "call", "opencall", "rule", "grammar",
167 "behind", 167 "behind",
168 "capture", "run-time" 168 "capture", "run-time",
169 "throw", "labeled-choice" /* labeled failure */
169}; 170};
170 171
171 172
@@ -193,7 +194,7 @@ void printtree (TTree *tree, int ident) {
193 } 194 }
194 case TBehind: { 195 case TBehind: {
195 printf(" %d\n", tree->u.n); 196 printf(" %d\n", tree->u.n);
196 printtree(sib1(tree), ident + 2); 197 printtree(sib1(tree), ident + 2);
197 break; 198 break;
198 } 199 }
199 case TCapture: { 200 case TCapture: {
@@ -216,8 +217,15 @@ void printtree (TTree *tree, int ident) {
216 assert(rule->tag == TTrue); /* sentinel */ 217 assert(rule->tag == TTrue); /* sentinel */
217 break; 218 break;
218 } 219 }
220 case TThrow: { /* labeled failure */
221 printf(" labels: %d\n", tree->labels);
222 break;
223 }
219 default: { 224 default: {
220 int sibs = numsiblings[tree->tag]; 225 int sibs = numsiblings[tree->tag];
226 if (tree->tag == TLabChoice) { /* labeled failure */
227 printf(" labels: %d\n", tree->labels);
228 }
221 printf("\n"); 229 printf("\n");
222 if (sibs >= 1) { 230 if (sibs >= 1) {
223 printtree(sib1(tree), ident + 2); 231 printtree(sib1(tree), ident + 2);