[Uml-user] Problems with tokenizer.l, flex, and ISO C++ compliant Compilers

Andreas Borchert borchert at mathematik.uni-ulm.de
Mon Oct 21 11:31:02 UTC 2002


On Mon, Oct 21, 2002 at 07:20:57PM +0200, Jens Krüger wrote:
> Am Montag, 21. Oktober 2002 18:42 schrieb Andreas Borchert:
> > On Mon, Oct 21, 2002 at 06:02:18PM +0200, Jens Krüger wrote:
> > > Inside the generated tokenizer.cc I didn't found any includes of
> > > iostream.h. Afterward I tried to compile the source from the original
> > > 2.5.4a version and I also didn't any iostream.h.
> >
> Sorry, I didn't talked about the flex itself but about the generated code.

The generated code of flex for C++ includes FlexLexer.h. And the
generated code does not take care of namespaces. It uses cin, cout,
cerr, istream, and ostream without qualification.

Hence, you cannot compile code generated by flex for C++ using gcc 3.2.

Andreas.

-- 
Dr. Andreas F. Borchert, SAI, Universitaet Ulm | One should make everything
http://www.mathematik.uni-ulm.de/sai/borchert/ | as simple as possible, but
Helmholtzstrasse 18, E02, Tel +49 731 50-23572 | no simpler. -- A. Einstein




More information about the umbrello mailing list