[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bison 2.0a token quoting change
From: |
Anthony Heading |
Subject: |
bison 2.0a token quoting change |
Date: |
Sun, 17 Jul 2005 21:18:40 -0400 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
Hello,
I have an application which no longer builds with bison 2.0a, as a
result of the change mentioned in the NEWS file: "When generating
verbose diagnostics, Bison-generated C parsers no longer quote the
literal strings associated with tokens."
The reason is that I was making use the contents of the 'yytname' array
to prime a lexer: specifically, enumerating the literal string
tokens in the grammar by looking for quoted strings in 'yytname' and
putting these into a lexer table with the corresponding element of
'yytoknum'.
I'd like to find some way of fixing this code to work with bison
going forward. Are there any suggestions on an alternative way
to implement the same functionality?
One possibility might be to have bison output a table of token aliases
in addition to the name and value tables? I'd be willing to try
creating a patch for that if there were agreement that it's an
acceptable feature.
Thanks
Anthony
- bison 2.0a token quoting change,
Anthony Heading <=