Package java_cup

Class parse_action

java.lang.Object
java_cup.parse_action
Direct Known Subclasses:
nonassoc_action, reduce_action, shift_action

public class parse_action extends Object
This class serves as the base class for entries in a parse action table. Full entries will either be SHIFT(state_num), REDUCE(production), NONASSOC, or ERROR. Objects of this base class will default to ERROR, while the other three types will be represented by subclasses.
Version:
last updated: 7/2/96
Author:
Frank Flannery
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Constant for action type -- error action.
    static final int
    Constants for action type -- reduce action.
    static final int
    Constants for action type -- reduce action.
    static final int
    Constant for action type -- shift action.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Simple constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Equality test.
    boolean
    equals(Object other)
    Generic equality test.
    int
    Compute a hash code.
    int
    Quick access to the type -- base class defaults to error.
    Convert to string.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • ERROR

      public static final int ERROR
      Constant for action type -- error action.
      See Also:
    • SHIFT

      public static final int SHIFT
      Constant for action type -- shift action.
      See Also:
    • REDUCE

      public static final int REDUCE
      Constants for action type -- reduce action.
      See Also:
    • NONASSOC

      public static final int NONASSOC
      Constants for action type -- reduce action.
      See Also:
  • Constructor Details

    • parse_action

      public parse_action()
      Simple constructor.
  • Method Details

    • kind

      public int kind()
      Quick access to the type -- base class defaults to error.
    • equals

      public boolean equals(parse_action other)
      Equality test.
    • equals

      public boolean equals(Object other)
      Generic equality test.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Compute a hash code.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Convert to string.
      Overrides:
      toString in class Object