help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: calling yyparse repeatedly


From: Prabhu M.K
Subject: Re: calling yyparse repeatedly
Date: Thu, 24 Jan 2002 15:07:21 +0530

Thanks very much for reply...

Ye I called yylex() twice after yyparse(). It is exactly what u
told(series of 0). What should I do for reinitializing the scanner. The
Scanner generator i use FLEX.
Is that enough if i call yy_flush_buffer() in the <<EOF>> rule??

Iam doing
#define YY_INPUT {extern char *buffer; extern int filelen;
yy_scan_bytes(buffer, filelen);}
for creating buffer for scanner. Is it legal??

Regards
Prabhu M.K


Akim Demaille wrote:

> >>>>> "Prabhu" == Prabhu M K <Prabhu> writes:
>
> Prabhu> Where i am doing wrong....
>
> I guess you are not reinitializing your scanner properly.  Don't just
> change yyin, the poor scanner has caches and needs to be warned when
> you changed your input.  See the documentation of your favorite Lex.
>
> BTW, you should use Bison's YYDEBUG feature, and look what your parser
> receives the second time.  Or, instead of calling yyparse a second
> time, called yylex a couple of times by hand, and look at the result
> (I bet its a series of 0).


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]