[prev in list] [next in list] [prev in thread] [next in thread] 

List:       antlr-interest
Subject:    Re: [antlr-interest] Antlr emit vs Qt emit
From:       Jim Idle <jimi () temporal-wave ! com>
Date:       2011-12-28 22:08:55
Message-ID: d34abb180d7e7c92cd068a6dc72c30a8 () mail ! gmail ! com
[Download RAW message or body]

Please see the archives. You should:

a) Probably not include both ANTLR and QT headers in the same space - you
should not be mixing code in with ANTLR code I think;
b) If you must do this, and I can't see why you must, as you should call
external helper methods from actions, then undef emit before including the
antlr headers.

But, the answer is to decouple your code really.

Jim

> -----Original Message-----
> From: antlr-interest-bounces@antlr.org [mailto:antlr-interest-
> bounces@antlr.org] On Behalf Of Paul
> Sent: Wednesday, December 28, 2011 2:01 PM
> To: antlr-interest@antlr.org
> Subject: [antlr-interest] Antlr emit vs Qt emit
>
> After some confusion using antlr v3.4 with c++ and the Qt toolkit, Qt
> defines "emit" as a keyword.
> This conflicts with the definition of emit in antlr v3:
>
> static pANTLR3_COMMON_TOKEN
> emit       (pANTLR3_LEXER lexer)
> {
> ...
>
> Unfortunately changing this requires changes in both the antlr
> generator and the C runtime. Without the changes antlr v3 is unusable
> in C++ source files that also use Qt.
>
> Changing the antler emit to emitT resolves the issue.
> Would it be possible to propagate such a change through the antlr v3
> source?
>
> Thank you,
>
> Paul Neelands
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic