<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.18.3">
</HEAD>
<BODY>
On Fri, 2008-08-01 at 18:25 -0400, Florent Teichteil wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hi,
I have been using ANTLR C target with success for several months...
until I included a file from the BOOST C++ library set.
One of my ANTLR rule is DOMAIN.
ANTLR lexer (C target) automatically generates the macro "#define DOMAIN 4".
I include a BOOST header file (for hashtable support) after the lexer
header file. Then, I am not able to parse the DOMAIN rule because
BOOST redefines it to 1!
I think BOOST should prefix its macros, but it would be safer if ANTLR
added some prefix to macros it generates in header files.
What do you think about it?
</PRE>
</BLOCKQUOTE>
<BR>
Tried it and there are complications to do with code generation. Just do what I do and prefix token names that clash with K:<BR>
<BR>
KDOMAIN : 'DOMAIN' ;<BR>
<BR>
boost should prefix it's #defines like ANTLR does really, but the work around is trivial.<BR>
<BR>
Jim
</BODY>
</HTML>