
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
One way to do this is to modify SimpleNode to add an attribute that represents the number. Set the attribute from inside the nodescope.
I.e.
void nearExpr() : { Token t ;}
{
( unaryExpr() ( t=<NEAR> unaryExpr()
{ jjtThis.setNumber( extractNumber( t.image) ; }
)?
) #NEAR(>1)
}| <-- __Chronological__ --> | <-- __Thread__ --> |