help-bison
[Top][All Lists]
Advanced

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

Re: Re: Sequences of calls to yyparse...


From: Bribeiro
Subject: Re: Re: Sequences of calls to yyparse...
Date: Tue, 16 Jul 2002 12:01:40

Thanks for your help!

I did the following: everytime I have to use the parse, I do:

yyin = fopen(fname, "r");
rewind(yyin);
yyrestart(yyin);

and everything is working : )

[],s

Bruno.




------- Original Message --------
De: "Prabhu M.K."
Para: "Bribeiro"
Copia:
Assunto: Re: Sequences of calls to yyparse...
Data: 16/07/02 01:43


Hi,

I 've posted more than few messages like this... I got
the problem solved..

Thanks to Akim Demaille and Hans Aberg.

Only thing u 've to do is call yyterminate() on the
lexer where ur parser going end. Then call
yyrestart(yyin) before calling yyparse again.

Don't forget if ur using "states" on ur lexer then u
have to reset it to orignal starting state.

Is that right Akim and Hans..

Prabhu M.K


--- Bribeiro wrote:



Hello!


I'm having a problem with callings to yyparse. I
have a code that needs
to call yyparse a lot of times, for diferent files.
But just the first
calling is working, cause the subsequent returns parse
error.


There's a \n garbage in lex, I think. Or when the
parse finds a error, it
leaves garbage in yylex.


But when I call yyparse again, the first token read
is that garbage.


How can I clear eveything to start a new parse?


Thanks,


Bruno.





________________________________________________

Esta mensagem foi enviada pelo Webmail Netyet 2.1

http://www.netyet.com.br



_______________________________________________
address@hidden
http://mail.gnu.org/mailman/listinfo/help-bison

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com




________________________________________________
Esta mensagem foi enviada pelo Webmail Netyet 2.1
http://www.netyet.com.br

reply via email to

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