Re: [Flex-help] yy_start and yy_init uninitialized
flex is a tool for generating scanners
Brought to you by:
wlestes
|
From: Will E. <wes...@gm...> - 2018-06-06 09:43:54
|
Your parser is generated by bison, not flex. "3.0.5" is a bison version number, not a flex version number.
On Wednesday, 6 June 2018, 8:14 am +0530, Anand Akhare <ana...@gm...> wrote:
> 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
> >
> >
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> --
> Flex-help mailing list
> Fle...@li...
> https://lists.sourceforge.net/lists/listinfo/flex-help
--
Will Estes
Flex Project Maintainer
wes...@gm...
https://github.com/westes/flex
|