|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectdk.brics.servletvalidator.grammar.Production
public class Production
A single production is a list of AlphabetSymbols that a NonTerminal can derive. A production contains
a list of AlphabetSymbol that the production produces. A production belongs to
at most one NonTerminal.
| Constructor Summary | |
|---|---|
Production(AlphabetSymbol... symbols)
|
|
Production(LinkedList<AlphabetSymbol> us)
|
|
Production(List<AlphabetSymbol> us)
|
|
Production(Production p)
Clones the production p to the constructed object |
|
| Method Summary | |
|---|---|
void |
accept(GrammarEntityVisitor visitor)
Accepts the given grammar entity visitor in a visitor pattern |
boolean |
equals(Object o)
|
NonTerminal |
getNonTerminal()
Gets the non terminal that this production belongs to |
NonTerminal |
getSingleProduction()
Returns A if this productions is of the type -> A, else returns null |
LinkedList<AlphabetSymbol> |
getUs()
Gets the list of AlphabetSymbol in this production of type U* in the Grammar |
int |
hashCode()
|
boolean |
isEpsilonProduction()
Returns true iff the production only contains a single node that is an ε terminal, See Terminal.isEpsilon() |
void |
remove()
Removes this production from the NonTerminal that it belongs to. |
void |
replace(NonTerminal symbol,
Production symbolP)
Replaces the given nonTerminal by the list of AlphabetSymbol
that the given production produces. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Production(AlphabetSymbol... symbols)
public Production(LinkedList<AlphabetSymbol> us)
public Production(List<AlphabetSymbol> us)
public Production(Production p)
p - | Method Detail |
|---|
public void accept(GrammarEntityVisitor visitor)
GrammarEntity
accept in interface GrammarEntitypublic boolean equals(Object o)
equals in class Objectpublic NonTerminal getNonTerminal()
public NonTerminal getSingleProduction()
public LinkedList<AlphabetSymbol> getUs()
AlphabetSymbol in this production of type U* in the Grammar
public int hashCode()
hashCode in class Objectpublic boolean isEpsilonProduction()
Terminal.isEpsilon()
public void remove()
public void replace(NonTerminal symbol,
Production symbolP)
AlphabetSymbol
that the given production produces.
symbol - symbolP - public String toString()
toString in class Object
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||