public override void EnterWhenOtherClause(ProgramClassParser.WhenOtherClauseContext context) { var terminal = context.WhenOtherCondition(); var condition = terminal != null? (WhenOtherCondition)terminal.Symbol : null; Enter(new WhenOther(condition), context);// enter WHEN OTHER }