public void process(ProcedurePlan env) throws TeiidComponentException { Program parentProgram = env.peek(); //find the parent program that contains the loop/while instruction while(true){ if (bs.getMode() == BranchingMode.LEAVE && bs.getLabel().equalsIgnoreCase(parentProgram.getLabel())) { env.pop(true); break; } if(parentProgram.getCurrentInstruction() instanceof RepeatedInstruction){ if (bs.getLabel() == null) { break; } RepeatedInstruction ri = (RepeatedInstruction)parentProgram.getCurrentInstruction(); if (bs.getLabel().equalsIgnoreCase(ri.getLabel())) { break; } } env.pop(true); parentProgram = env.peek(); } if (bs.getMode() != BranchingMode.CONTINUE) { env.incrementProgramCounter(); } }
public void process(ProcedurePlan env) throws TeiidComponentException { Program parentProgram = env.peek(); //find the parent program that contains the loop/while instruction while(true){ if (bs.getMode() == BranchingMode.LEAVE && bs.getLabel().equalsIgnoreCase(parentProgram.getLabel())) { env.pop(true); break; } if(parentProgram.getCurrentInstruction() instanceof RepeatedInstruction){ if (bs.getLabel() == null) { break; } RepeatedInstruction ri = (RepeatedInstruction)parentProgram.getCurrentInstruction(); if (bs.getLabel().equalsIgnoreCase(ri.getLabel())) { break; } } env.pop(true); parentProgram = env.peek(); } if (bs.getMode() != BranchingMode.CONTINUE) { env.incrementProgramCounter(); } }
public void process(ProcedurePlan env) throws TeiidComponentException { Program parentProgram = env.peek(); //find the parent program that contains the loop/while instruction while(true){ if (bs.getMode() == BranchingMode.LEAVE && bs.getLabel().equalsIgnoreCase(parentProgram.getLabel())) { env.pop(true); break; } if(parentProgram.getCurrentInstruction() instanceof RepeatedInstruction){ if (bs.getLabel() == null) { break; } RepeatedInstruction ri = (RepeatedInstruction)parentProgram.getCurrentInstruction(); if (bs.getLabel().equalsIgnoreCase(ri.getLabel())) { break; } } env.pop(true); parentProgram = env.peek(); } if (bs.getMode() != BranchingMode.CONTINUE) { env.incrementProgramCounter(); } }