public class ShiftTransition extends Object implements Transition
Constructor and Description |
---|
ShiftTransition() |
Modifier and Type | Method and Description |
---|---|
State |
apply(State state)
Add the new preterminal to the stack, increment the queue position.
|
State |
apply(State state,
double scoreDelta)
Add the new preterminal to the stack, increment the queue position.
|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isLegal(State state,
List<ParserConstraint> constraints)
Shifting is legal as long as the state is not finished and there
are more items on the queue to be shifted.
|
String |
toString() |
public boolean isLegal(State state, List<ParserConstraint> constraints)
isLegal
in interface Transition
public State apply(State state)
apply
in interface Transition
public State apply(State state, double scoreDelta)
apply
in interface Transition