java_cup
Class reduce_action

java.lang.Object
  extended by java_cup.parse_action
      extended by java_cup.reduce_action

public class reduce_action
extends parse_action

This class represents a reduce action within the parse table. The action simply stores the production that it reduces with and responds to queries about its type.

Version:
last updated: 11/25/95
Author:
Scott Hudson

Field Summary
 
Fields inherited from class java_cup.parse_action
ERROR, NONASSOC, REDUCE, SHIFT
 
Constructor Summary
reduce_action(production prod)
          Simple constructor.
 
Method Summary
 boolean equals(java.lang.Object other)
          Generic equality test.
 boolean equals(reduce_action other)
          Equality test.
 int hashCode()
          Compute a hash code.
 int kind()
          Quick access to type of action.
 production reduce_with()
          The production we reduce with.
 java.lang.String toString()
          Convert to string.
 
Methods inherited from class java_cup.parse_action
equals
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

reduce_action

public reduce_action(production prod)
              throws internal_error
Simple constructor.

Parameters:
prod - the production this action reduces with.
Throws:
internal_error
Method Detail

reduce_with

public production reduce_with()
The production we reduce with.


kind

public int kind()
Quick access to type of action.

Overrides:
kind in class parse_action

equals

public boolean equals(reduce_action other)
Equality test.


equals

public boolean equals(java.lang.Object other)
Generic equality test.

Overrides:
equals in class parse_action

hashCode

public int hashCode()
Compute a hash code.

Overrides:
hashCode in class parse_action

toString

public java.lang.String toString()
Convert to string.

Overrides:
toString in class parse_action