4 /** This class represents a shift/reduce nonassociative error within the
5 * parse table. If action_table element is assign to type
6 * nonassoc_action, it cannot be changed, and signifies that there
7 * is a conflict between shifting and reducing a production and a
8 * terminal that shouldn't be next to each other.
10 * @version last updated: 7/2/96
11 * @author Frank Flannery
13 public class nonassoc_action extends parse_action {
15 /*-----------------------------------------------------------*/
16 /*--- Constructor(s) ----------------------------------------*/
17 /*-----------------------------------------------------------*/
19 /** Simple constructor.
21 public nonassoc_action() throws internal_error
23 /* don't need to set anything, since it signifies error */
26 /*-----------------------------------------------------------*/
27 /*--- General Methods ---------------------------------------*/
28 /*-----------------------------------------------------------*/
30 /** Quick access to type of action. */
31 public int kind() {return NONASSOC;}
33 /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
36 public boolean equals(parse_action other)
38 return other != null && other.kind() == NONASSOC;
41 /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
43 /** Generic equality test. */
44 public boolean equals(Object other)
46 if (other instanceof parse_action)
47 return equals((parse_action)other);
52 /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
54 /** Compute a hash code. */
57 /* all objects of this class hash together */
63 /** Convert to string. */
64 public String toString()
69 /*-----------------------------------------------------------*/