help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: yytname woes


From: Hans Åberg
Subject: Re: yytname woes
Date: Sun, 12 Nov 2023 22:40:04 +0100

> On Nov 12, 2023, at 00:06, James K. Lowden <jklowden@schemamania.org> wrote:
> 
> 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"
…
%%
…
this_rule:
  "this" …
;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]