|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectasd.ASDGrammarNode
public class ASDGrammarNode
Instances are nodes in an ASDGrammar
| Field Summary | |
|---|---|
protected boolean |
hasIncoming
|
protected boolean |
nodeBegins
|
protected java.util.ArrayList<java.lang.String> |
nodeBeginsTypes
|
protected java.lang.String |
nodeInstance
|
protected java.lang.String |
nodePhraseType
|
protected java.lang.String |
nodeSemanticAction
|
protected java.lang.String |
nodeSemanticValue
|
protected java.util.ArrayList<ASDGrammarSuccessor> |
nodeSuccessors
|
protected java.util.ArrayList<java.lang.String> |
nodeSuccessorTypes
|
protected java.lang.String |
nodeWord
|
protected short |
xCoordinate
|
protected short |
yCoordinate
|
| Constructor Summary | |
|---|---|
ASDGrammarNode(java.lang.String word,
java.lang.String instance,
boolean begins,
java.util.ArrayList<java.lang.String> beginsTypes,
java.util.ArrayList<ASDGrammarSuccessor> successors,
java.util.ArrayList<java.lang.String> successorTypes,
java.lang.String phraseType,
java.lang.String semanticValue,
java.lang.String semanticAction)
Initializes a new ASDGrammarNode. |
|
| Method Summary | |
|---|---|
java.util.ArrayList<java.lang.String> |
beginsTypes()
Returns a list of strings that name the phrase types that can begin, directly or indirectly, at the node (if it is an initial node); returns null if the node is not initial or if the phrase types that it can begin are not known specifically. |
short |
getXCoordinate()
Returns the horizontal pixel coordinate of the node. |
short |
getYCoordinate()
Returns the vertical pixel coordinate of the node. |
java.lang.String |
instance()
Returns the String that indicates the instance of the word in the grammar that is represented by the node. |
boolean |
isFinal()
Indicates whether or not the node is a final one in the grammar -- that is, whether it ends a phrase. |
boolean |
isInitial()
Indicates whether or not the node is an initial one in the grammar -- that is, whether it can begin a phrase. |
java.lang.String |
phraseType()
Returns a String that names the phrase type that ends at the node, if the node is a final node; returns null if the string is not a final node. |
java.lang.String |
semanticAction()
Returns the semantic action String for the node, or null if it has no semantic action to perform. |
java.lang.String |
semanticValue()
Returns the semantic value String for the node, or null if it has no semantic value to compute |
java.util.ArrayList<ASDGrammarSuccessor> |
successors()
Returns a list of successor instances of the node, if it is not a final node in the grammar (each successor instance is represented by an ASDGrammarSuccessor instance); returns null if the node is a final node. |
java.util.ArrayList<java.lang.String> |
successorTypes()
Returns a list of Strings that name the phrase types that occur in successors of the node, if it is not a final node; returns null if the node has some unspecified phrase types in successors, or if the node is a final node. |
java.lang.String |
toString()
Returns a String that represents an ASDGrammarNode in character form optimized for parsing. |
java.lang.String |
toString(boolean optimize)
Returns a String that represents an ASDGrammarNode in character form, as used for the representation of a word instance in the character file representation of an ASD grammar. |
java.lang.String |
word()
Returns the word in the node |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String nodeWord
protected java.lang.String nodeInstance
protected boolean nodeBegins
protected java.util.ArrayList<java.lang.String> nodeBeginsTypes
protected java.util.ArrayList<ASDGrammarSuccessor> nodeSuccessors
protected java.util.ArrayList<java.lang.String> nodeSuccessorTypes
protected java.lang.String nodePhraseType
protected java.lang.String nodeSemanticValue
protected java.lang.String nodeSemanticAction
protected short xCoordinate
protected short yCoordinate
protected boolean hasIncoming
| Constructor Detail |
|---|
public ASDGrammarNode(java.lang.String word,
java.lang.String instance,
boolean begins,
java.util.ArrayList<java.lang.String> beginsTypes,
java.util.ArrayList<ASDGrammarSuccessor> successors,
java.util.ArrayList<java.lang.String> successorTypes,
java.lang.String phraseType,
java.lang.String semanticValue,
java.lang.String semanticAction)
word - the vocabulary element for which
the node represents an instanceinstance - the instance index of the nodebegins - indicates whether or not the node
can begin a phrasebeginsTypes - indicates what types of
phrase (if any) can begin at the node; null
indicates unspecified typessuccessors - lists pairs (word instance-index)
of successors of the node in the grammar, if any;
null indicates that the node is a final nodesuccessorTypes - lists the phrase types in
the successor nodes (if any); if successors is
not null, null here indicates that there are
successor phrase types with unspecified namesphraseType - names the phrase type that
ends at the node, if the node is a final onesemanticValue - a String to be evaluated as
the semantic value of the completed phrase,
if the node is a final one; null indicates no
semantic value to be computedsemanticAction - a String to be evaluated
when the node is entered during a parse; null
indicates no semantic action to be performed| Method Detail |
|---|
public java.util.ArrayList<java.lang.String> beginsTypes()
public short getXCoordinate()
public short getYCoordinate()
public java.lang.String instance()
public boolean isFinal()
public boolean isInitial()
public java.lang.String phraseType()
public java.lang.String semanticAction()
public java.lang.String semanticValue()
public java.util.ArrayList<ASDGrammarSuccessor> successors()
public java.util.ArrayList<java.lang.String> successorTypes()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(boolean optimize)
optimize - indicates whether or not the node should be
converted to a form that is optimized for parsing.public java.lang.String word()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||