> The name of a rule is equal to the concatenation (with spaces) of all
> the :value entries. This makes using senator-jump to something
> defined by %token challenging as there may be several rules that
> match just that %token or %keyword.
> I'd like to suggest naming them the same way they show up in your
> stack traces such as "rule:0" or "some_nonterminal:2". The cool thing
> about that is that if the given function is found in an error,
> standard semantic searches will find it in the grammar buffer with
> very little effort.
I committed an important change to semantic-grammar.wy, and the
re-generated semantic-grammar-wy.el, to implement the rule naming
scheme you suggested.
I also cleaned up a bit the grammar ;-)
Here is the change log:
2004-02-20 David Ponce <david@...>
(prologue): Remove `semantic-grammar-wy--tag-value'.
Define ` semantic-grammar-wy--nterm' and `
(put_decl): Simplify semantic actions.
(put_name_list, use_name_list): Return names instead of tags.
(put_value_list): Return values instead of tags.
(put_names): Change tag format.
(put_values, use_names): Ditto.
(nonterminal): Initialize nonterminal name and rule index.
(rule): Rule name based on nonterminal name and rule index.
Increment rule index. Signal an error on duplicate %prec.