Commit d229273e authored by Hiroki Teranishi's avatar Hiroki Teranishi
Browse files

improved ArcStandardTransitionSystem.PerformRightArc()

parent 71bf3d47
...@@ -269,9 +269,7 @@ class ArcStandardTransitionSystem : public ParserTransitionSystem { ...@@ -269,9 +269,7 @@ class ArcStandardTransitionSystem : public ParserTransitionSystem {
void PerformRightArc(ParserState *state, int label) const { void PerformRightArc(ParserState *state, int label) const {
DCHECK(IsAllowedRightArc(*state)); DCHECK(IsAllowedRightArc(*state));
int s0 = state->Pop(); int s0 = state->Pop();
int s1 = state->Pop(); state->AddArc(s0, state->Top(), label);
state->AddArc(s0, s1, label);
state->Push(s1);
} }
// We are in a deterministic state when we either reached the end of the input // We are in a deterministic state when we either reached the end of the input
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment