org.metasyntactic.math.automata
Class LRParseTable.Reduce

java.lang.Object
  |
  +--org.metasyntactic.math.automata.LRParseTable.Action
        |
        +--org.metasyntactic.math.automata.LRParseTable.Reduce
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
LRParseTable

public class LRParseTable.Reduce
extends LRParseTable.Action

If action[am, ai] = reduce A → Β, then the parser executes a reduce move. Let us define r as the length of Β. The parser first popped 2r symbols off the stack (r state symbols, and r grammar symbols). The parser then pushes A, the left side of the production, and s, the entry for goto[sm-r, A], onto the stack.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.metasyntactic.math.automata.LRParseTable.Action
state
 
Constructor Summary
protected LRParseTable.Reduce(Production prod)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LRParseTable.Reduce

protected LRParseTable.Reduce(Production prod)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class LRParseTable.Action

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in class LRParseTable.Action

hashCode

public int hashCode()
Specified by:
hashCode in class LRParseTable.Action