Add LexerATNSimulator.copyState (allows copying state information from another simulator instance)

This commit is contained in:
sharwell 2012-02-09 00:15:30 -06:00
parent 40a8759276
commit 9c554a002b
1 changed files with 11 additions and 0 deletions

View File

@ -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;
} }