org.inxar.syntacs.automaton.pushdown
Interface Action

All Known Implementing Classes:
StandardAction

public interface Action

This is an abstraction of a DPA parse 'action'. Each action has an id, a type (one of the constants in this class), and a value which may be used for two purposes. If action.getType() == SHIFT, the value is used to hold the next state to shift to, else if action.getType() == REDUCE, the value is used to hold the number of the Production to reduce.


Field Summary
static int ACCEPT
          The ACCEPT instruction type.
static int ERROR
          The ERROR instruction type.
static int REDUCE
          The REDUCE instruction type.
static int SHIFT
          The SHIFT instruction type.
 
Method Summary
 int getType()
          The type of this action, one of (ERROR|SHIFT|REDUCE|ACCEPT).
 int getValue()
          A generic container for additional action information.
 

Field Detail

ERROR

public static final int ERROR
The ERROR instruction type.

SHIFT

public static final int SHIFT
The SHIFT instruction type.

REDUCE

public static final int REDUCE
The REDUCE instruction type.

ACCEPT

public static final int ACCEPT
The ACCEPT instruction type.
Method Detail

getType

public int getType()
The type of this action, one of (ERROR|SHIFT|REDUCE|ACCEPT).

getValue

public int getValue()
A generic container for additional action information.