This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
rename "WORD" lexical token to "BAREWORD"
authorDavid Mitchell <davem@iabyn.com>
Mon, 18 Jul 2016 10:57:19 +0000 (11:57 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 20 Jul 2016 08:32:23 +0000 (09:32 +0100)
commit185c2e96081e0fd9b6c448a8db6ac4ca85ff1dd4
treeca1ed4cb3a92ea9a9d65b577fc7dc44b5de44280
parent3a3625f0ae05ec93b90af756e460a7803fafd8a2
rename "WORD" lexical token to "BAREWORD"

The enum value "WORD" can apparently clash with a enum value in windows
headers.  It used to be worked around in windows by #defining YYTOKENTYPE,
which caused the

    enum yytokentype {
        ...
        WORD = ...;
    }

in perly.h to be skipped, while still using the

    #define WORD ...

which appears later in the same file.

In bison 3.x, the auto-generated perl.h no longer includes the #defines,
so this workaround no longer works.

Instead, change the name of the token from "WORD" to "BAREWORD".
perl.h
perly.act
perly.h
perly.tab
perly.y
toke.c