|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectnet.sourceforge.chaperon.model.grammar.Production
public class Production
This class presents a production of a grammar
| Constructor Summary | |
|---|---|
Production()
Create an empty production. |
|
Production(Nonterminal ntsymbol)
Create a production. |
|
Production(Nonterminal ntsymbol,
SymbolList definition)
Create a production. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object o)
Compares the production with another production. |
SymbolList |
getDefinition()
Return the definition. |
int |
getLength()
Return the the length of the Definition |
java.lang.String |
getLocation()
Returns the location from the input source. |
Terminal |
getPrecedence()
Return the precedence symbol. |
Nonterminal |
getSymbol()
Return the symbol from this production |
SymbolSet |
getSymbols()
Return all used symbols in this production |
boolean |
hasPrecedence()
If the production contains a precedence symbol. |
void |
setDefinition(SymbolList definition)
Set the definition for this production |
void |
setLocation(java.lang.String location)
Set the location from the input source. |
void |
setPrecedence(Terminal tsymbol)
Set the precedence for this production by a terminal symbol |
void |
setSymbol(Nonterminal ntsymbol)
Set the symbol for this production |
java.lang.String |
toString()
Return a string representation of the production. |
Violations |
validate()
Validates the production. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Production()
public Production(Nonterminal ntsymbol)
ntsymbol - The symbol of this production.
public Production(Nonterminal ntsymbol,
SymbolList definition)
ntsymbol - The symbol of this production.definition - Definition of the production.| Method Detail |
|---|
public void setSymbol(Nonterminal ntsymbol)
ntsymbol - Non terminal symbolpublic Nonterminal getSymbol()
public void setDefinition(SymbolList definition)
definition - A list of symbols, which the definition of this production represented.public SymbolList getDefinition()
public int getLength()
public void setPrecedence(Terminal tsymbol)
tsymbol - Terminal symbolpublic Terminal getPrecedence()
public boolean hasPrecedence()
public SymbolSet getSymbols()
public void setLocation(java.lang.String location)
location - Location in the input source.public java.lang.String getLocation()
public Violations validate()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - Other object.
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||