Hi,
with current CVS I get:
[...] bison -p SQL_ -d ../../../src/dlls/msi/sql.y -o sql.tab.c ../../../src/dlls/msi/sql.y contains 4 shift/reduce conflicts and 10 reduce/reduce conflicts. bison -p SQL_ -d ../../../src/dlls/msi/sql.y -o sql.tab.c ../../../src/dlls/msi/sql.y contains 4 shift/reduce conflicts and 10 reduce/reduce conflicts. gcc -c -I../../../src/dlls/msi -I. -I../../../src/include -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith -g -O2 -o tokenize.o ../../../src/dlls/msi/tokenize.c ../../../src/dlls/msi/tokenize.c:58: `TK_CHAR' undeclared here (not in a function) ../../../src/dlls/msi/tokenize.c:58: initializer element is not constant ../../../src/dlls/msi/tokenize.c:58: (near initialization for `aKeywordTable[12].tokenType') ../../../src/dlls/msi/tokenize.c:59: `TK_CHAR' undeclared here (not in a function) ../../../src/dlls/msi/tokenize.c:59: initializer element is not constant ../../../src/dlls/msi/tokenize.c:59: (near initialization for `aKeywordTable[13].tokenType') ../../../src/dlls/msi/tokenize.c:90: `TK_HOLD' undeclared here (not in a function) ../../../src/dlls/msi/tokenize.c:90: initializer element is not constant [etc., similar ones for TK_INT, TK_LONG, TK_LONGCHAR, TK_OBJECT and TK_SHORT]
These IDs are really missing from my sql.tab.h. Any clues?
Hi Ferenc,
Ferenc Wagner wrote:
bison -p SQL_ -d ../../../src/dlls/msi/sql.y -o sql.tab.c ../../../src/dlls/msi/sql.y contains 4 shift/reduce conflicts and 10 reduce/reduce conflicts. bison -p SQL_ -d ../../../src/dlls/msi/sql.y -o sql.tab.c ../../../src/dlls/msi/sql.y contains 4 shift/reduce conflicts and 10 reduce/reduce conflicts. gcc -c -I../../../src/dlls/msi -I. -I../../../src/include -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith -g -O2 -o tokenize.o ../../../src/dlls/msi/tokenize.c ../../../src/dlls/msi/tokenize.c:58: `TK_CHAR' undeclared here (not in a function)
These IDs are really missing from my sql.tab.h. Any clues?
Which version of bison are you using? I have 1.35
bash-2.05b$ bison -V bison (GNU Bison) 1.35
It also looks like you are doing an out of tree build somehow (I couldn't even get that to go here). Do you have two sql.tab.h files perhaps? One in the source directory and one in you build directory?
TK_CHAR should be defined in sql.tab.h, which should be generated by bison. Check that there is a TK_CHAR on line 90 of sql.y ... maybe you have an out of date version of sql.y?
Mike
Hi Mike,
Mike McCormack mike@codeweavers.com writes:
Ferenc Wagner wrote:
bison -p SQL_ -d ../../../src/dlls/msi/sql.y -o sql.tab.c ../../../src/dlls/msi/sql.y contains 4 shift/reduce conflicts and 10 reduce/reduce conflicts. bison -p SQL_ -d ../../../src/dlls/msi/sql.y -o sql.tab.c ../../../src/dlls/msi/sql.y contains 4 shift/reduce conflicts and 10 reduce/reduce conflicts. gcc -c -I../../../src/dlls/msi -I. -I../../../src/include -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith -g -O2 -o tokenize.o ../../../src/dlls/msi/tokenize.c ../../../src/dlls/msi/tokenize.c:58: `TK_CHAR' undeclared here (not in a function)
These IDs are really missing from my sql.tab.h. Any clues?
Which version of bison are you using? I have 1.35
Same here, but problem already solved, Alexandre helped me off-list. I really should have told the list about it, sorry.
It also looks like you are doing an out of tree build somehow (I couldn't even get that to go here).
Yes, that's the case, Dmitry's recent patch makes it possible.
Do you have two sql.tab.h files perhaps? One in the source directory and one in you build directory?
_Exactly._ I tricked myself with this out of tree thing, overlooking the copy in the source tree somehow. Shame on me.
TK_CHAR should be defined in sql.tab.h, which should be generated by bison. Check that there is a TK_CHAR on line 90 of sql.y
It's on line 33, actually, but that doesn't matter, I hope. Things seem to work now as they should. One thing I find strange is that bison is invoked twice in a row with the exact same arguments, but it may as well be OK. Thank you very much for taking the time!