help-bison
[Top][All Lists]
Advanced

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

reading a file multiple times with bison


From: Shipman, Jeffrey E
Subject: reading a file multiple times with bison
Date: Tue, 13 Aug 2002 10:23:28 -0600

I've got a Qt GUI which uses a bison parser
in the background. On startup, it reads
a specific file. It does this by doing something
like this:

fp = fopen(MY_FILE);
yyin = fp;
yyparse();
fclose(fp);

This seems to work rather well. I can tell it
to load a new file and it will do so just fine.
However, if I load a file with an error in
it, I'll get the parse error message, but from
then on, no files that I import will work. I
always get the same error message! If I stop
and restart my program, it works just fine. Is
there a buffer or some sort of persistent status
that is not going away?

Please let me know what I need to do so I can
go back to correctly parsing those files even
after a file with an error has been parsed.

Thanks in advance,

Jeff Shipman - CCD
Sandia National Laboratories
(505) 844-1158 / MS-1372





reply via email to

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