您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ yy_pop_parser_stack函数代码示例

51自学网 2021-06-03 11:55:03
  C++
这篇教程C++ yy_pop_parser_stack函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中yy_pop_parser_stack函数的典型用法代码示例。如果您正苦于以下问题:C++ yy_pop_parser_stack函数的具体用法?C++ yy_pop_parser_stack怎么用?C++ yy_pop_parser_stack使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了yy_pop_parser_stack函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: configparserFree

/*** Deallocate and destroy a parser.  Destructors are all called for** all stack elements before shutting the parser down.**** Inputs:** <ul>** <li>  A pointer to the parser.  This should be a pointer**       obtained from configparserAlloc.** <li>  A pointer to a function used to reclaim memory obtained**       from malloc.** </ul>*/void configparserFree(  void *p,                    /* The parser to be deleted */  void (*freeProc)(void*)     /* Function used to reclaim memory */){  yyParser *pParser = (yyParser*)p;  if( pParser==0 ) return;  while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);  (*freeProc)((void*)pParser);}
开发者ID:UIKit0,项目名称:ylem,代码行数:21,


示例2: ParseFree

/* ** Deallocate and destroy a parser.  Destructors are all called for** all stack elements before shutting the parser down.**** Inputs:** <ul>** <li>  A pointer to the parser.  This should be a pointer**       obtained from ParseAlloc.** <li>  A pointer to a function used to reclaim memory obtained**       from malloc.** </ul>*/void ParseFree(  void *p,                    /* The parser to be deleted */  void (*freeProc)(void*)     /* Function used to reclaim memory */){  yyParser *pParser = (yyParser*)p;  if( pParser==0 ) return;  while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);#if YYSTACKDEPTH<=0  free(pParser->yystack);#endif  (*freeProc)((void*)pParser);}
开发者ID:eiger,项目名称:earing,代码行数:24,


示例3: sqlite3Fts5ParserFree

/* ** Deallocate and destroy a parser.  Destructors are called for** all stack elements before shutting the parser down.**** If the YYPARSEFREENEVERNULL macro exists (for example because it** is defined in a %include section of the input grammar) then it is** assumed that the input pointer is never NULL.*/void sqlite3Fts5ParserFree(  void *p,                    /* The parser to be deleted */  void (*freeProc)(void*)     /* Function used to reclaim memory */){  yyParser *pParser = (yyParser*)p;#ifndef YYPARSEFREENEVERNULL  if( pParser==0 ) return;#endif  while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);#if YYSTACKDEPTH<=0  free(pParser->yystack);#endif  (*freeProc)((void*)pParser);}
开发者ID:JohnArchieMckown,项目名称:sqlite,代码行数:22,


示例4: yy_accept

/*** The following is executed when the parser accepts*/static void yy_accept(  yyParser *yypParser           /* The parser */){  configparserARG_FETCH;#ifndef NDEBUG  if( yyTraceFILE ){    fprintf(yyTraceFILE,"%sAccept!/n",yyTracePrompt);  }#endif  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);  /* Here code is inserted which will be executed whenever the  ** parser accepts */  configparserARG_STORE; /* Suppress warning about unused %extra_argument variable */}
开发者ID:UIKit0,项目名称:ylem,代码行数:17,


示例5: yy_parse_failed

static void yy_parse_failed(  yyParser *yypParser           /* The parser */){  sqlite3Fts5ParserARG_FETCH;#ifndef NDEBUG  if( yyTraceFILE ){    fprintf(yyTraceFILE,"%sFail!/n",yyTracePrompt);  }#endif  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);  /* Here code is inserted which will be executed whenever the  ** parser fails *//************ Begin %parse_failure code ***************************************//************ End %parse_failure code *****************************************/  sqlite3Fts5ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */}
开发者ID:JohnArchieMckown,项目名称:sqlite,代码行数:16,


示例6: yyStackOverflow

/*** The following routine is called if the stack overflows.*/static void yyStackOverflow(yyParser *yypParser, YYMINORTYPE *yypMinor){   ParseARG_FETCH;   yypParser->yyidx--;#ifndef NDEBUG   if( yyTraceFILE ){     fprintf(yyTraceFILE,"%sStack Overflow!/n",yyTracePrompt);   }#endif   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);   /* Here code is inserted which will execute if the parser   ** stack every overflows */#line 33 "/home/veei/git/calculator/expressions.grammar.y"UNUSED_ARG(yypMinor); #line 655 "/home/veei/git/calculator/expressions.grammar.cpp"   ParseARG_STORE; /* Suppress warning about unused %extra_argument var */}
开发者ID:gitter-badger,项目名称:calculator-2,代码行数:19,


示例7: yy_parse_failed

static void yy_parse_failed(    yyParser *yypParser           /* The parser */) {    DSVariablePoolParserARG_FETCH;#ifndef NDEBUG    if( yyTraceFILE ) {        fprintf(yyTraceFILE,"%sFail!/n",yyTracePrompt);    }#endif    while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);    /* Here code is inserted which will be executed whenever the    ** parser fails */    DSError(M_DS_PARSE ": Parsing failed", A_DS_ERROR);    DSVariablePoolParserARG_STORE; /* Suppress warning about unused %extra_argument variable */}
开发者ID:jlomnitz,项目名称:design-space-toolbox,代码行数:16,


示例8: yyStackOverflow

/*** The following routine is called if the stack overflows.*/static void yyStackOverflow(yyParser *yypParser, YYMINORTYPE *yypMinor){   ParseARG_FETCH;   yypParser->yyidx--;#ifndef NDEBUG   if( yyTraceFILE ){     fprintf(yyTraceFILE,"%sStack Overflow!/n",yyTracePrompt);   }#endif   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);   /* Here code is inserted which will execute if the parser   ** stack every overflows */#line 24 "src/parser.y"    log_err("There was a stack overflow at line: %d", state->line_number);#line 616 "src/parser.c"   ParseARG_STORE; /* Suppress warning about unused %extra_argument var */}
开发者ID:304471720,项目名称:mongrel2,代码行数:20,


示例9: yyStackOverflow

/*** The following routine is called if the stack overflows.*/static void yyStackOverflow(yyParser *yypParser, YYMINORTYPE *yypMinor){   ParseARG_FETCH;   yypParser->yyidx--;#ifndef NDEBUG   if( yyTraceFILE ){     fprintf(yyTraceFILE,"%sStack Overflow!/n",yyTracePrompt);   }#endif   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);   /* Here code is inserted which will execute if the parser   ** stack every overflows */#line 34 "grammar.y"    printf("Stack overflowed, you suck after line: %u./n", state->curline);#line 591 "grammar.c"   ParseARG_STORE; /* Suppress warning about unused %extra_argument var */}
开发者ID:eiger,项目名称:earing,代码行数:20,


示例10: yy_parse_failed

static void yy_parse_failed(  yyParser *yypParser           /* The parser */){  ParseARG_FETCH;#ifndef NDEBUG  if( yyTraceFILE ){    fprintf(yyTraceFILE,"%sFail!/n",yyTracePrompt);  }#endif  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);  /* Here code is inserted which will be executed whenever the  ** parser fails */#line 17 "/home/veei/git/calculator/expressions.grammar.y"    state->syntax_error = 1;#line 1098 "/home/veei/git/calculator/expressions.grammar.cpp"  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */}
开发者ID:gitter-badger,项目名称:calculator-2,代码行数:18,


示例11: yy_parse_failed

static void yy_parse_failed(  yyParser *yypParser           /* The parser */){  ParseARG_FETCH;#ifndef NDEBUG  if( yyTraceFILE ){    fprintf(yyTraceFILE,"%sFail!/n",yyTracePrompt);  }#endif  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);  /* Here code is inserted which will be executed whenever the  ** parser fails */#line 56 "parser.y"  result->error_type = Result::PARSE_ERROR;#line 850 "parser.c"  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */}
开发者ID:chenbk85,项目名称:mozc,代码行数:18,


示例12: yy_parse_failed

/*** The following code executes when the parse fails*/static void yy_parse_failed(  yyParser *yypParser           /* The parser */){  lcn_query_parser_ARG_FETCH;#ifndef NDEBUG  if( yyTraceFILE ){    fprintf(yyTraceFILE,"%sFail!/n",yyTracePrompt);  }#endif  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);  /* Here code is inserted which will be executed whenever the  ** parser fails */#line 78 "query_parser.y"    info->status = LCN_ERR_QUERY_PARSER_SYNTAX_ERROR;#line 808 "query_parser.c"  lcn_query_parser_ARG_STORE; /* Suppress warning about unused %extra_argument variable */}
开发者ID:Moddus,项目名称:lucino,代码行数:21,


示例13: yyStackOverflow

/*** The following routine is called if the stack overflows.*/static void yyStackOverflow(yyParser *yypParser){   sqlite3Fts5ParserARG_FETCH;   yypParser->yyidx--;#ifndef NDEBUG   if( yyTraceFILE ){     fprintf(yyTraceFILE,"%sStack Overflow!/n",yyTracePrompt);   }#endif   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);   /* Here code is inserted which will execute if the parser   ** stack every overflows *//******** Begin %stack_overflow code ******************************************/#line 36 "fts5parse.y"  sqlite3Fts5ParseError(pParse, "fts5: parser stack overflow");#line 697 "fts5parse.c"/******** End %stack_overflow code ********************************************/   sqlite3Fts5ParserARG_STORE; /* Suppress warning about unused %extra_argument var */}
开发者ID:JohnArchieMckown,项目名称:sqlite,代码行数:22,


示例14: yy_parse_failed

/*** The following code executes when the parse fails*/static void yy_parse_failed(  yyParser *yypParser           /* The parser */){  ssiexprparserARG_FETCH;#ifndef NDEBUG  if( yyTraceFILE ){    fprintf(yyTraceFILE,"%sFail!/n",yyTracePrompt);  }#endif  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);  /* Here code is inserted which will be executed whenever the  ** parser fails */#line 14 "./mod_ssi_exprparser.y"  ctx->ok = 0;#line 771 "mod_ssi_exprparser.c"  ssiexprparserARG_STORE; /* Suppress warning about unused %extra_argument variable */}
开发者ID:adalovelace561,项目名称:lighttpd-1.4.x-wolf,代码行数:22,


示例15: yy_accept

/*** The following is executed when the parser accepts*/static void yy_accept(  yyParser *yypParser           /* The parser */){  ParseARG_FETCH;#ifndef NDEBUG  if( yyTraceFILE ){    fprintf(yyTraceFILE,"%sAccept!/n",yyTracePrompt);  }#endif  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);  /* Here code is inserted which will be executed whenever the  ** parser accepts */#line 68 "parser.y"  if (result->error_type == Result::NOT_ACCEPTED) {    result->error_type = Result::ACCEPTED;  }#line 892 "parser.c"  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */}
开发者ID:chenbk85,项目名称:mozc,代码行数:23,


示例16: yy_accept

/*** The following is executed when the parser accepts*/static void yy_accept(  yyParser *yypParser           /* The parser */){  ParseARG_FETCH;#ifndef NDEBUG  if( yyTraceFILE ){    fprintf(yyTraceFILE,"%sAccept!/n",yyTracePrompt);  }#endif  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);  /* Here code is inserted which will be executed whenever the  ** parser accepts *//*********** Begin %parse_accept code *****************************************/#line 37 "grammar.lemon"  pEval->parseOk();#line 895 "grammar.c"/*********** End %parse_accept code *******************************************/  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */}
开发者ID:zhihuitech,项目名称:kicad-source-mirror,代码行数:23,


示例17: yy_shift

/*** Perform a shift action.*/static void yy_shift(  yyParser *yypParser,          /* The parser to be shifted */  int yyNewState,               /* The new state to shift in */  int yyMajor,                  /* The major token to shift in */  YYMINORTYPE *yypMinor         /* Pointer ot the minor token to shift in */){  yyStackEntry *yytos;  yypParser->yyidx++;  if( yypParser->yyidx>=YYSTACKDEPTH ){     configparserARG_FETCH;     yypParser->yyidx--;#ifndef NDEBUG     if( yyTraceFILE ){       fprintf(yyTraceFILE,"%sStack Overflow!/n",yyTracePrompt);     }#endif     while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);     /* Here code is inserted which will execute if the parser     ** stack every overflows */     configparserARG_STORE; /* Suppress warning about unused %extra_argument var */     return;  }  yytos = &yypParser->yystack[yypParser->yyidx];  yytos->stateno = yyNewState;  yytos->major = yyMajor;  yytos->minor = *yypMinor;#ifndef NDEBUG  if( yyTraceFILE && yypParser->yyidx>0 ){    int i;    fprintf(yyTraceFILE,"%sShift %d/n",yyTracePrompt,yyNewState);    fprintf(yyTraceFILE,"%sStack:",yyTracePrompt);    for(i=1; i<=yypParser->yyidx; i++)      fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]);    fprintf(yyTraceFILE,"/n");  }#endif}
开发者ID:UIKit0,项目名称:ylem,代码行数:40,


示例18: configparser

//.........这里部分代码省略.........  do{    yyact = yy_find_shift_action(yypParser,yymajor);    if( yyact<YYNSTATE ){      yy_shift(yypParser,yyact,yymajor,&yyminorunion);      yypParser->yyerrcnt--;      if( yyendofinput && yypParser->yyidx>=0 ){        yymajor = 0;      }else{        yymajor = YYNOCODE;      }    }else if( yyact < YYNSTATE + YYNRULE ){      yy_reduce(yypParser,yyact-YYNSTATE);    }else if( yyact == YY_ERROR_ACTION ){      int yymx;#ifndef NDEBUG      if( yyTraceFILE ){        fprintf(yyTraceFILE,"%sSyntax Error!/n",yyTracePrompt);      }#endif#ifdef YYERRORSYMBOL      /* A syntax error has occurred.      ** The response to an error depends upon whether or not the      ** grammar defines an error token "ERROR".      **      ** This is what we do if the grammar does define ERROR:      **      **  * Call the %syntax_error function.      **      **  * Begin popping the stack until we enter a state where      **    it is legal to shift the error symbol, then shift      **    the error symbol.      **      **  * Set the error count to three.      **      **  * Begin accepting and shifting new tokens.  No new error      **    processing will occur until three tokens have been      **    shifted successfully.      **      */      if( yypParser->yyerrcnt<0 ){        yy_syntax_error(yypParser,yymajor,yyminorunion);      }      yymx = yypParser->yystack[yypParser->yyidx].major;      if( yymx==YYERRORSYMBOL || yyerrorhit ){#ifndef NDEBUG        if( yyTraceFILE ){          fprintf(yyTraceFILE,"%sDiscard input token %s/n",             yyTracePrompt,yyTokenName[yymajor]);        }#endif        yy_destructor(yymajor,&yyminorunion);        yymajor = YYNOCODE;      }else{         while(          yypParser->yyidx >= 0 &&          yymx != YYERRORSYMBOL &&          (yyact = yy_find_shift_action(yypParser,YYERRORSYMBOL)) >= YYNSTATE        ){          yy_pop_parser_stack(yypParser);        }        if( yypParser->yyidx < 0 || yymajor==0 ){          yy_destructor(yymajor,&yyminorunion);          yy_parse_failed(yypParser);          yymajor = YYNOCODE;        }else if( yymx!=YYERRORSYMBOL ){          YYMINORTYPE u2;          u2.YYERRSYMDT = 0;          yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);        }      }      yypParser->yyerrcnt = 3;      yyerrorhit = 1;#else  /* YYERRORSYMBOL is not defined */      /* This is what we do if the grammar does not define ERROR:      **      **  * Report an error message, and throw away the input token.      **      **  * If the input token is $, then fail the parse.      **      ** As before, subsequent error messages are suppressed until      ** three input tokens have been successfully shifted.      */      if( yypParser->yyerrcnt<=0 ){        yy_syntax_error(yypParser,yymajor,yyminorunion);      }      yypParser->yyerrcnt = 3;      yy_destructor(yymajor,&yyminorunion);      if( yyendofinput ){        yy_parse_failed(yypParser);      }      yymajor = YYNOCODE;#endif    }else{      yy_accept(yypParser);      yymajor = YYNOCODE;    }  }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );  return;}
开发者ID:UIKit0,项目名称:ylem,代码行数:101,


示例19: Parse

//.........这里部分代码省略.........		 ** This is what we do if the grammar does define ERROR:		 **		 **  * Call the %syntax_error function.		 **		 **  * Begin popping the stack until we enter a state where		 **    it is legal to shift the error symbol, then shift		 **    the error symbol.		 **		 **  * Set the error count to three.		 **		 **  * Begin accepting and shifting new tokens.  No new error		 **    processing will occur until three tokens have been		 **    shifted successfully.		 **		 */		if (yypParser->yyerrcnt < 0)		  {		      yy_syntax_error (yypParser, yymajor, yyminorunion);		  }		yymx = yypParser->yystack[yypParser->yyidx].major;		if (yymx == YYERRORSYMBOL || yyerrorhit)		  {#ifndef NDEBUG		      if (yyTraceFILE)			{			    fprintf (yyTraceFILE, "%sDiscard input token %s/n",				     yyTracePrompt, yyTokenName[yymajor]);			}#endif		      yy_destructor (yypParser, (YYCODETYPE) yymajor,				     &yyminorunion);		      yymajor = YYNOCODE;		  }		else		  {		      while (yypParser->yyidx >= 0 &&			     yymx != YYERRORSYMBOL &&			     (yyact =			      yy_find_reduce_action (yypParser->yystack						     [yypParser->yyidx].stateno,						     YYERRORSYMBOL)) >=			     YYNSTATE)			{			    yy_pop_parser_stack (yypParser);			}		      if (yypParser->yyidx < 0 || yymajor == 0)			{			    yy_destructor (yypParser, (YYCODETYPE) yymajor,					   &yyminorunion);			    yy_parse_failed (yypParser);			    yymajor = YYNOCODE;			}		      else if (yymx != YYERRORSYMBOL)			{			    YYMINORTYPE u2;			    u2.YYERRSYMDT = 0;			    yy_shift (yypParser, yyact, YYERRORSYMBOL, &u2);			}		  }		yypParser->yyerrcnt = 3;		yyerrorhit = 1;#elif defined(YYNOERRORRECOVERY)		/* If the YYNOERRORRECOVERY macro is defined, then do not attempt to		 ** do any kind of error recovery.  Instead, simply invoke the syntax		 ** error routine and continue going as if nothing had happened.		 **		 ** Applications can set this macro (for example inside %include) if		 ** they intend to abandon the parse upon the first syntax error seen.		 */		yy_syntax_error (yypParser, yymajor, yyminorunion);		yy_destructor (yypParser, (YYCODETYPE) yymajor, &yyminorunion);		yymajor = YYNOCODE;#else /* YYERRORSYMBOL is not defined */		/* This is what we do if the grammar does not define ERROR:		 **		 **  * Report an error message, and throw away the input token.		 **		 **  * If the input token is $, then fail the parse.		 **		 ** As before, subsequent error messages are suppressed until		 ** three input tokens have been successfully shifted.		 */		if (yypParser->yyerrcnt <= 0)		  {		      yy_syntax_error (yypParser, yymajor, yyminorunion);		  }		yypParser->yyerrcnt = 3;		yy_destructor (yypParser, (YYCODETYPE) yymajor, &yyminorunion);		if (yyendofinput)		  {		      yy_parse_failed (yypParser);		  }		yymajor = YYNOCODE;#endif	    }      }    while (yymajor != YYNOCODE && yypParser->yyidx >= 0);    return;}
开发者ID:MarkusMattinen,项目名称:libspatialite,代码行数:101,



注:本文中的yy_pop_parser_stack函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ yy_switch_to_buffer函数代码示例
C++ yy_delete_buffer函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。