forked from jasder/antlr
Use for each instead of indexed for; use isEmpty() instead of size()==0
This commit is contained in:
parent
326cb259a0
commit
52256044a9
|
@ -288,8 +288,7 @@ public class LexerATNSimulator extends ATNSimulator {
|
|||
System.out.format("in reach starting closure: %s\n", closure);
|
||||
}
|
||||
|
||||
for (int ci=0; ci<closure.size(); ci++) { // TODO: foreach
|
||||
ATNConfig c = closure.get(ci);
|
||||
for (ATNConfig c : closure) {
|
||||
if ( debug ) {
|
||||
System.out.format("testing %s at %s\n", getTokenName(t), c.toString(recog, true));
|
||||
}
|
||||
|
@ -304,7 +303,7 @@ public class LexerATNSimulator extends ATNSimulator {
|
|||
}
|
||||
}
|
||||
|
||||
if ( reach.size()==0 ) {
|
||||
if ( reach.isEmpty() ) {
|
||||
// we reached state associated with closure for sure, so
|
||||
// make sure it's defined. worst case, we define s0 from
|
||||
// start state configs.
|
||||
|
|
Loading…
Reference in New Issue