private static class LogicPrinter.PosTableStringBackend extends StringBackend
Backend
which puts its
result in a StringBuffer and builds a PositionTable. Position
table construction is done using the Layouter.mark(Object)
facility of the
layouter with the various static MARK_
objects
declared LogicPrinter
.Modifier and Type | Field and Description |
---|---|
private Range |
firstStmtRange |
private int |
firstStmtStart
These two remember the range corresponding to the first
executable statement in a JavaBlock
|
private InitialPositionTable |
initPosTbl
The top PositionTable
|
private java.util.Stack<java.lang.Integer> |
javaBlockStarts
Remembers the start of a java block to create a range.
|
private java.util.Stack<java.lang.Integer> |
keywordStarts
Remembers the start of a keyword to create a range.
|
private boolean |
need_modPosTable
If this is set, a ModalityPositionTable will
be built next.
|
private int |
pos
The position in result where the current subterm starts
|
private PositionTable |
posTbl
The resulting position table or an intermediate result
|
private java.util.Stack<LogicPrinter.StackEntry> |
stack
The stack of StackEntry representing the nodes above
the current subterm
|
private java.util.Stack<java.lang.Integer> |
updateStarts
Remembers the start of an update to create a range
|
initOutLength, lineWidth, out
Constructor and Description |
---|
PosTableStringBackend(int lineWidth) |
Modifier and Type | Method and Description |
---|---|
InitialPositionTable |
getInitialPositionTable()
Returns the constructed position table.
|
PositionTable |
getPositionTable()
Returns the constructed position table.
|
void |
mark(java.lang.Object o)
Receive a mark and act appropriately.
|
private final InitialPositionTable initPosTbl
private PositionTable posTbl
private int pos
private final java.util.Stack<LogicPrinter.StackEntry> stack
private boolean need_modPosTable
private int firstStmtStart
private Range firstStmtRange
private final java.util.Stack<java.lang.Integer> updateStarts
private final java.util.Stack<java.lang.Integer> keywordStarts
private final java.util.Stack<java.lang.Integer> javaBlockStarts
public PositionTable getPositionTable()
public InitialPositionTable getInitialPositionTable()
public void mark(java.lang.Object o)
mark
in interface Backend
mark
in class StringBackend