Re: yytname woes

Hans Ã…berg <[email protected]> Sat, 11 Nov 2023 18:03:59 +0100
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>
On Nov 10, 2023, at 01:57, James K. Lowden <[email protected]> =
wrote:
>=20
> I can't seem to look up token names in yytname correctly using enum
> yytokentype.
=E2=80=A6
> When I look up #899, NOT, I get "NOT".  But when I look up #900, NE, I
> get "'<'" because that's the next element in yytname (900 - 255).

In Bison, being compatible with POSIX Yacc, it is allowed use characters =
as token numbers, so those numbers are reserved for that purpose.