diff --git a/runtime/Java/src/org/antlr/v4/runtime/Recognizer.java b/runtime/Java/src/org/antlr/v4/runtime/Recognizer.java index 1d4936153..72d45491e 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/Recognizer.java +++ b/runtime/Java/src/org/antlr/v4/runtime/Recognizer.java @@ -65,7 +65,13 @@ public abstract class Recognizer { public abstract ATN getATN(); - public ATNInterpreter getInterpreter() { return _interp; } + public ATNInterpreter getInterpreter() { + return _interp; + } + + public void setInterpreter(ATNInterpreter interpreter) { + _interp = interpreter; + } /** What is the error header, normally line/character position information? */ public String getErrorHeader(RecognitionException e) {