Closed rurban closed 9 years ago
commit f2d0ac81390504bc0b0676067a6e1ded8d2b9922 "perly: improve regen_perly" breaks win32 build
cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS
OLE -DNO_STRICT -DPERLDLL -DPERL_CORE -O1 -MD -Zi -DNDEBUG -GL -DPERL_EXTERNAL
_GLOB -DPERL_IS_MINIPERL -Fo.\mini\pad.obj ..\pad.c
pad.c
cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS
OLE -DNO_STRICT -DPERLDLL -DPERL_CORE -O1 -MD -Zi -DNDEBUG -GL -DPERL_EXTERNAL
_GLOB -DPERL_IS_MINIPERL -Fo.\mini\perl.obj ..\perl.c
perl.c
perl.c(2321) : error C2065: 'GRAMPROG' : undeclared identifier
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
Thanks. Thats what those duplicate defines were for On Sep 19, 2015 4:47 PM, "bulk88" notifications@github.com wrote:
commit f2d0ac8 https://github.com/perl11/cperl/commit/f2d0ac81390504bc0b0676067a6e1ded8d2b9922 "perly: improve regen_perly" breaks win32 build
cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS
OLE -DNO_STRICT -DPERLDLL -DPERL_CORE -O1 -MD -Zi -DNDEBUG -GL -DPERL_EXTERNAL _GLOB -DPERL_IS_MINIPERL -Fo.\mini\pad.obj ..\pad.c pad.c cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS OLE -DNO_STRICT -DPERLDLL -DPERL_CORE -O1 -MD -Zi -DNDEBUG -GL -DPERL_EXTERNAL _GLOB -DPERL_IS_MINIPERL -Fo.\mini\perl.obj ..\perl.c perl.c perl.c(2321) : error C2065: 'GRAMPROG' : undeclared identifier NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop.
— Reply to this email directly or view it on GitHub https://github.com/perl11/cperl/issues/47#issuecomment-141709968.
I see why:
perly.h contains the enum yytokentype {
GRAMPROG = 258,
..}
but this is left out on win32 because of a conflict with WORD in perl.h
/* Win32 defines a type 'WORD' in windef.h. This conflicts with the enumerator
* 'WORD' defined in perly.h. The yytokentype enum is only a debugging aid, so
* it's not really needed.
*/
#if defined(WIN32)
# define YYTOKENTYPE
#endif
Furthermore the comment is wrong. I do not like having the tokentypes being declared twice. Once as define and once again as enum. It is a debugging aid, and it is needed for perl.c
Ok, I'll bite the bullet here, as I don't want to rename WORD in the parser and lexer. cpan Keyword::Simple users (PL_keyword_plugin) would need a change then, if they use the WORD token.
use better bison error and debugging reporting facilities. do not throw away the useful
perlytmp.output
and tmp files when regenerating.-v -r states
. And-t
eventually on DEBUGGINGbison-2.7.1
orbison-2.5.1
binary, when we see an unsupported bison. newer bisons are currently not supported, so this usecase is now very common=>
Entering state 103 stmtseq