FileDocCategorySizeDatePackage
parse_action.javaAPI DocJava SE 5 API2826Fri Aug 26 14:54:54 BST 2005com.sun.java_cup.internal

parse_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.
see
com.sun.java_cup.internal.reduce_action
see
com.sun.java_cup.internal.shift_action
version
last updated: 7/2/96
author
Frank Flannery

Fields Summary
public static final int
ERROR
Constant for action type -- error action.
public static final int
SHIFT
Constant for action type -- shift action.
public static final int
REDUCE
Constants for action type -- reduce action.
public static final int
NONASSOC
Constants for action type -- reduce action.
Constructors Summary
public parse_action()
Simple constructor.

      /* nothing to do in the base class */
    
Methods Summary
public booleanequals(com.sun.java_cup.internal.parse_action other)
Equality test.

      /* we match all error actions */
      return other != null && other.kind() == ERROR;
    
public booleanequals(java.lang.Object other)
Generic equality test.

      if (other instanceof parse_action)
	return equals((parse_action)other);
      else
	return false;
    
public inthashCode()
Compute a hash code.

      /* all objects of this class hash together */
      return 0xCafe123;
    
public intkind()
Quick access to the type -- base class defaults to error.


  /*-----------------------------------------------------------*/
  /*--- General Methods ---------------------------------------*/
  /*-----------------------------------------------------------*/
	 
              
     return ERROR;
public java.lang.StringtoString()
Convert to string.

return "ERROR";