MCPcopy Create free account
hub / github.com/carbonengine/trinity / yy_shift

Function yy_shift

shadercompiler/lempar.c:647–684  ·  view source on GitHub ↗

** Perform a shift action. */

Source from the content-addressed store, hash-verified

645** Perform a shift action.
646*/
647static void yy_shift(
648 yyParser *yypParser, /* The parser to be shifted */
649 YYACTIONTYPE yyNewState, /* The new state to shift in */
650 YYCODETYPE yyMajor, /* The major token to shift in */
651 ParseTOKENTYPE yyMinor /* The minor token to shift in */
652){
653 yyStackEntry *yytos;
654 yypParser->yytos++;
655#ifdef YYTRACKMAXSTACKDEPTH
656 if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
657 yypParser->yyhwm++;
658 assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
659 }
660#endif
661#if YYSTACKDEPTH>0
662 if( yypParser->yytos>yypParser->yystackEnd ){
663 yypParser->yytos--;
664 yyStackOverflow(yypParser);
665 return;
666 }
667#else
668 if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
669 if( yyGrowStack(yypParser) ){
670 yypParser->yytos--;
671 yyStackOverflow(yypParser);
672 return;
673 }
674 }
675#endif
676 if( yyNewState > YY_MAX_SHIFT ){
677 yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
678 }
679 yytos = yypParser->yytos;
680 yytos->stateno = yyNewState;
681 yytos->major = yyMajor;
682 yytos->minor.yy0 = yyMinor;
683 yyTraceShift(yypParser, yyNewState, "Shift");
684}
685
686/* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side
687** of that rule */

Callers 1

ParseFunction · 0.70

Calls 3

yyStackOverflowFunction · 0.70
yyGrowStackFunction · 0.70
yyTraceShiftFunction · 0.70

Tested by

no test coverage detected