Re: yytname woes

Hans Ã…berg <[email protected]> Sun, 12 Nov 2023 22:40:04 +0100
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>
> On Nov 12, 2023, at 00:06, James K. Lowden <[email protected]> =
wrote:
>=20
> I think the purpose of the yytname array is simple: for each token
> (that is not a character), it holds a string with the token's name.

Yes, and it is not needed in the actual parser. It is used to print =
error messages, but one can also use it in the grammar:
%token this_key "this"
=E2=80=A6
%%
=E2=80=A6
this_rule:
  "this" =E2=80=A6
;