help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Flex 2.5.23 beta and C++


From: Wayne Green
Subject: RE: Flex 2.5.23 beta and C++
Date: Wed, 23 Oct 2002 11:25:44 -0600

Correct me if I'm wrong, but isn't GNU C++ ahead of the
standards? I've gotten code to run on Borland (years ago),
Microsoft and GNU and had to do some things to make
everything compile with as few ifdef's as possible.
I became aware that the C++ standards folks were testing
ideas in GNU that didn't make it to the standard for
lots of good reasons. I applauded the GNU effort, as
it helped to clarify the C++ standard. I also remember
some of the better C++ recommendations also comming from a few
folks at Microsoft -- that actually did not seem to
promote the Evil Empire's(TM) goals! Lippmann and
Stroustrup have a few books out that spoke to that
end -- required reading for the C++ classes that I
taught (Forrest Book for one).

The trick I yell about all the time is to keep it simple.
MSVC++ Serivce Pack 5 is pretty reasonable so far STL goes.
There are a few gotchas in there but can be programmed
around.

My simple rules are:
1) write facades to STL and keep all STL code in my program
not in Flex/Bison. (This is extremely critical as it will
impact the C of Flex/Bison the least). Nothing wrong with
good ol' C. (Goes to maintenance and efficency).

2) In the case of Flex/Bison, develop a prototype Superclass
for the code generated, and develop a subclass for my scanners
and parsers that relieve me of having to remember the details
of how the generated code actually works (goes to effectiveness).

Having said that, my scanner's class has these members:
        ifstream    yyininstance;                 // Tie open file to this.
        istream    &yyin;                        // input stream

yy_scan::yy_scan(char *fname, int sz) : yyin(yyininstance)

3) Let you guys hammer out the technical details! 
(goes to thankfullness!).

--Wayne

Wayne Green         InfoSavvy, LLC
address@hidden +1.303.684.9768

> -----Original Message-----
> From: address@hidden [mailto:address@hidden Behalf
> Of W. L. Estes
> Sent: Wednesday, October 23, 2002 6:37 AM
> To: Hans Aberg
> Cc: Help Flex
> Subject: Re: Flex 2.5.23 beta and C++
> 
> 
> On Tuesday, 22 October 2002,23:13 +0200, Hans Aberg wrote:
> 
> > But the standard is already here -- since 1998. So C++ isn't changing 
> > anymore.
> 
> I don't have any reason to believe that the next standard won't break
> something crucial and large about the current standard.
> 
> > GCC is one of the more compliant C++ compilers.
> > 
> > It should not be a big problem to make code for the current C++ standard,
> > and you will not have to worry that it should become broken in a couple of
> > years.
> 
> What's going to happen is this:
> 
> 1: We'll get the current c++ interface so that it works (there's one
> bug that needs fixing.).
> 
> 2: We'll make an official release.
> 
> 3: We'll change the c++ interface so that it's just a wrapper around
> the C scanner.
> 
> > If I figure out a better way to write the interface, I will report it here.
> 
> Thanks for your efforts.
> 
> --Will
> 
> 
> _______________________________________________
> Help-flex mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-flex
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]