[Flex-help] yy_start and yy_init uninitialized
flex is a tool for generating scanners
Brought to you by:
wlestes
From: Anand A. <ana...@gm...> - 2018-06-06 02:44:15
|
In below code in generated parser, yy_init and yy_start is showing uninitialized value. irrelevant crash (at while ( /* CONSTCOND */ 1) is happening and below code doesn't get executed. My flex is now 3.0.5 > Can this be problem? Right now, after yy.c is generated, I am putting > these values zero above this code. Similarly for yy_buffer_stack and > buffer_stack_max. > Scanner is with reentrant option and prefix option. > With prefix option, yyin is not getting prefix, is it true? > yyin can conflict from first instance of scanner with second instance of > scanner. > > This > if ( !yyg->yy_init ) > { > yyg->yy_init = 1; > > #ifdef YY_USER_INIT > YY_USER_INIT; > #endif > > if ( ! yyg->yy_start ) > yyg->yy_start = 1; /* first start state */ > > if ( ! yyin ) > yyin = stdin; > > >>>> yyg->yy_buffer_stack = NULL; > >>>> yyg->yy_buffer_stack_max = 0; > if ( ! YY_CURRENT_BUFFER ) { > prepyyensure_buffer_stack (yyscanner); > YY_CURRENT_BUFFER_LVALUE = > prepyy_create_buffer(yyin,YY_BUF_SIZE > ,yyscanner); > } > > prepyy_load_buffer_state(yyscanner ); > > Many Thanks, > Anand > > |