[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Interesting problem with bison on Windows
From: |
oconnor . maryann |
Subject: |
Interesting problem with bison on Windows |
Date: |
Thu, 18 Oct 2007 22:42:52 +0000 |
I am running into an interesting problem on Windows with Bison 2.1. My grammar
defines the word IN as a token. When I build on Windows, there is a file which
includes the generated gram.h after including Microsoft's header WinDef.h. I'm
using Visual Studio .NET 2003. Unfortunately, that header defines "IN":
#define IN
So, when compiling, the inclusion of gram.h gets an error due to the enum
yytokentype which ends up getting the line for IN messed up during
preprocessing:
...
= 250,
INTEGER = 251,
...
I can undefine "IN" before the inclusion of gram.h which works, but is a bit
hacky. I tried defining YYTOKENTYPE in the compile line (the enum is
conditionalized with YYTOKENTYPE), but I got a link error when doing so. Any
idea why defining YYTOKENTYPE in the compile line causes this problem? It sure
looks like it's there for this reason.
Many thanks,
Mary Ann
- Interesting problem with bison on Windows,
oconnor . maryann <=