public override void EnterRule(IParseTreeListener listener) { ICalcListener typedListener = listener as ICalcListener; if (typedListener != null) { typedListener.EnterVAR(this); } }