No, there is no such mechanism in BNFC. I used a workaround where I
patch the BNFC-generated parent classes automatically (in the Makefile)
after they have been generated. By "parent class" I mean for instance
"Exp", when the child classes are the particular forms of an expression,
like EInt, and EAdd, link in the LBNF grammar:
EInt. Exp ::= Integer;
EAdd. Exp ::= Exp "+" Exp;