Re: Can't compile flex/yacc generated code with ANSI C++ Compiler

Martin Gieseking <mgieseki@uos.de>
20 Dec 2001 00:46:41 -0500

          From comp.compilers

Related articles
Can't compile flex/yacc generated code with ANSI C++ Compiler Mario.Sansone@siemens.com (Mario Sansone) (2001-12-15)
Re: Can't compile flex/yacc generated code with ANSI C++ Compiler remove.haberg@matematik.su.se (2001-12-20)
Re: Can't compile flex/yacc generated code with ANSI C++ Compiler loewis@informatik.hu-berlin.de (Martin von Loewis) (2001-12-20)
Re: Can't compile flex/yacc generated code with ANSI C++ Compiler foldy@rmki.kfki.hu (Foldy Lajos) (2001-12-20)
Re: Can't compile flex/yacc generated code with ANSI C++ Compiler mgieseki@uos.de (Martin Gieseking) (2001-12-20)
| List of all articles for this month |

From: Martin Gieseking <mgieseki@uos.de>
Newsgroups: comp.compilers
Date: 20 Dec 2001 00:46:41 -0500
Organization: University of Osnabrueck, Germany
References: 01-12-070
Keywords: lex, C++
Posted-Date: 20 Dec 2001 00:46:41 EST

> Does anybody know, why I can't compile my flex 2.5.4 generated code
> with my new SUN Compiler 5.2 ? This compiler is a strictly
> ANSI C++ Compiler


Hello Mario


I had a similar problem with flex and g++. The error occured when using
both headers <iostream.h> (included by flex) and <iostream> (included
somewhere in my lexer-source). I simply adapted the flexskel file by
replacing the relevant lines and saved it as myflex.skl. Now flex can be
called with the option -Smyflex.skl and everything works fine. Maybe your
problem can be solved the same way.


Martin


Post a followup to this message

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