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


Reply via email to