Andy Colson <andy(at)squeakycode(dot)net> writes:
> Is there anyway to make bison/yacc/gcc/etc spit out the rule names?
bison -v produces a debug output file that includes nicely cleaned-up
versions of all the rules. But it includes a lot of other stuff too,
and I'm not at all sure that the file format is stable across bison
versions, so maybe depending on that isn't a hot idea.
> I'm not sure rule name is the proper words. In gram.y we have:
"Production" is the standard technical name, but on the other hand the
bison documentation seems to consistently use the word "rule", so
there's probably nothing wrong with doing so here too.
regards, tom lane