|
From: | August Karlstrom |
Subject: | Re: Name clash with token type BEGIN |
Date: | Tue, 29 Dec 2009 21:02:02 +0100 |
User-agent: | Thunderbird 2.0.0.23 (X11/20090817) |
Joel E. Denny wrote:
I'm guessing your parser.h is included in a scanner generated by Flex, which defines the macro BEGIN.
Yes, that's the case. Do you know if there is there a way around this or do I have to add a prefix to the token (or all tokens for sake of consistency)?
Obviously, the recommendation in the Bison manual of using the same name for a reserved words and its corresponding tokens cannot be followed in the general case when using Flex and Bison in tandem. I guess Flex is to blame here - BEGIN should have been named something like YY_BEGIN.
/August
[Prev in Thread] | Current Thread | [Next in Thread] |