dmajda/pegjs — pull request #219 by EricMCornelius (2013-11-07 18:43:33+00:00)
Title: Added ruleName() function which can be called inside semantic actions to return the currently executing rule

Saw mention of this as a desired feature in the issues list, and found myself needing it as well. Not sure whether this is the most desired approach vs. storing a separate string table and using a numeric type for rule_id lookup.