Is there a way to recognise an instance of a rule as something specific?

Hi, I was wondering if there was a way to recognise a particular rule, such as,

NonTerminalDefinition {

    Alpha Beta Gamma Foobar 

}


RuleDefitionOne {

    NonTerminalDefinition

}

RuleDefitionOne {

    NonTerminalDefinition //recognise this as something else, for example NTDOne, in the parse tree.

}

Is there a way to achieve this? I looked at NodeProps and otherName but it seems to be for the instance where the rule is defined so not sure how to proceed

You can’t rename a rule in a use, but you could make the rule anonymous (lower-case name), and use it wrapped by different named rules — NonTerminalDefinition { nonTerminal } and NT { nonTerminal } — in different places.