📄 y.tab.c
字号:
yyval.st_var=(_selectedtables_type *)malloc(sizeof(_selectedtables_type));
yyval.st_var->table=yyvsp[0].yych;
yyval.st_var->next_st=NULL;
st_end=yyval.st_var;
}break;case 13:#line 167 "no_help.y"{
yyval.st_var=yyvsp[-2].st_var;
st_var1=(_selectedtables_type *)malloc(sizeof(_selectedtables_type));
st_var1->table=yyvsp[0].yych;
st_var1->next_st=NULL;
st_end->next_st=st_var1; /*建立表名的连接*/
st_end=st_var1;
}break;case 14:#line 177 "no_help.y"{
yyval.sf_var=yyvsp[0].sf_var;
sf_end=yyval.sf_var; /*第一个字段名称*/
}break;case 15:#line 182 "no_help.y"{
yyval.sf_var=yyvsp[-2].sf_var;
sf_end->next_sf=yyvsp[0].sf_var; /*建立字段名的连接*/
sf_end=yyvsp[0].sf_var;
}break;case 16:#line 189 "no_help.y"{
yyval.sf_var=(_selectedfields_type *)malloc(sizeof(_selectedfields_type));
yyval.sf_var->table=(char *)malloc(sizeof(10)); /*为以后填上表名预留空间*/
yyval.sf_var->table[0]='\0';
yyval.sf_var->field=yyvsp[0].yych;
yyval.sf_var->next_sf=NULL;
}break;case 17:#line 197 "no_help.y"{
yyval.sf_var=(_selectedfields_type *)malloc(sizeof(_selectedfields_type));
yyval.sf_var->table=yyvsp[-2].yych;
yyval.sf_var->field=yyvsp[0].yych;
yyval.sf_var->next_sf=NULL;
}break;case 22:#line 214 "no_help.y"{
yyval.cs_var=(_createstruct_type *)malloc(sizeof(_createstruct_type));
yyval.cs_var->table=yyvsp[-4].yych;
yyval.cs_var->fdef=yyvsp[-2].cfdef_var;
}break;case 23:#line 221 "no_help.y"{
yyval.cfdef_var=yyvsp[0].cfdef_var;
cfdef_end=yyvsp[0].cfdef_var;
}break;case 24:#line 226 "no_help.y"{
yyval.cfdef_var=yyvsp[-2].cfdef_var;
cfdef_end->next_fdef=yyvsp[0].cfdef_var;
cfdef_end=yyvsp[0].cfdef_var;
}break;case 25:#line 233 "no_help.y"{
yyval.cfdef_var=(_createfieldsdef_type *)malloc(sizeof(_createfieldsdef_type));
yyval.cfdef_var->field=yyvsp[-1].yych;
if (strlen(yyvsp[0].yych)==0) /*表示类型为int的时候,用0表示类型,长度定为4*/
{yyval.cfdef_var->type="0";
yyval.cfdef_var->length="4";
yyval.cfdef_var->next_fdef=NULL;
}
else if(strcmp(yyvsp[0].yych,"d")==0)
{
yyval.cfdef_var->type="3";
yyval.cfdef_var->length="8";
yyval.cfdef_var->next_fdef=NULL;
}
else /*表示类型为char的时候,用1表示类型,长度定为$2*/
{yyval.cfdef_var->type="1";
yyval.cfdef_var->length="8";
yyval.cfdef_var->next_fdef=NULL;
}
}break;case 26:#line 256 "no_help.y"{yyval.yych=yyvsp[-1].yych;}break;case 27:#line 258 "no_help.y"{yyval.yych="\0";}break;case 28:#line 260 "no_help.y"{yyval.yych="d";}break;case 29:#line 265 "no_help.y"{
yyval.is_var=(_insertstruct_type *)malloc(sizeof(_insertstruct_type));
yyval.is_var->table=yyvsp[-6].yych;
yyval.is_var->ifs=yyvsp[-5].if_var;
yyval.is_var->iv=yyvsp[-2].iv_var;
}break;case 30:#line 273 "no_help.y"{
yyval.if_var=(_insertfields_type *)malloc(sizeof(_insertfields_type));
yyval.if_var->field=(char *)malloc(sizeof(10));
yyval.if_var->field="";
yyval.if_var->next_if=(_insertfields_type *)malloc(sizeof(_insertfields_type));
yyval.if_var->next_if=NULL;
}break;case 31:#line 281 "no_help.y"{
yyval.if_var=yyvsp[-1].if_var;
}break;case 32:#line 286 "no_help.y"{
yyval.if_var=(_insertfields_type *)malloc(sizeof(_insertfields_type));
yyval.if_var->field=yyvsp[0].yych;
yyval.if_var->next_if=NULL;
if_end=yyval.if_var;
}break;case 33:#line 293 "no_help.y"{
yyval.if_var=yyvsp[-2].if_var;
if_var1=(_insertfields_type *)malloc(sizeof(_insertfields_type));
if_var1->field=yyvsp[0].yych;
if_var1->next_if=NULL;
if_end->next_if=if_var1;
if_end=if_var1;
}break;case 34:#line 303 "no_help.y"{
yyval.iv_var=yyvsp[0].iv_var;
yyval.iv_var->next_iv=NULL;
iv_end=yyval.iv_var;
}break;case 35:#line 309 "no_help.y"{
yyval.iv_var=yyvsp[-2].iv_var;
iv_end->next_iv=yyvsp[0].iv_var;
iv_end=yyvsp[0].iv_var;
}break;case 36:#line 316 "no_help.y"{
yyval.iv_var=(_insertvalues_type *)malloc(sizeof(_insertvalues_type));
yyval.iv_var->value=yyvsp[-1].yych;
yyval.iv_var->type='1';
yyval.iv_var->next_iv=NULL;
}break;case 37:#line 323 "no_help.y"{
yyval.iv_var=(_insertvalues_type *)malloc(sizeof(_insertvalues_type));
yyval.iv_var->value=yyvsp[-1].yych;
yyval.iv_var->type='1';
yyval.iv_var->next_iv=NULL;
}break;case 38:#line 330 "no_help.y"{
yyval.iv_var=(_insertvalues_type *)malloc(sizeof(_insertvalues_type));
yyval.iv_var->value=yyvsp[0].yych;
yyval.iv_var->type='0';
yyval.iv_var->next_iv=NULL;
}break;case 39:#line 340 "no_help.y"{
yyval.ds_var=(_deletestruct_type *)malloc(sizeof(_deletestruct_type));
yyval.ds_var->table=yyvsp[-3].yych;
yyval.ds_var->cons=yyvsp[-1].cons_var;
}break;case 40:#line 346 "no_help.y"{
yyval.ds_var=(_deletestruct_type *)malloc(sizeof(_deletestruct_type));
yyval.ds_var->table=yyvsp[-1].yych;
yyval.ds_var->cons=NULL;
}break;case 41:#line 355 "no_help.y"{
yyval.cons_var=yyvsp[0].cons_var;
}break;case 42:#line 359 "no_help.y"{
yyval.cons_var=(_conditions_type *)malloc(sizeof(_conditions_type));
yyval.cons_var->left=yyvsp[-5].cons_var;
yyval.cons_var->right=yyvsp[-1].cons_var;
yyval.cons_var->comp_op='a';
}break;case 43:#line 366 "no_help.y"{
yyval.cons_var=(_conditions_type *)malloc(sizeof(_conditions_type));
yyval.cons_var->left=yyvsp[-5].cons_var;
yyval.cons_var->right=yyvsp[-1].cons_var;
yyval.cons_var->comp_op='o';
}break;case 44:#line 374 "no_help.y"{
yyval.cons_var=(_conditions_type *)malloc(sizeof(_conditions_type));
yyval.cons_var->left=yyvsp[-2].cons_var;
yyval.cons_var->comp_op=yyvsp[-1].char_var;
yyval.cons_var->right=yyvsp[0].cons_var;
}break;case 45:#line 382 "no_help.y"{yyval.cons_var=yyvsp[0].cons_var;
yyval.cons_var->comp_op='\0';
yyval.cons_var->type='2';
yyval.cons_var->left=NULL;
yyval.cons_var->right=NULL;
}break;case 46:#line 390 "no_help.y"{
yyval.cons_var=yyvsp[0].cons_var;
yyval.cons_var->comp_op='\0';
yyval.cons_var->type='2';
yyval.cons_var->left=NULL;
yyval.cons_var->right=NULL;
}break;case 47:#line 398 "no_help.y"{
yyval.cons_var=(_conditions_type *)malloc(sizeof(_conditions_type));
yyval.cons_var->left=NULL;
yyval.cons_var->right=NULL;
yyval.cons_var->comp_op='\0';
yyval.cons_var->type='1';
yyval.cons_var->value=yyvsp[-1].yych;
}break;case 48:#line 407 "no_help.y"{
yyval.cons_var=(_conditions_type *)malloc(sizeof(_conditions_type));
yyval.cons_var->left=NULL;
yyval.cons_var->right=NULL;
yyval.cons_var->comp_op='\0';
yyval.cons_var->type='1';
yyval.cons_var->value=yyvsp[-1].yych;
}break;case 49:#line 416 "no_help.y"{
yyval.cons_var=(_conditions_type *)malloc(sizeof(_conditions_type));
yyval.cons_var->left=NULL;
yyval.cons_var->right=NULL;
yyval.cons_var->type='0';
yyval.cons_var->value=yyvsp[0].yych;
yyval.cons_var->intval=atoi(yyvsp[0].yych);
}break;case 50:#line 426 "no_help.y"{
yyval.cons_var=(_conditions_type *)malloc(sizeof(_conditions_type));
yyval.cons_var->table=(char *)malloc(sizeof(10)); /*为以后填上表名预留空间*/
yyval.cons_var->table[0]='\0';
yyval.cons_var->value=yyvsp[0].yych;
}break;case 51:#line 433 "no_help.y"{
yyval.cons_var=(_conditions_type *)malloc(sizeof(_conditions_type));
yyval.cons_var->table=yyvsp[-2].yych;
yyval.cons_var->value=yyvsp[0].yych;
}break;case 52:#line 441 "no_help.y"{yyval.char_var='<';
}break;case 53:#line 444 "no_help.y"{yyval.char_var='>';
}break;case 54:#line 447 "no_help.y"{yyval.char_var='=';
}break;case 55:#line 452 "no_help.y"{
show_tables(dic.tab,dic.tab_num); /*显示已经有的表名*/
}break;case 56:#line 456 "no_help.y"{
show_tab_dic(dic.tab,dic.tab_num); /*显示表数据字典*/
}break;case 57:#line 460 "no_help.y"{
show_col_dic(dic.tab,dic.tab_num,dic.col,dic.col_num,yyvsp[0].yych); /*显示相应表的列信息*/
}break;#line 1165 "no_help.c" } yyssp -= yym; yystate = *yyssp; yyvsp -= yym; yym = yylhs[yyn]; if (yystate == 0 && yym == 0) {#if YYDEBUG if (yydebug) printf("%sdebug: after reduction, shifting from state 0 to\ state %d\n", YYPREFIX, YYFINAL);#endif yystate = YYFINAL; *++yyssp = YYFINAL; *++yyvsp = yyval; if (yychar < 0) { if ((yychar = yylex()) < 0) yychar = 0;#if YYDEBUG if (yydebug) { yys = 0; if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, YYFINAL, yychar, yys); }#endif } if (yychar == 0) goto yyaccept; goto yyloop; } if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == yystate) yystate = yytable[yyn]; else yystate = yydgoto[yym];#if YYDEBUG if (yydebug) printf("%sdebug: after reduction, shifting from state %d \to state %d\n", YYPREFIX, *yyssp, yystate);#endif if (yyssp >= yysslim && yygrowstack()) { goto yyoverflow; } *++yyssp = yystate; *++yyvsp = yyval; goto yyloop;yyoverflow: yyerror("yacc stack overflow");yyabort: return (1);yyaccept: return (0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -