|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectenumeration.MyEnumerator
public abstract class MyEnumerator
Abstract enumerator, enumerating the sentences or parse trees of a general context-free grammar in hierarchical lexicographic order.
| Field Summary | |
|---|---|
ResultType |
resultType
The result type of the output |
| Constructor Summary | |
|---|---|
MyEnumerator()
|
|
| Method Summary | |
|---|---|
java.lang.String |
firstHierarchy(int n)
Returns the first concise parse tree of hierarchy[n] |
java.lang.String |
getCurrentTree()
Returns the current concise tree |
MyGrammar |
getGrammar()
Returns the grammar |
java.lang.String |
getParseTree()
Returns the current parse tree. |
MySentence |
getSentence()
Returns the current sentence |
int |
getStartIndex()
Returns the start index of the grammar |
java.lang.String |
lastHierarchy(int n)
Returns the last concise parse tree of hierarchy[n] |
java.lang.String |
next()
Generates the next element. |
java.lang.String |
next(java.lang.String ctree)
Returns the next concise tree of a given concise tree |
java.lang.String |
previous()
Generates the previous element |
java.lang.String |
previous(java.lang.String ctree)
Returns the previous concise tree of a given concise tree |
abstract void |
setGrammar(MyGrammar grammar)
Sets the grammar |
void |
setSentence(java.lang.String sentence)
Sets the current sentence. |
void |
setStartIndex(int i)
Sets the start index to i |
java.lang.String |
start()
Returns the first element of L[start] |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public ResultType resultType
| Constructor Detail |
|---|
public MyEnumerator()
| Method Detail |
|---|
public java.lang.String start()
public java.lang.String next()
public java.lang.String next(java.lang.String ctree)
ctree - the given concise tree
public java.lang.String previous()
public java.lang.String previous(java.lang.String ctree)
ctree - the given concise tree
public MyGrammar getGrammar()
public abstract void setGrammar(MyGrammar grammar)
grammar - the grammar to set
java.lang.IllegalArgumentException - if the grammar has useless nonterminalspublic void setStartIndex(int i)
i - the start index to setpublic int getStartIndex()
public java.lang.String getCurrentTree()
public java.lang.String getParseTree()
public MySentence getSentence()
public void setSentence(java.lang.String sentence)
sentence - the sentence to set
java.lang.IllegalArgumentException - if the sentence does not belong to the grammarpublic java.lang.String firstHierarchy(int n)
n - the hierarchy index
public java.lang.String lastHierarchy(int n)
n - the hierarchy index
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||