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

Jens Krüger jkrueger1 at users.sourceforge.net
Mon Oct 21 08:58:04 UTC 2002


Thanks for the report, I have only a question to system you used
.
I tried the current umbrello source to compile on a Mandrake 9 which also 
comes with a g++ 3.2, but I could compile the tokenizer.cc without any 
problems. I looked at the version of the flex 2.5.4. 

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.

Regards

Jens

Am Montag, 21. Oktober 2002 16:44 schrieb Andreas Borchert:
> Hello,
>
> UML 1.1 beta [12] comes with tokenizer.l which requires flex to
> be translated to tokenizer.cc. UML 1.1 beta 1 was shipped with a
> working tokenizer.cc.  UML 1.1 beta 2, however, was shipped just with
> tokenizer.l. Hence, tokenizer.cc must be rebuild.
>
> Unfortunately, the last official release of flex I am aware of (2.5.4a,
> released in July 1997, to be found in the non-gnu/flex subdirectory
> of all GNU mirrors) is not prepared to work with ISO C++ compliant
> compilers like g++ 3.2, i.e.
>
>   - it includes <iostream.h> instead of <iostream>, and
>   - it does not take care of name spaces.
>
> This problem is well-known and was discussed several times on the flex
> mailing list <help-flex at gnu.org>. John W. Millaway told this ``is in the
> works for the next release of flex'' in August 2001 [1] but apparently no
> new version was released since then. Curtis L. Janssen provided a quick
> patch [2] that, as I found out, does not solve all the problems with g++
> 3.2. To be able to compile ULM 1.1 beta 2, I extended the flex patch [3].
>
> tokenizer.cc as shipped with ULM 1.1 beta 1 was not generated by an
> unpatched release of 2.5.4a. Apparently, some Linux distributors tried to
> solve this problem as well. There flex patch is however less portable as
> it attempts to fix the problem using a flooding ``using namespace std''
> declaration and it does not attempt to support older g++ releases that
> do not provide <iostream> instead of <iostream.h>.
>
> I would recommend to address this problem in the INSTALL file.
>
> Andreas.
>
> References:
> [1] Comment by John W. Millaway
>     http://www.geocrawler.com/archives/3/353/2001/8/0/6474874/
> [2] Flex Patch by Curtis L. Janssen:
>     http://www.geocrawler.com/archives/3/353/2001/8/0/6350956/
> [3] My Patch for flex 2.5.4a:
>     ftp://ftp.mathematik.uni-ulm.de/pub/soft/flex/flex.patch

-- 
Jens




More information about the umbrello mailing list