help-bison
[Top][All Lists]
Advanced

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

Re: Parsing multiple files with same parser


From: Tadej Borovšak
Subject: Re: Parsing multiple files with same parser
Date: Sun, 18 Nov 2012 01:56:17 +0100

Hi.

Dne 18.11.2012 (ned) ob 01:20 +0100 je Hans Aberg napisal(a):
> On 17 Nov 2012, at 23:48, Tadej Borovšak wrote:
> 
> > ... now I'm getting an error when trying to run
> > my parser for the second time using the same file as input [1].
> ...
> > /* Open input stream etc. */
> > yyparse ();
> > /* Close input stream and reopen it */
> > /* Flush flex buffer using YY_FLUSH_BUFFER */
> > yyparse ();
> 
> Have you tried using yyrestart() before calling the scanner again?

Unfortunately, that didn't help. I'm having a feeling that flex is not
to blame here, since it's output is identical in both runs.

Maybe I need to do some cleanup before calling yyparse() again? My
previous parsing completed without error (yyparse() returned 0), but
maybe something is not set exactly as it was before the first parsing?

-- 
Tadej Borovšak
address@hidden
address@hidden
blog.borovsak.si




reply via email to

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