forked from jasder/antlr
Add LexerATNSimulator.copyState (allows copying state information from another simulator instance)
This commit is contained in:
parent
40a8759276
commit
9c554a002b
|
@ -139,6 +139,17 @@ public class LexerATNSimulator extends ATNSimulator {
|
||||||
this.recog = recog;
|
this.recog = recog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void copyState(@NotNull LexerATNSimulator simulator) {
|
||||||
|
this.charPositionInLine = simulator.charPositionInLine;
|
||||||
|
this.line = simulator.line;
|
||||||
|
this.mode = simulator.mode;
|
||||||
|
this.startIndex = simulator.startIndex;
|
||||||
|
|
||||||
|
this.trace = simulator.trace;
|
||||||
|
this.traceStream = simulator.traceStream;
|
||||||
|
this.traceFailed = simulator.traceFailed;
|
||||||
|
}
|
||||||
|
|
||||||
public OutputStream getTraceStream() {
|
public OutputStream getTraceStream() {
|
||||||
return this.traceStream;
|
return this.traceStream;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue