[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
yytoknum and YYPRINT
From: |
Tim Van Holder |
Subject: |
yytoknum and YYPRINT |
Date: |
15 Nov 2002 11:54:43 +0100 |
Is yytoknum intended to be available to the user?
It's just that we had a function in most our .y files that
returned a given token's name (for use in internal tracing etc).
Using yytoknum and yytname for this worked quite nicely.
But now yytoknum's visibility depends on YYPRINT being defined;
this seems to make little sense to me, as YYPRINT deals with
the ability to print extra semantic info about a token (of which
the name has already been shown), while yytoknum deals mainly
with locating the proper index in yytname for a given token
(I think).
Also, the bison manual's example for a YYPRINT function displays
values with leading spaces; given that YYPRINT's output is
enclosed in parens, I don't think a leading space is very
appropriate.
--
Tim Van Holder <address@hidden>
Anubex
- yytoknum and YYPRINT,
Tim Van Holder <=