[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Flex and C++
From: |
Matt Carter |
Subject: |
RE: Flex and C++ |
Date: |
Wed, 30 Jan 2002 01:54:25 -0500 |
One more thing:
You also need to run that perl script on your FlexLexer.h file.
-----Original Message-----
From: Matt Carter
Sent: Tuesday, January 29, 2002 2:06 PM
To: address@hidden
Subject: RE: Flex and C++
The authors indicated in November that a fix for this would be coming soon.
I got tired of waiting, so I wrote a perl post-processor which seems to do
the job. Pass your flex-generated C++ source file on the command line to
this perl script.
perl -p -i.bak \
-e 's/class istream;/#include <iostream>/;' \
-e 's/(\W)([io]?)stream(\W)/${1}std::${2}stream$3/g;' \
-e 's/(\W)(cin|cout|cerr)(\W)/${1}std::${2}$3/g;' {put_your_file_here}
Hope it works for you.
-Matt
-----Original Message-----
From: Arjen Baart [mailto:address@hidden
Sent: Tuesday, January 29, 2002 4:59 AM
To: address@hidden
Subject: Flex and C++
Hello Flex,
Is there any maintenance being done on flex ? I noticed the latest version
is 2.5.4a, which is dated 1997.
I run into some problems when creating a C++ scanner (with FlexLexer.h)
while using modern C++ compilers, such as gcc 3.0. Both the header
file and the generated code do not appear to use the namespaces properly.
I'd be happy to fix the problems and send you a patch...
Have fun,
Arjen.
--
----------------------------------------------------------------------
ANDROMEDA TECHNOLOGY & AUTOMATION
Arjen Baart Voice : +31-184-420572
Hardinxveld-Giessendam, The Netherlands Fax : +31-184-490004
mailto:address@hidden http://www.andromeda.nl
----------------------------------------------------------------------
_______________________________________________
Help-flex mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-flex