forked from jasder/antlr
Increment match_calls atomically
This ensures the correctness of the counter value, i.e. the value is the number of calls to the match() method.
This commit is contained in:
parent
f11ce46ddf
commit
db0a57c6ee
|
@ -103,7 +103,9 @@ public class LexerATNSimulator extends ATNSimulator {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int match(CharStream input, int mode) {
|
public int match(CharStream input, int mode) {
|
||||||
match_calls++;
|
synchronized (LexerATNSimulator.class) {
|
||||||
|
match_calls++;
|
||||||
|
}
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
int mark = input.mark();
|
int mark = input.mark();
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue