help-bison
[Top][All Lists]
Advanced

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

strange effects


From: Arnt Witteveen
Subject: strange effects
Date: Tue, 30 Oct 2001 18:28:39 +0100

Hi, I'm using bison 1.28 (can't get 1.30 to compile under Visual studio)
combined with flex 2.5.4. I'm trying to read 2 files and a string. This
generally works fine, except in one case: if the string I try to read has a
syntax error (first token is not what was expected, due to corruption of the
string usually), yacc bails out. 

If I try to read from a file after that, I get the same error as I got for
the corrupted string. I guess some buffer is not correctly cleaned up or
something, but I have been looking for the better part of this day to fix
this and I can't. Basically, my code is this:

first:

inputbuff = yy_scan_string(cpStr);

then yyparse() which returns the error.

then later:

inputbuff = yy_create_buffer( f, YY_BUF_SIZE );
yy_switch_to_buffer( inputbuff );

then yyparse() again which returns the same error over and over.

Is something obviously wrong with this?

Arnt

    Arnt Witteveen

-------------------------------------------------------------------

VARTEC NV 
    Holstraat 19, B-9000 Gent, Belgium
    Ph. : +32 9  269 99 66    Fax.: +32 9 269 99 69

Visit our web-sites :
 http://www.vartec.be - your visualisation partner
 http://www.ultima3d.com - a new dimension in virtual and augmented
                                            reality
 http://www.adm.vartec.be - advanced document management (adm) 
 http://www.e-webtec.com - our web solutions
 http://www.webtecsport.com - follow all major sport events LIVE !






reply via email to

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