[antlr-interest] Antlr emit vs Qt emit
jimi at temporal-wave.com
Wed Dec 28 14:08:55 PST 2011
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
But, the answer is to decouple your code really.
> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Paul
> Sent: Wednesday, December 28, 2011 2:01 PM
> To: antlr-interest at 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
> Thank you,
> Paul Neelands
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
More information about the antlr-interest