|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectnet.sourceforge.chaperon.model.lexicon.Lexeme
public class Lexeme
This class represents a lexeme within a lexicon. The lexeme associates a terminal symbol to a pattern.
| Constructor Summary | |
|---|---|
Lexeme()
Create a lexeme. |
|
Lexeme(Symbol symbol)
Create a lexeme. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Creates a clone of this lexeme. |
Pattern |
getDefinition()
Return the definition. |
java.lang.String |
getLocation()
Returns the location from the input source. |
Symbol |
getSymbol()
Return the symbol for this lexeme. |
void |
setDefinition(Pattern definition)
Set a pattern as definition for this lexeme. |
void |
setLocation(java.lang.String location)
Set the location from the input source. |
void |
setSymbol(Symbol symbol)
Set the terminal symbol for this lexeme. |
java.lang.String |
toString()
Return a string representation of the lexeme. |
Violations |
validate()
Validate the lexeme. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Lexeme()
public Lexeme(Symbol symbol)
symbol - Terminal symbol for this lexeme.| Method Detail |
|---|
public void setSymbol(Symbol symbol)
symbol - Terminal symbol.public Symbol getSymbol()
public void setDefinition(Pattern definition)
definition - Definition of the lexeme.public Pattern getDefinition()
public void setLocation(java.lang.String location)
location - Location in the input source.public java.lang.String getLocation()
public Violations validate()
public java.lang.String toString()
toString in class java.lang.Object
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - If an exception occurs during the cloning.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||