diff --git a/tool/src/org/antlr/v4/tool/interp/ParserInterpreter.java b/tool/src/org/antlr/v4/tool/interp/ParserInterpreter.java index fe546ab4d..93f770096 100644 --- a/tool/src/org/antlr/v4/tool/interp/ParserInterpreter.java +++ b/tool/src/org/antlr/v4/tool/interp/ParserInterpreter.java @@ -163,6 +163,7 @@ public class ParserInterpreter extends Parser { case ATNState.RULE_STOP : // pop; return from rule if ( _ctx.isEmpty() ) { + exitRule(); return rootContext; }