@Override
			public Integer visitMultiply(VisitorCalcParser.MultiplyContext ctx) {
				Integer left = visit(ctx.expr(0));
				Integer right = visit(ctx.expr(1));
				if (ctx.MUL() != null) {
					return left * right;
				}
				else {
					return left / right;
				}
			}
This test verifies that the visitor correctly dispatches calls for labeled outer alternatives.
runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/TestVisitors.java