📄 y.tab.c
字号:
/* Discard the shifted token unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate;/*-----------------------------------------------------------.| yydefault -- do the default action for the current state. |`-----------------------------------------------------------*/yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce;/*-----------------------------.| yyreduce -- Do a reduction. |`-----------------------------*/yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2:#line 54 "../../../cmd/lefty/dot2l/dotparse.y" { D2Lbegin ((yyvsp[(2) - (2)].s)); free ((yyvsp[(2) - (2)].s)); } break; case 3:#line 56 "../../../cmd/lefty/dot2l/dotparse.y" { D2Lend (); } break; case 4:#line 58 "../../../cmd/lefty/dot2l/dotparse.y" { D2Labort (); } break; case 5:#line 60 "../../../cmd/lefty/dot2l/dotparse.y" { D2Labort (); } break; case 6:#line 64 "../../../cmd/lefty/dot2l/dotparse.y" { gtype = "graph"; etype = "--"; } break; case 7:#line 66 "../../../cmd/lefty/dot2l/dotparse.y" { gtype = "strict graph"; etype = "--"; } break; case 8:#line 68 "../../../cmd/lefty/dot2l/dotparse.y" { gtype = "digraph"; etype = "->"; } break; case 9:#line 70 "../../../cmd/lefty/dot2l/dotparse.y" { gtype = "strict digraph"; etype = "->"; } break; case 19:#line 88 "../../../cmd/lefty/dot2l/dotparse.y" {} break; case 20:#line 91 "../../../cmd/lefty/dot2l/dotparse.y" { attrclass = NODE; portstr[0] = '\000'; } break; case 21:#line 92 "../../../cmd/lefty/dot2l/dotparse.y" { attrclass = GRAPH; } break; case 22:#line 96 "../../../cmd/lefty/dot2l/dotparse.y" { (yyval.o) = (yyvsp[(1) - (2)].o); } break; case 23:#line 100 "../../../cmd/lefty/dot2l/dotparse.y" { (yyval.o) = D2Linsertnode ((yyvsp[(1) - (1)].s)); free ((yyvsp[(1) - (1)].s)); } break; case 24:#line 104 "../../../cmd/lefty/dot2l/dotparse.y" { D2Lbeginedge (NODE, (yyvsp[(1) - (1)].o), portstr); portstr[0] = '\000'; } break; case 25:#line 106 "../../../cmd/lefty/dot2l/dotparse.y" { attrclass = EDGE; } break; case 26:#line 108 "../../../cmd/lefty/dot2l/dotparse.y" { D2Lendedge (); attrclass = GRAPH; } break; case 27:#line 110 "../../../cmd/lefty/dot2l/dotparse.y" { D2Lbeginedge (GRAPH, (yyvsp[(1) - (1)].o), ""); } break; case 28:#line 112 "../../../cmd/lefty/dot2l/dotparse.y" { attrclass = EDGE; } break; case 29:#line 114 "../../../cmd/lefty/dot2l/dotparse.y" { D2Lendedge (); attrclass = GRAPH; } break; case 30:#line 118 "../../../cmd/lefty/dot2l/dotparse.y" { D2Lmidedge (NODE, (yyvsp[(2) - (2)].o), portstr); portstr[0] = '\000'; } break; case 31:#line 120 "../../../cmd/lefty/dot2l/dotparse.y" { D2Lmidedge (NODE, (yyvsp[(2) - (2)].o), portstr); portstr[0] = '\000'; } break; case 33:#line 122 "../../../cmd/lefty/dot2l/dotparse.y" { D2Lmidedge (GRAPH, (yyvsp[(2) - (2)].o), ""); portstr[0] = '\000'; } break; case 34:#line 124 "../../../cmd/lefty/dot2l/dotparse.y" { D2Lmidedge (GRAPH, (yyvsp[(2) - (2)].o), ""); portstr[0] = '\000'; } break; case 41:#line 135 "../../../cmd/lefty/dot2l/dotparse.y" { strcat (portstr, (yyvsp[(2) - (2)].s)); free ((yyvsp[(2) - (2)].s)); } break; case 42:#line 139 "../../../cmd/lefty/dot2l/dotparse.y" { strcat (portstr, "("); strcat (portstr, (yyvsp[(3) - (6)].s)); strcat (portstr, ","); strcat (portstr, (yyvsp[(5) - (6)].s)); strcat (portstr, ")"); free ((yyvsp[(3) - (6)].s)), free ((yyvsp[(5) - (6)].s)); } break; case 43:#line 148 "../../../cmd/lefty/dot2l/dotparse.y" { strcat (portstr, "@"); strcat (portstr, (yyvsp[(2) - (2)].s)); free ((yyvsp[(2) - (2)].s)); } break; case 44:#line 154 "../../../cmd/lefty/dot2l/dotparse.y" { inattrstmt = TRUE; } break; case 45:#line 156 "../../../cmd/lefty/dot2l/dotparse.y" { attrclass = GRAPH; inattrstmt = FALSE; } break; case 46:#line 158 "../../../cmd/lefty/dot2l/dotparse.y" { attrclass = GRAPH; } break; case 47:#line 162 "../../../cmd/lefty/dot2l/dotparse.y" { attrclass = GRAPH; } break; case 48:#line 164 "../../../cmd/lefty/dot2l/dotparse.y" { attrclass = NODE; } break; case 49:#line 166 "../../../cmd/lefty/dot2l/dotparse.y" { attrclass = EDGE; } break; case 56:#line 184 "../../../cmd/lefty/dot2l/dotparse.y" { D2Lsetattr ((yyvsp[(1) - (3)].s), (yyvsp[(3) - (3)].s)); free ((yyvsp[(1) - (3)].s)); free ((yyvsp[(3) - (3)].s)); } break; case 59:#line 192 "../../../cmd/lefty/dot2l/dotparse.y" { (yyval.o) = D2Lpopgraph (); } break; case 60:#line 193 "../../../cmd/lefty/dot2l/dotparse.y" { D2Lpushgraph (NULL); } break; case 61:#line 194 "../../../cmd/lefty/dot2l/dotparse.y" { (yyval.o) = D2Lpopgraph (); } break; case 62:#line 196 "../../../cmd/lefty/dot2l/dotparse.y" { (yyval.o) = D2Lpopgraph (); } break; case 63:#line 200 "../../../cmd/lefty/dot2l/dotparse.y" { D2Lpushgraph ((yyvsp[(2) - (2)].s)); free ((yyvsp[(2) - (2)].s)); } break;/* Line 1267 of yacc.c. */#line 1627 "y.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate;/*------------------------------------.| yyerrlab -- here on detecting error |`------------------------------------*/yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs;#if ! YYERROR_VERBOSE yyerror (YY_("syntax error"));#else { YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) { YYSIZE_T yyalloc = 2 * yysize; if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) yyalloc = YYSTACK_ALLOC_MAXIMUM; if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yyalloc); if (yymsg) yymsg_alloc = yyalloc; else { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; } } if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); yyerror (yymsg); } else { yyerror (YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } }#endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse look-ahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1;/*---------------------------------------------------.| yyerrorlab -- error raised explicitly by YYERROR. |`---------------------------------------------------*/yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1;/*-------------------------------------------------------------.| yyerrlab1 -- common code for both syntax error and YYERROR. |`-------------------------------------------------------------*/yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } if (yyn == YYFINAL) YYACCEPT; *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate;/*-------------------------------------.| yyacceptlab -- YYACCEPT comes here. |`-------------------------------------*/yyacceptlab: yyresult = 0; goto yyreturn;/*-----------------------------------.| yyabortlab -- YYABORT comes here. |`-----------------------------------*/yyabortlab: yyresult = 1; goto yyreturn;#ifndef yyoverflow/*-------------------------------------------------.| yyexhaustedlab -- memory exhaustion comes here. |`-------------------------------------------------*/yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */#endifyyreturn: if (yychar != YYEOF && yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); }#ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss);#endif#if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg);#endif /* Make sure YYID is used. */ return YYID (yyresult);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -