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

📄 plural.c

📁 android-w.song.android.widget
💻 C
📖 第 1 页 / 共 3 页
字号:
	goto yyerrlab;      yyn = -yyn;      goto yyreduce;    }  if (yyn == YYFINAL)    YYACCEPT;  /* Shift the look-ahead token.  */  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);  /* Discard the token being shifted unless it is eof.  */  if (yychar != YYEOF)    yychar = YYEMPTY;  *++yyvsp = yylval;  /* Count tokens shifted since error; after three, turn off error     status.  */  if (yyerrstatus)    yyerrstatus--;  yystate = yyn;  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 177 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"    {	    if ((yyvsp[0].exp) == NULL)	      YYABORT;	    ((struct parse_args *) arg)->res = (yyvsp[0].exp);	  }    break;  case 3:#line 185 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"    {	    (yyval.exp) = new_exp_3 (qmop, (yyvsp[-4].exp), (yyvsp[-2].exp), (yyvsp[0].exp));	  }    break;  case 4:#line 189 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"    {	    (yyval.exp) = new_exp_2 (lor, (yyvsp[-2].exp), (yyvsp[0].exp));	  }    break;  case 5:#line 193 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"    {	    (yyval.exp) = new_exp_2 (land, (yyvsp[-2].exp), (yyvsp[0].exp));	  }    break;  case 6:#line 197 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"    {	    (yyval.exp) = new_exp_2 ((yyvsp[-1].op), (yyvsp[-2].exp), (yyvsp[0].exp));	  }    break;  case 7:#line 201 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"    {	    (yyval.exp) = new_exp_2 ((yyvsp[-1].op), (yyvsp[-2].exp), (yyvsp[0].exp));	  }    break;  case 8:#line 205 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"    {	    (yyval.exp) = new_exp_2 ((yyvsp[-1].op), (yyvsp[-2].exp), (yyvsp[0].exp));	  }    break;  case 9:#line 209 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"    {	    (yyval.exp) = new_exp_2 ((yyvsp[-1].op), (yyvsp[-2].exp), (yyvsp[0].exp));	  }    break;  case 10:#line 213 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"    {	    (yyval.exp) = new_exp_1 (lnot, (yyvsp[0].exp));	  }    break;  case 11:#line 217 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"    {	    (yyval.exp) = new_exp_0 (var);	  }    break;  case 12:#line 221 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"    {	    if (((yyval.exp) = new_exp_0 (num)) != NULL)	      (yyval.exp)->val.num = (yyvsp[0].num);	  }    break;  case 13:#line 226 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"    {	    (yyval.exp) = (yyvsp[-1].exp);	  }    break;    }/* Line 1037 of yacc.c.  */#line 1270 "/usr/src/local/bash/bash-20080814/lib/intl/plural.c"  yyvsp -= yylen;  yyssp -= yylen;  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      yyn = yypact[yystate];      if (YYPACT_NINF < yyn && yyn < YYLAST)	{	  YYSIZE_T yysize = 0;	  int yytype = YYTRANSLATE (yychar);	  const char* yyprefix;	  char *yymsg;	  int yyx;	  /* Start YYX at -YYN if negative to avoid negative indexes in	     YYCHECK.  */	  int yyxbegin = yyn < 0 ? -yyn : 0;	  /* Stay within bounds of both yycheck and yytname.  */	  int yychecklim = YYLAST - yyn;	  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;	  int yycount = 0;	  yyprefix = ", expecting ";	  for (yyx = yyxbegin; yyx < yyxend; ++yyx)	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)	      {		yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);		yycount += 1;		if (yycount == 5)		  {		    yysize = 0;		    break;		  }	      }	  yysize += (sizeof ("syntax error, unexpected ")		     + yystrlen (yytname[yytype]));	  yymsg = (char *) YYSTACK_ALLOC (yysize);	  if (yymsg != 0)	    {	      char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");	      yyp = yystpcpy (yyp, yytname[yytype]);	      if (yycount < 5)		{		  yyprefix = ", expecting ";		  for (yyx = yyxbegin; yyx < yyxend; ++yyx)		    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)		      {			yyp = yystpcpy (yyp, yyprefix);			yyp = yystpcpy (yyp, yytname[yyx]);			yyprefix = " or ";		      }		}	      yyerror (yymsg);	      YYSTACK_FREE (yymsg);	    }	  else	    yyerror ("syntax error; also virtual memory exhausted");	}      else#endif /* YYERROR_VERBOSE */	yyerror ("syntax error");    }  if (yyerrstatus == 3)    {      /* If just tried and failed to reuse look-ahead token after an	 error, discard it.  */      if (yychar <= YYEOF)        {          /* If at end of input, pop the error token,	     then the rest of the stack, then return failure.  */	  if (yychar == YYEOF)	     for (;;)	       {		 YYPOPSTACK;		 if (yyssp == yyss)		   YYABORT;		 yydestruct ("Error: popping",                             yystos[*yyssp], yyvsp);	       }        }      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:#ifdef __GNUC__  /* Pacify GCC when the user code never invokes YYERROR and the label     yyerrorlab therefore never appears in user code.  */  if (0)     goto yyerrorlab;#endifyyvsp -= yylen;  yyssp -= yylen;  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;      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:  yydestruct ("Error: discarding lookahead",              yytoken, &yylval);  yychar = YYEMPTY;  yyresult = 1;  goto yyreturn;#ifndef yyoverflow/*----------------------------------------------.| yyoverflowlab -- parser overflow comes here.  |`----------------------------------------------*/yyoverflowlab:  yyerror ("parser stack overflow");  yyresult = 2;  /* Fall through.  */#endifyyreturn:#ifndef yyoverflow  if (yyss != yyssa)    YYSTACK_FREE (yyss);#endif  return yyresult;}#line 231 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"voidinternal_functionFREE_EXPRESSION (exp)     struct expression *exp;{  if (exp == NULL)    return;  /* Handle the recursive case.  */  switch (exp->nargs)    {    case 3:      FREE_EXPRESSION (exp->val.args[2]);      /* FALLTHROUGH */    case 2:      FREE_EXPRESSION (exp->val.args[1]);      /* FALLTHROUGH */    case 1:      FREE_EXPRESSION (exp->val.args[0]);      /* FALLTHROUGH */    default:      break;    }  free (exp);}static intyylex (lval, pexp)     YYSTYPE *lval;     const char **pexp;{  const char *exp = *pexp;  int result;  while (1)    {      if (exp[0] == '\0')	{	  *pexp = exp;	  return YYEOF;	}      if (exp[0] != ' ' && exp[0] != '\t')	break;      ++exp;    }  result = *exp++;  switch (result)    {    case '0': case '1': case '2': case '3': case '4':    case '5': case '6': case '7': case '8': case '9':      {	unsigned long int n = result - '0';	while (exp[0] >= '0' && exp[0] <= '9')	  {	    n *= 10;	    n += exp[0] - '0';	    ++exp;	  }	lval->num = n;	result = NUMBER;      }      break;    case '=':      if (exp[0] == '=')	{	  ++exp;	  lval->op = equal;	  result = EQUOP2;	}      else	result = YYERRCODE;      break;    case '!':      if (exp[0] == '=')	{	  ++exp;	  lval->op = not_equal;	  result = EQUOP2;	}      break;    case '&':    case '|':      if (exp[0] == result)	++exp;      else	result = YYERRCODE;      break;    case '<':      if (exp[0] == '=')	{	  ++exp;	  lval->op = less_or_equal;	}      else	lval->op = less_than;      result = CMPOP2;      break;    case '>':      if (exp[0] == '=')	{	  ++exp;	  lval->op = greater_or_equal;	}      else	lval->op = greater_than;      result = CMPOP2;      break;    case '*':      lval->op = mult;      result = MULOP2;      break;    case '/':      lval->op = divide;      result = MULOP2;      break;    case '%':      lval->op = module;      result = MULOP2;      break;    case '+':      lval->op = plus;      result = ADDOP2;      break;    case '-':      lval->op = minus;      result = ADDOP2;      break;    case 'n':    case '?':    case ':':    case '(':    case ')':      /* Nothing, just return the character.  */      break;    case ';':    case '\n':    case '\0':      /* Be safe and let the user call this function again.  */      --exp;      result = YYEOF;      break;    default:      result = YYERRCODE;#if YYDEBUG != 0      --exp;#endif      break;    }  *pexp = exp;  return result;}static voidyyerror (str)     const char *str;{  /* Do nothing.  We don't print error messages here.  */}

⌨️ 快捷键说明

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