|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gate.yam.translate.Cursor
public class Cursor
Helper class for pretty-printer. Represents a position in a tree traversal, and provides manipulation of spacing at that position.
Field Summary | |
---|---|
NodeKind |
previousKind
Previous position type. |
Constructor Summary | |
---|---|
Cursor(SimpleNode rootNode,
int leadingMin,
int leadingMax)
Construction from parse tree root node. |
Method Summary | |
---|---|
void |
advance()
Advance to the next Unit or Word sequence. |
boolean |
atEnd()
Finished the document? |
void |
blanksAfter(int min,
int max)
Set the number of blank lines following this position. |
void |
blanksAfter(int norm,
int min,
int max)
Set the number of blank lines following this position. |
void |
blanksAfter(Token gapStart,
Token gapEnd,
int norm,
int min,
int max)
Set the number of blank lines in a token sequence. |
NodeKind |
findNodeKind(SimpleNode n)
Type of the next node after the current Sep sequence. |
SimpleNode |
getHereNode()
First node in current position. |
NodeKind |
getKind()
Position type. |
NodeKind |
getNextKind()
Next position type. |
SimpleNode |
getNextNode()
Next node from current position. |
NodeKind |
getPreviousKind()
Previous position type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public NodeKind previousKind
Constructor Detail |
---|
public Cursor(SimpleNode rootNode, int leadingMin, int leadingMax)
Method Detail |
---|
public void advance()
public NodeKind findNodeKind(SimpleNode n)
public SimpleNode getHereNode()
public NodeKind getKind()
public NodeKind getPreviousKind()
public SimpleNode getNextNode()
public NodeKind getNextKind()
public boolean atEnd()
public void blanksAfter(int min, int max)
public void blanksAfter(int norm, int min, int max)
public void blanksAfter(Token gapStart, Token gapEnd, int norm, int min, int max)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |