[antlr-interest] ANTLR3 C target and Visual Studio 6
Iain Young
Iain.Young at microfocus.com
Thu Oct 4 05:07:26 PDT 2007
That's entirely possible, (I hadn't considered non-VC compilers).
Unfortunately, we have to keep supporting VC6 for now. I can include
this fix in our stuff and link with a slightly modified library etc, but
is there anything in the terms & conditions which says the fix has to go
into the source stream? I don't want to be breaking any license
agreements by doing this...
> I've just been creating some parsers using Antlr3 and the c target. It
> all worked fine with vs2005, but would not compile with vc6. After a
bit
> of investigation I found I had to make a small change to one of the
> antlr header files.
>
> In the file antlr3defs.h, I had to change the line (110):
>
> #define ANTLR3_UINT64_LIT(lit) lit##ULL
>
> So that it instead looked like this...
>
> #if _MSC_VER >= 1400
> #define ANTLR3_UINT64_LIT(lit) lit##ULL
> #else
> #define ANTLR3_UINT64_LIT(lit) lit##ui64
> #endif // _MSC_VER >= 1400
>
> Now that I've modified the antlr sources, I guess this change ought to
> make it into the official source stream as a patch of some sort, but I
Your fix looks like it will break things for non VC compilers. (Also I
have to
wonder how many #ifdefs it is worth to support a nearly ten years old
compiler.)
--
Rupert Mazzucco <mazzucco at iiasa.ac.at>
Research Scholar, Evolution and Ecology Program
IIASA - Institute for Applied Systems Analysis
Schlossplatz 1, 2361 Laxenburg, Austria
Phone: +43 2236 807 522 Fax: +43 2236 713 13
This message has been scanned for viruses by MailController -
www.MailController.altohiway.com
More information about the antlr-interest
mailing list