help-bison
[Top][All Lists]
Advanced

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

Suggestion: enumerating non-terminals


From: Tony Li
Subject: Suggestion: enumerating non-terminals
Date: Wed, 20 Dec 2006 15:34:25 -0800


Hi,

I have a small proposal that I'd like to float.

In building a parse tree for a complex language, it's very helpful to identify which nodes correspond to which productions in the grammar. Bison already has internal identifiers for each non-terminal and carries around ASCII strings for each in yytname[]. What I'd dearly love to see is the ability (probably as an option) to export these symbols into y.tab.h, preferably as part of an enum.

It's possible to generate this by hand, but as it's not automatically maintained today, any significant change in the grammar requires a manual update of the symbols. This is Not Fun.

Comments?  Suggestions?

Tony




reply via email to

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