⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uparse.c

📁 开源备份软件源码 AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a backup system that a
💻 C
📖 第 1 页 / 共 4 页
字号:
    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 12:#line 75 "uparse.y"    {	    char * errstr = vstralloc("Invalid command: ", yytext, NULL);	    yyerror(errstr);	    amfree(errstr);	    YYERROR;	}    break;  case 13:#line 84 "uparse.y"    { list_host(); }    break;  case 14:#line 85 "uparse.y"    { list_disk((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }    break;  case 15:#line 86 "uparse.y"    { list_disk(NULL); }    break;  case 16:#line 87 "uparse.y"    { set_date((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }    break;  case 17:#line 88 "uparse.y"    { set_host((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }    break;  case 18:#line 89 "uparse.y"    { set_disk((yyvsp[(2) - (3)].strval), (yyvsp[(3) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(3) - (3)].strval)); }    break;  case 19:#line 90 "uparse.y"    { set_disk((yyvsp[(2) - (2)].strval), NULL); amfree((yyvsp[(2) - (2)].strval)); }    break;  case 20:#line 91 "uparse.y"    { set_tape((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }    break;  case 21:#line 92 "uparse.y"    { set_tape("default"); }    break;  case 22:#line 93 "uparse.y"    { set_device(NULL, (yyvsp[(2) - (2)].strval)); }    break;  case 23:#line 94 "uparse.y"    { set_device((yyvsp[(3) - (4)].strval), (yyvsp[(4) - (4)].strval)); }    break;  case 24:#line 95 "uparse.y"    { set_device(NULL, NULL); }    break;  case 25:#line 96 "uparse.y"    { cd_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }    break;  case 26:#line 97 "uparse.y"    { cd_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }    break;  case 27:#line 98 "uparse.y"    {#ifdef SAMBA_CLIENT			 set_mode(SAMBA_SMBCLIENT);#endif /* SAMBA_CLIENT */                    }    break;  case 28:#line 103 "uparse.y"    {#ifdef SAMBA_CLIENT			 set_mode(SAMBA_TAR);#endif /* SAMBA_CLIENT */                    }    break;  case 29:#line 111 "uparse.y"    { list_disk_history(); }    break;  case 30:#line 112 "uparse.y"    { list_directory(); }    break;  case 31:#line 113 "uparse.y"    { display_extract_list((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }    break;  case 32:#line 114 "uparse.y"    { display_extract_list(NULL); }    break;  case 33:#line 115 "uparse.y"    { show_directory(); }    break;  case 34:#line 116 "uparse.y"    { clear_extract_list(); }    break;  case 35:#line 117 "uparse.y"    { show_mode (); }    break;  case 36:#line 121 "uparse.y"    { quit(); }    break;  case 38:#line 129 "uparse.y"    { add_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }    break;  case 39:#line 130 "uparse.y"    { add_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }    break;  case 41:#line 138 "uparse.y"    { add_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }    break;  case 42:#line 139 "uparse.y"    { add_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }    break;  case 44:#line 147 "uparse.y"    { delete_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }    break;  case 45:#line 148 "uparse.y"    { delete_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }    break;  case 47:#line 156 "uparse.y"    { delete_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }    break;  case 48:#line 157 "uparse.y"    { delete_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }    break;  case 49:#line 161 "uparse.y"    { char * buf= g_get_current_dir(); puts(buf); free(buf); }    break;  case 50:#line 162 "uparse.y"    {		local_cd((yyvsp[(2) - (2)].strval));		amfree((yyvsp[(2) - (2)].strval));	}    break;  case 51:#line 169 "uparse.y"    { help_list(); }    break;  case 52:#line 173 "uparse.y"    { extract_files(); }    break;/* Line 1267 of yacc.c.  */#line 1645 "uparse.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);}#line 177 "uparse.y"voidyyerror(    char *	s){	g_printf("%s\n", s);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -