Add some assertions
This commit is contained in:
parent
c0d1fcc110
commit
35ef516e28
|
@ -92,6 +92,8 @@ public class AnalysisPipeline {
|
|||
look = anal.getDecisionLookahead(s);
|
||||
g.tool.log("LL1", "look=" + Arrays.toString(look));
|
||||
}
|
||||
|
||||
assert s.decision + 1 >= g.decisionLOOK.size();
|
||||
Utils.setSize(g.decisionLOOK, s.decision+1);
|
||||
g.decisionLOOK.set(s.decision, look);
|
||||
g.tool.log("LL1", "LL(1)? " + disjoint(look));
|
||||
|
|
|
@ -46,6 +46,7 @@ public class LL1StarBlockSingleAlt extends LL1Loop {
|
|||
loopBackStateNumber = star.loopBackState.stateNumber;
|
||||
this.decision = star.decision;
|
||||
IntervalSet[] altLookSets = factory.getGrammar().decisionLOOK.get(decision);
|
||||
assert altLookSets.length == 2;
|
||||
IntervalSet enterLook = altLookSets[0];
|
||||
IntervalSet exitLook = altLookSets[1];
|
||||
loopExpr = addCodeForLoopLookaheadTempVar(enterLook);
|
||||
|
|
Loading…
Reference in New Issue