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

📄 cc_command.tab.cpp

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 CPP
📖 第 1 页 / 共 3 页
字号:
#define ACE_CC_YYINITDEPTH 200
#endif

/*  ACE_CC_YYMAXDEPTH is the maximum size the stacks can grow to
    (effective only if the built-in stack extension method is used).  */

#if ACE_CC_YYMAXDEPTH == 0
#undef ACE_CC_YYMAXDEPTH
#endif

#ifndef ACE_CC_YYMAXDEPTH
#define ACE_CC_YYMAXDEPTH 10000
#endif

/* Define __ace_cc_yy_memcpy.  Note that the size argument
   should be passed with type unsigned int, because that is what the non-GCC
   definitions require.  With GCC, __builtin_memcpy takes an arg
   of type size_t, but it can handle unsigned int.  */

#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
#define __ace_cc_yy_memcpy(TO,FROM,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
#else				/* not GNU C or C++ */
#ifndef __cplusplus

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__ace_cc_yy_memcpy (to, from, count)
     char *to;
     char *from;
     unsigned int count;
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#else /* __cplusplus */

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__ace_cc_yy_memcpy (char *to, char *from, unsigned int count)
{
  register char *t = to;
  register char *f = from;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#endif
#endif



/* The user can define ACE_CC_YYPARSE_PARAM as the name of an argument to be passed
   into ace_cc_yyparse.  The argument should have type void *.
   It should actually point to an object.
   Grammar actions can access the variable by casting it
   to the proper pointer type.  */

#ifdef ACE_CC_YYPARSE_PARAM
#ifdef __cplusplus
#define ACE_CC_YYPARSE_PARAM_ARG void *ACE_CC_YYPARSE_PARAM
#define ACE_CC_YYPARSE_PARAM_DECL
#else /* not __cplusplus */
#define ACE_CC_YYPARSE_PARAM_ARG ACE_CC_YYPARSE_PARAM
#define ACE_CC_YYPARSE_PARAM_DECL void *ACE_CC_YYPARSE_PARAM;
#endif /* not __cplusplus */
#else /* not ACE_CC_YYPARSE_PARAM */
#define ACE_CC_YYPARSE_PARAM_ARG
#define ACE_CC_YYPARSE_PARAM_DECL
#endif /* not ACE_CC_YYPARSE_PARAM */

/* Prevent warning if -Wstrict-prototypes.  */
#ifdef __GNUC__
#ifdef ACE_CC_YYPARSE_PARAM
int ace_cc_yyparse (void *);
#else
int ace_cc_yyparse (void);
#endif
#endif

int
ace_cc_yyparse(ACE_CC_YYPARSE_PARAM_ARG)
     ACE_CC_YYPARSE_PARAM_DECL
{
  register int ace_cc_yystate;
  register int ace_cc_yyn;
  register short *ace_cc_yyssp;
  register ACE_CC_YYSTYPE *ace_cc_yyvsp;
  int ace_cc_yyerrstatus;	/*  number of tokens to shift before error messages enabled */
  int ace_cc_yychar1 = 0;		/*  lookahead token as an internal (translated) token number */

  short	ace_cc_yyssa[ACE_CC_YYINITDEPTH];	/*  the state stack			*/
  ACE_CC_YYSTYPE ace_cc_yyvsa[ACE_CC_YYINITDEPTH];	/*  the semantic value stack		*/

  short *ace_cc_yyss = ace_cc_yyssa;		/*  refer to the stacks thru separate pointers */
  ACE_CC_YYSTYPE *ace_cc_yyvs = ace_cc_yyvsa;	/*  to allow ace_cc_yyoverflow to reallocate them elsewhere */

#ifdef ACE_CC_YYLSP_NEEDED
  ACE_CC_YYLTYPE ace_cc_yylsa[ACE_CC_YYINITDEPTH];	/*  the location stack			*/
  ACE_CC_YYLTYPE *ace_cc_yyls = ace_cc_yylsa;
  ACE_CC_YYLTYPE *ace_cc_yylsp;

#define ACE_CC_YYPOPSTACK   (ace_cc_yyvsp--, ace_cc_yyssp--, ace_cc_yylsp--)
#else
#define ACE_CC_YYPOPSTACK   (ace_cc_yyvsp--, ace_cc_yyssp--)
#endif

  int ace_cc_yystacksize = ACE_CC_YYINITDEPTH;
  int ace_cc_yyfree_stacks = 0;

#ifdef ACE_CC_YYPURE
  int ace_cc_yychar;
  ACE_CC_YYSTYPE ace_cc_yylval;
  int ace_cc_yynerrs;
#ifdef ACE_CC_YYLSP_NEEDED
  ACE_CC_YYLTYPE ace_cc_yylloc;
#endif
#endif

  ACE_CC_YYSTYPE ace_cc_yyval;		/*  the variable used to return		*/
				/*  semantic values from the action	*/
				/*  routines				*/

  int ace_cc_yylen;

#if ACE_CC_YYDEBUG != 0
  if (ace_cc_yydebug)
    fprintf(stderr, "Starting parse\n");
#endif

  ace_cc_yystate = 0;
  ace_cc_yyerrstatus = 0;
  ace_cc_yynerrs = 0;
  ace_cc_yychar = ACE_CC_YYEMPTY;		/* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  ace_cc_yyssp = ace_cc_yyss - 1;
  ace_cc_yyvsp = ace_cc_yyvs;
#ifdef ACE_CC_YYLSP_NEEDED
  ace_cc_yylsp = ace_cc_yyls;
#endif

/* Push a new state, which is found in  ace_cc_yystate  .  */
/* In all cases, when you get here, the value and location stacks
   have just been pushed. so pushing a state here evens the stacks.  */
ace_cc_yynewstate:

  *++ace_cc_yyssp = ace_cc_yystate;

  if (ace_cc_yyssp >= ace_cc_yyss + ace_cc_yystacksize - 1)
    {
      /* Give user a chance to reallocate the stack */
      /* Use copies of these so that the &'s don't force the real ones into memory. */
      ACE_CC_YYSTYPE *ace_cc_yyvs1 = ace_cc_yyvs;
      short *ace_cc_yyss1 = ace_cc_yyss;
#ifdef ACE_CC_YYLSP_NEEDED
      ACE_CC_YYLTYPE *ace_cc_yyls1 = ace_cc_yyls;
#endif

      /* Get the current used size of the three stacks, in elements.  */
      int size = ace_cc_yyssp - ace_cc_yyss + 1;

#ifdef ace_cc_yyoverflow
      /* Each stack pointer address is followed by the size of
	 the data in use in that stack, in bytes.  */
#ifdef ACE_CC_YYLSP_NEEDED
      /* This used to be a conditional around just the two extra args,
	 but that might be undefined if ace_cc_yyoverflow is a macro.  */
      ace_cc_yyoverflow("parser stack overflow",
		 &ace_cc_yyss1, size * sizeof (*ace_cc_yyssp),
		 &ace_cc_yyvs1, size * sizeof (*ace_cc_yyvsp),
		 &ace_cc_yyls1, size * sizeof (*ace_cc_yylsp),
		 &ace_cc_yystacksize);
#else
      ace_cc_yyoverflow("parser stack overflow",
		 &ace_cc_yyss1, size * sizeof (*ace_cc_yyssp),
		 &ace_cc_yyvs1, size * sizeof (*ace_cc_yyvsp),
		 &ace_cc_yystacksize);
#endif

      ace_cc_yyss = ace_cc_yyss1; ace_cc_yyvs = ace_cc_yyvs1;
#ifdef ACE_CC_YYLSP_NEEDED
      ace_cc_yyls = ace_cc_yyls1;
#endif
#else /* no ace_cc_yyoverflow */
      /* Extend the stack our own way.  */
      if (ace_cc_yystacksize >= ACE_CC_YYMAXDEPTH)
	{
	  ace_cc_yyerror("parser stack overflow");
	  if (ace_cc_yyfree_stacks)
	    {
	      free (ace_cc_yyss);
	      free (ace_cc_yyvs);
#ifdef ACE_CC_YYLSP_NEEDED
	      free (ace_cc_yyls);
#endif
	    }
	  return 2;
	}
      ace_cc_yystacksize *= 2;
      if (ace_cc_yystacksize > ACE_CC_YYMAXDEPTH)
	ace_cc_yystacksize = ACE_CC_YYMAXDEPTH;
#ifndef ACE_CC_YYSTACK_USE_ALLOCA
      ace_cc_yyfree_stacks = 1;
#endif
      ace_cc_yyss = (short *) ACE_CC_YYSTACK_ALLOC (ace_cc_yystacksize * sizeof (*ace_cc_yyssp));
      __ace_cc_yy_memcpy ((char *)ace_cc_yyss, (char *)ace_cc_yyss1,
		   size * (unsigned int) sizeof (*ace_cc_yyssp));
      ace_cc_yyvs = (ACE_CC_YYSTYPE *) ACE_CC_YYSTACK_ALLOC (ace_cc_yystacksize * sizeof (*ace_cc_yyvsp));
      __ace_cc_yy_memcpy ((char *)ace_cc_yyvs, (char *)ace_cc_yyvs1,
		   size * (unsigned int) sizeof (*ace_cc_yyvsp));
#ifdef ACE_CC_YYLSP_NEEDED
      ace_cc_yyls = (ACE_CC_YYLTYPE *) ACE_CC_YYSTACK_ALLOC (ace_cc_yystacksize * sizeof (*ace_cc_yylsp));
      __ace_cc_yy_memcpy ((char *)ace_cc_yyls, (char *)ace_cc_yyls1,
		   size * (unsigned int) sizeof (*ace_cc_yylsp));
#endif
#endif /* no ace_cc_yyoverflow */

      ace_cc_yyssp = ace_cc_yyss + size - 1;
      ace_cc_yyvsp = ace_cc_yyvs + size - 1;
#ifdef ACE_CC_YYLSP_NEEDED
      ace_cc_yylsp = ace_cc_yyls + size - 1;
#endif

#if ACE_CC_YYDEBUG != 0
      if (ace_cc_yydebug)
	fprintf(stderr, "Stack size increased to %d\n", ace_cc_yystacksize);
#endif

      if (ace_cc_yyssp >= ace_cc_yyss + ace_cc_yystacksize - 1)
	ACE_CC_YYABORT;
    }

#if ACE_CC_YYDEBUG != 0
  if (ace_cc_yydebug)
    fprintf(stderr, "Entering state %d\n", ace_cc_yystate);
#endif

  goto ace_cc_yybackup;
 ace_cc_yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* ace_cc_yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  ace_cc_yyn = ace_cc_yypact[ace_cc_yystate];
  if (ace_cc_yyn == ACE_CC_YYFLAG)
    goto ace_cc_yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* ace_cc_yychar is either ACE_CC_YYEMPTY or ACE_CC_YYEOF
     or a valid token in external form.  */

  if (ace_cc_yychar == ACE_CC_YYEMPTY)
    {
#if ACE_CC_YYDEBUG != 0
      if (ace_cc_yydebug)
	fprintf(stderr, "Reading a token: ");
#endif
      ace_cc_yychar = ACE_CC_YYLEX;
    }

  /* Convert token to internal form (in ace_cc_yychar1) for indexing tables with */

  if (ace_cc_yychar <= 0)		/* This means end of input. */
    {
      ace_cc_yychar1 = 0;
      ace_cc_yychar = ACE_CC_YYEOF;		/* Don't call ACE_CC_YYLEX any more */

#if ACE_CC_YYDEBUG != 0
      if (ace_cc_yydebug)
	fprintf(stderr, "Now at end of input.\n");
#endif
    }
  else
    {
      ace_cc_yychar1 = ACE_CC_YYTRANSLATE(ace_cc_yychar);

#if ACE_CC_YYDEBUG != 0
      if (ace_cc_yydebug)
	{
	  fprintf (stderr, "Next token is %d (%s", ace_cc_yychar, ace_cc_yytname[ace_cc_yychar1]);
	  /* Give the individual parser a way to print the precise meaning
	     of a token, for further debugging info.  */
#ifdef ACE_CC_YYPRINT
	  ACE_CC_YYPRINT (stderr, ace_cc_yychar, ace_cc_yylval);
#endif
	  fprintf (stderr, ")\n");
	}
#endif
    }

  ace_cc_yyn += ace_cc_yychar1;
  if (ace_cc_yyn < 0 || ace_cc_yyn > ACE_CC_YYLAST || ace_cc_yycheck[ace_cc_yyn] != ace_cc_yychar1)
    goto ace_cc_yydefault;

  ace_cc_yyn = ace_cc_yytable[ace_cc_yyn];

  /* ace_cc_yyn is what to do for this token type in this state.
     Negative => reduce, -ace_cc_yyn is rule number.
     Positive => shift, ace_cc_yyn is new state.
       New state is final state => don't bother to shift,
       just return success.
     0, or most negative number => error.  */

  if (ace_cc_yyn < 0)
    {
      if (ace_cc_yyn == ACE_CC_YYFLAG)
	goto ace_cc_yyerrlab;
      ace_cc_yyn = -ace_cc_yyn;
      goto ace_cc_yyreduce;
    }
  else if (ace_cc_yyn == 0)
    goto ace_cc_yyerrlab;

  if (ace_cc_yyn == ACE_CC_YYFINAL)
    ACE_CC_YYACCEPT;

  /* Shift the lookahead token.  */

#if ACE_CC_YYDEBUG != 0
  if (ace_cc_yydebug)
    fprintf(stderr, "Shifting token %d (%s), ", ace_cc_yychar, ace_cc_yytname[ace_cc_yychar1]);
#endif

  /* Discard the token being shifted unless it is eof.  */
  if (ace_cc_yychar != ACE_CC_YYEOF)
    ace_cc_yychar = ACE_CC_YYEMPTY;

  *++ace_cc_yyvsp = ace_cc_yylval;
#ifdef ACE_CC_YYLSP_NEEDED
  *++ace_cc_yylsp = ace_cc_yylloc;
#endif

  /* count tokens shifted since error; after three, turn off error status.  */
  if (ace_cc_yyerrstatus) ace_cc_yyerrstatus--;

  ace_cc_yystate = ace_cc_yyn;
  goto ace_cc_yynewstate;

/* Do the default action for the current state.  */
ace_cc_yydefault:

⌨️ 快捷键说明

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