| java.lang.Object net.sourceforge.chaperon.model.grammar.Production
Production | public class Production implements Serializable,Cloneable(Code) | | This class presents a production of a grammar
author: Stephan Michels version: CVS $Id: Production.java,v 1.6 2003/12/09 19:55:52 benedikta Exp $ |
Production | public Production()(Code) | | Create an empty production.
|
Production | public Production(Nonterminal ntsymbol)(Code) | | Create a production.
Parameters: ntsymbol - The symbol of this production. |
Production | public Production(Nonterminal ntsymbol, SymbolList definition)(Code) | | Create a production.
Parameters: ntsymbol - The symbol of this production. Parameters: definition - Definition of the production. |
equals | public boolean equals(Object o)(Code) | | Compares the production with another production.
Parameters: o - Other object. True, if the production are equal. |
getDefinition | public SymbolList getDefinition()(Code) | | Return the definition.
A list of Symbols, which the definition of this production represented. |
getLength | public int getLength()(Code) | | Return the the length of the Definition
Lengt of the Definition |
getLocation | public String getLocation()(Code) | | Returns the location from the input source.
Location in the input source. |
getPrecedence | public Terminal getPrecedence()(Code) | | Return the precedence symbol.
Terminal symbol. |
getSymbol | public Nonterminal getSymbol()(Code) | | Return the symbol from this production
Nonterminal symbol |
getSymbols | public SymbolSet getSymbols()(Code) | | Return all used symbols in this production
Set of symbols. |
hasPrecedence | public boolean hasPrecedence()(Code) | | If the production contains a precedence symbol.
True, if a precedence symbol is defined. |
setDefinition | public void setDefinition(SymbolList definition)(Code) | | Set the definition for this production
Parameters: definition - A list of symbols, which the definition of this production represented. |
setLocation | public void setLocation(String location)(Code) | | Set the location from the input source.
Parameters: location - Location in the input source. |
setPrecedence | public void setPrecedence(Terminal tsymbol)(Code) | | Set the precedence for this production by a terminal symbol
Parameters: tsymbol - Terminal symbol |
setSymbol | public void setSymbol(Nonterminal ntsymbol)(Code) | | Set the symbol for this production
Parameters: ntsymbol - Non terminal symbol |
toString | public String toString()(Code) | | Return a string representation of the production.
String representation of the production. |
validate | public Violations validate()(Code) | | Validates the production.
Return a list of violations, if this object isn't valid. |
|
|