[Top][All Lists]
[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
- calling yyparse repeatedly, Prabhu M.K, 2002/01/23
- Re: calling yyparse repeatedly, Akim Demaille, 2002/01/24
- Re: calling yyparse repeatedly,
Prabhu M.K <=
- Re: calling yyparse repeatedly, Akim Demaille, 2002/01/24
- Re: calling yyparse repeatedly, Prabhu M.K, 2002/01/24
- Re: calling yyparse repeatedly, Akim Demaille, 2002/01/24
- Re: calling yyparse repeatedly, Prabhu M.K, 2002/01/24
- Re: calling yyparse repeatedly, Akim Demaille, 2002/01/24
- Re: calling yyparse repeatedly, Prabhu M.K, 2002/01/24
- Re: calling yyparse repeatedly, Akim Demaille, 2002/01/24
- Re: calling yyparse repeatedly, Anthony DeRobertis, 2002/01/24
- Re: calling yyparse repeatedly, Prabhu M.K, 2002/01/24
- Re: calling yyparse repeatedly, Tim Van Holder, 2002/01/25