public class Action extends Object
Action and GoTo. The parsing table just points at the
entry point of the actions.
This class describes a transition from one state to another by
specifying the symbol and the destination. It is a mapping for a set of states
over a symbol.| Constructor and Description |
|---|
Action(Symbol symbol,
int stateNumber)
Construct an action
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getStateNumber() |
Symbol |
getSymbol() |
void |
setStateNumber(int stateNumber) |
void |
setSymbol(Symbol symbol) |
String |
toString()
Returns a phrase with the symbol and its destination
|
public Action(Symbol symbol, int stateNumber)
symbol - the symbol that will cause the actionstateNumber - the destination statepublic Symbol getSymbol()
public void setSymbol(Symbol symbol)
symbol - the symbol to setpublic int getStateNumber()
public void setStateNumber(int stateNumber)
stateNumber - the stateNumber to setpublic boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public String toString()
toString in class ObjectObject.toString()Copyright © 2017. All rights reserved.