public class BasicProgramBlock extends ProgramBlock
_beginColumn, _beginLine, _endColumn, _endLine, _filename, _text, PRED_VAR
Constructor and Description |
---|
BasicProgramBlock(Program prog) |
Modifier and Type | Method and Description |
---|---|
void |
addInstruction(Instruction inst) |
void |
addInstructions(ArrayList<Instruction> inst) |
void |
execute(ExecutionContext ec)
Executes this program block (incl recompilation if required).
|
ArrayList<ProgramBlock> |
getChildBlocks()
Get the list of child program blocks if nested;
otherwise this method returns null.
|
Instruction |
getInstruction(int i) |
ArrayList<Instruction> |
getInstructions() |
int |
getNumInstructions() |
boolean |
isNested()
Indicates if the program block is nested, i.e.,
if it contains other program blocks (e.g., loops).
|
void |
setInstructions(ArrayList<Instruction> inst) |
executePredicate, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getExitInstruction, getFilename, getProgram, getStatementBlock, getText, getThreadID, hasThreadID, isThreadID, printBlockErrorLocation, setBeginColumn, setBeginLine, setEndColumn, setEndLine, setExitInstruction, setFilename, setParseInfo, setProgram, setStatementBlock, setText, setThreadID
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ctxAndFilenameToParseInfo
public BasicProgramBlock(Program prog)
public ArrayList<Instruction> getInstructions()
public Instruction getInstruction(int i)
public void setInstructions(ArrayList<Instruction> inst)
public void addInstruction(Instruction inst)
public void addInstructions(ArrayList<Instruction> inst)
public int getNumInstructions()
public ArrayList<ProgramBlock> getChildBlocks()
ProgramBlock
getChildBlocks
in class ProgramBlock
public boolean isNested()
ProgramBlock
isNested
in class ProgramBlock
public void execute(ExecutionContext ec)
ProgramBlock
execute
in class ProgramBlock
ec
- execution contextCopyright © 2020 The Apache Software Foundation. All rights reserved.