By the way, I think the distinction between "useless" and "never
reduced"
is unclear both in the XML and in Bison's existing .output files.
That
is, useless rules are never reduced, and rules that are never
reduced are,
in some sense, useless.
When Bison says "useless", it really means (1) "grammatically
useless",
(2) "useless before conflicts", or (3) "useless in grammar". That
is, the
nonterminal or rule is useless before the parsing technique (LALR
(1) in
Bison's case) is even considered.
By "never reduced", Bison means (1) "useless due to conflicts", (2)
"useless after conflicts", or (3) "useless in parser". That is,
the rule
is useless after the parsing technique is considered.
#1 seems clear in both cases, but it's verbose. The words "before"
and
"after" in #2 sound a little like they have something to do with
conflicts
in predecessor and successor states, and that's not what we mean. I
prefer #3, which I think will also look nice in XML.
What do people think?