We are comparing the packed token value to check whether this is an
identifier or a keyword against the true value. This happens to work
on new Bison (when using api.token.raw) as these values are the same,
but on old Bison the result is never true.
Thus, the scanner fails to assign the "strval" for identifier tokens
and the result fails very badly. Easy enough to fix.
int tok;
yylval->spectype = UNPACK_SPEC(x & 0xff);
- if ((tok = (x >> 8)) == T_IDENT) {
+ if ((tok = (x >> 8)) == PACK_TOKEN(T_IDENT)) {
/*
* Our IDENT pattern includes hyphens so we can match
* "variable-length" as a keyword. In all other cases a