using lex in dll

wiederke@rummelplatz.uni-mannheim.de (Torsten Wiederkehr)
5 Sep 1999 02:41:20 -0400

          From comp.compilers

Related articles
using lex in dll wiederke@rummelplatz.uni-mannheim.de (1999-09-05)
Re: using lex in dll bill@megahits.com (Bill A) (1999-09-10)
| List of all articles for this month |

From: wiederke@rummelplatz.uni-mannheim.de (Torsten Wiederkehr)
Newsgroups: comp.compilers
Date: 5 Sep 1999 02:41:20 -0400
Organization: Rechenzentrum Uni Mannheim
Keywords: lex, Windows, question

Hi,


I use lex in a dll under WinNT. The firsttime I call the lex-dll,
everything is alright. The second time, the output file contains 0
Byte. I controlled the return values of the fopen and fclose-function,
it's always alright. I also write some data "outside" the
yylex()-function into the output file. The second time I called the
lex-dll, only the data I wrote outside yylex() appeard in the output
file!?!


I think the solution is inside the yylex()-function. Has anyone an idear
what can cause this problem?


bye torsten
[I suspect you need to use yyrestart() or the equivalent to flush the
buffers in your lexer. -John]





Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.