com.inxar.syntacs.automaton.pushdown
Class ArrayDPAConstructor
java.lang.Object
|
+--com.inxar.syntacs.automaton.pushdown.ArrayDPAConstructor
- All Implemented Interfaces:
- DPAConstructor, Vizualizable
- public class ArrayDPAConstructor
- extends Object
- implements DPAConstructor, Vizualizable
Concrete implementation of DPAConstructor
which
builds an ArrayDFA
. This class handles state
management and parse table encoding functionality and is typically
employed compositionally by other "higher-level" LR construction
algorithms. Thus, this is one of the inner layers of the onion.
Method Summary |
void |
accept(int state,
int symbol)
|
DPA |
construct(ContextFreeSet grammar)
Constructs a DPA . |
void |
go(int state,
int symbol,
int nextState)
|
void |
reduce(int state,
int symbol,
int production)
|
void |
shift(int state,
int symbol,
int nextState)
|
String |
toString()
|
void |
vizualize(GraphViz dot)
Burn state to the GraphViz instance such that the instance may
be visualized in postscript. |
ArrayDPAConstructor
public ArrayDPAConstructor(ContextFreeSet grammar)
shift
public void shift(int state,
int symbol,
int nextState)
throws AmbiguityException
reduce
public void reduce(int state,
int symbol,
int production)
throws AmbiguityException
accept
public void accept(int state,
int symbol)
throws AmbiguityException
go
public void go(int state,
int symbol,
int nextState)
throws AmbiguityException
construct
public DPA construct(ContextFreeSet grammar)
throws AlgorithmException
- Description copied from interface:
DPAConstructor
- Constructs a
DPA
.
- Specified by:
construct
in interface DPAConstructor
toString
public String toString()
- Overrides:
toString
in class Object
vizualize
public void vizualize(GraphViz dot)
- Description copied from interface:
Vizualizable
- Burn state to the GraphViz instance such that the instance may
be visualized in postscript.
- Specified by:
vizualize
in interface Vizualizable