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

Function ParseInit

shadercompiler/lempar.c:324–348  ·  view source on GitHub ↗

Initialize a new parser that has already been allocated. */

Source from the content-addressed store, hash-verified

322/* Initialize a new parser that has already been allocated.
323*/
324void ParseInit(void *yypRawParser ParseCTX_PDECL){
325 yyParser *yypParser = (yyParser*)yypRawParser;
326 ParseCTX_STORE
327#ifdef YYTRACKMAXSTACKDEPTH
328 yypParser->yyhwm = 0;
329#endif
330#if YYSTACKDEPTH<=0
331 yypParser->yytos = NULL;
332 yypParser->yystack = NULL;
333 yypParser->yystksz = 0;
334 if( yyGrowStack(yypParser) ){
335 yypParser->yystack = &yypParser->yystk0;
336 yypParser->yystksz = 1;
337 }
338#endif
339#ifndef YYNOERRORRECOVERY
340 yypParser->yyerrcnt = -1;
341#endif
342 yypParser->yytos = yypParser->yystack;
343 yypParser->yystack[0].stateno = 0;
344 yypParser->yystack[0].major = 0;
345#if YYSTACKDEPTH>0
346 yypParser->yystackEnd = &yypParser->yystack[YYSTACKDEPTH-1];
347#endif
348}
349
350#ifndef Parse_ENGINEALWAYSONSTACK
351/*

Callers

nothing calls this directly

Calls 1

yyGrowStackFunction · 0.70

Tested by

no test coverage detected