[antlr-interest] My Progress on C++ Target

Jim Idle jimi at temporal-wave.com
Thu Feb 9 12:54:52 PST 2012


If building on Windows, you need to compile with ALL warnings turned on,
or you have no chance of getting gcc to compile code. Getting even C code
to compile on all the different systems compilers without error is a
mammoth task and you have to be very careful.

That's why you should use C++ as just a better C and forget about
templates and namespaces and all the other stuff that is not usually very
cross compiler/system compliant. Wait until you try compilers like the one
on HPUX.

While the compatibility of C++ compilers improves all the time, it is not
so great. Back when I used Ric's 2.x C++ target I had to port it to about
6 or 7 compilers - it was a terrible job and we seemed to be sending Ric
patches all the time; and it had nothing to do with Ric's code.

I think that the task of creating a C++ runtime target is being slightly
underestimated.

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of A Z
> Sent: Thursday, February 09, 2012 12:10 PM
> To: Gokulakannan Somasundaram
> Cc: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] My Progress on C++ Target
>
> Hi Gokulakannan,
>
> Are you targeting this for Linux as well? The definition for
> ANTLR_BEGIN_NAMESPACE is contained within "#ifdef    ANTLR_WINDOWS" so
> the
> compile fails. If I fix this I get a lot of template-related errors:
>
> error: use 'template' keyword to treat 'RewriteStreamType' as a
> dependent template name
>         typedef typename ImplTraits::RewriteStreamType< ComponentType >
> RewriteStreamType;
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address


More information about the antlr-interest mailing list