On 24 Oct 2007, at 22:55, Joel E. Denny wrote:
Currently, Bison puts a terminal's user number (the one returned
by yylex)
in its XML "number" attribute. I think we should rename that to
"user-number" and add a "number" attribute for Bison's internal
symbol
number. This would be more consistent with nonterminals. I'd be
happy
the write the patch. Is all this agreeable to you, Wojciech?
Perhaps giving more sci-tech names :-):
The token number variable might be termed "token-number". The set
of terminals
and non-terminals is technically called "vocabulary", so the
yytname_[]
values, if that is what you mean, might be called "word-number" or
something.
What about @symbol-number and @token-number?
I think those are fine:
I think "token-number" should be used, because "token" is the name
that Bison uses (and not "terminal").
And I have found no technical definition of name of the members of
the vocabulary of a grammar. But the non-terminals (resp. terminals)
may be called grammar variables (resp. constants), and both variables
and constants are in math symbols with different functions. So
"symbol-number" seems fine. And so, the members of the vocabulary
could perhaps be called "symbols" then, with a common name. Thank you
for the suggestion! :-)
As for changing the token numbers, one needs to make sure POSIX
does not
require something, like a range starting value.
I feel that we should not change them.
Yeah, I think that is safest, too.
Hans Aberg