ControlStruct¶
-
public abstract class
ControlStruct
¶ Abstract class for IfThenElse, Let, Loop, Switch,.. Controls.
Fields¶
aboveControlStruct¶
-
protected ControlStruct
aboveControlStruct
¶
Methods¶
addControlStruct¶
-
protected abstract void
addControlStruct
(ControlStruct struct, FGArrow arrow)¶ Insert the given “struct” into this ControlStruct, at the correct place determined by “arrow”.
checkLabels¶
dump¶
-
public void
dump
(int indent)¶ Prints in detail the contents of this ControlStruct, onto TapEnv.curOutputStream().
- Parameters
indent – the amount of indentation to be used for this printing.
generateTree¶
generateTreeChained¶
getBlock¶
-
protected ControlStruct
getBlock
(Block block)¶
insertInstructionTree¶
insertLetStructure¶
-
protected abstract void
insertLetStructure
()¶ (Recursive) Inserts Let structures into the tree of ControlStruct’s to reflect nested local SymbolTable’s.
insertLetStructureChained¶
-
protected static TapList<ControlStruct>
insertLetStructureChained
(TapList<ControlStruct> chainedStructs, SymbolTable refSymbolTable)¶
preGenerateBody¶
-
protected Tree
preGenerateBody
(TapList<Instruction> instructions, TapList<FGArrow> naturalArrows, TapList<TapTriplet<Tree, Tree, Integer>> toFutureIncludes, TapList<Tree> fileUserHelpStrings, boolean skipSubUnits)¶ Utility called during preGenerateTree(). Prepares the list of instructions of the current Block, taking care of removing empty and phantom instructions, but keeping the comments at the best possible place.
- Returns
the last instruction Tree.
preGenerateTree¶
-
protected abstract TapList<FGArrow>
preGenerateTree
(TapList<FGArrow> naturalArrows, TapList<TapTriplet<Tree, Tree, Integer>> toFutureIncludes, TapList<Tree> fileUserHelpStrings, TapList<ControlStruct> enclosingStructs, boolean skipSubUnits)¶ (Recursive) preparation before tree regeneration. Labels the arrows that need explicit jumps, prepares the skeleton of the future Tree.
- Returns
a TapList of FGArrow
preGenerateTreeChained¶
propagateNaturalFlow¶
propagateNaturalFlowChained¶
-
protected static TapList<FGArrow>
propagateNaturalFlowChained
(TapList<ControlStruct> chainedStructs)¶
propagateNaturalNext¶
propagateNaturalNextChained¶
-
protected static void
propagateNaturalNextChained
(TapList<ControlStruct> chainedStructs, Block lastNaturalNext)¶
putDirectivesBackAsComments¶
reorderBody¶
-
protected abstract void
reorderBody
()¶ (Recursive) Orders the lists of control structures inside, following the order of the block ranks…
reorderBodyChained¶
-
protected static TapList<ControlStruct>
reorderBodyChained
(TapList<ControlStruct> chainedStructs)¶