/** Equality test. */ public boolean equals(parse_action other) { /* we match all error actions */ return other != null && other.kind() == ERROR; }
/** Equality test. */ public boolean equals(parse_action other) { return other != null && other.kind() == NONASSOC; }
/** Equality test. */ public boolean equals(parse_action other) { return other != null && other.kind() == NONASSOC; }
/** Equality test. */ public boolean equals(parse_action other) { return other != null && other.kind() == NONASSOC; }
/** Equality test. */ public boolean equals(parse_action other) { /* we match all error actions */ return other != null && other.kind() == ERROR; }
/** Equality test. */ public boolean equals(parse_action other) { return other != null && other.kind() == NONASSOC; }
/** Equality test. */ public boolean equals(parse_action other) { /* we match all error actions */ return other != null && other.kind() == ERROR; }
/** Equality test. */ public boolean equals(parse_action other) { /* we match all error actions */ return other != null && other.kind() == ERROR; }
/** Equality test. */ public boolean equals(parse_action other) { /* we match all error actions */ return other != null && other.kind() == ERROR; }
/** Equality test. */ public boolean equals(parse_action other) { return other != null && other.kind() == NONASSOC; }
/** Equality test. */ public boolean equals(parse_action other) { /* we match all error actions */ return other != null && other.kind() == ERROR; }
/** Equality test. */ public boolean equals(parse_action other) { return other != null && other.kind() == NONASSOC; }
/** Equality test. */ public boolean equals(parse_action other) { /* we match all error actions */ return other != null && other.kind() == ERROR; }
protected parse_action insert_action( parse_action a1, parse_action a2, int act_type) throws internal_error { if ((a1.kind() == act_type) && (a2.kind() == act_type)) { throw new internal_error("Conflict resolution of bogus actions"); } else if (a1.kind() == act_type) { return a1; } else if (a2.kind() == act_type) { return a2; } else { throw new internal_error("Conflict resolution of bogus actions"); } }
protected parse_action insert_action( parse_action a1, parse_action a2, int act_type) throws internal_error { if ((a1.kind() == act_type) && (a2.kind() == act_type)) { throw new internal_error("Conflict resolution of bogus actions"); } else if (a1.kind() == act_type) { return a1; } else if (a2.kind() == act_type) { return a2; } else { throw new internal_error("Conflict resolution of bogus actions"); } }
protected parse_action insert_action( parse_action a1, parse_action a2, int act_type) throws internal_error { if ((a1.kind() == act_type) && (a2.kind() == act_type)) { throw new internal_error("Conflict resolution of bogus actions"); } else if (a1.kind() == act_type) { return a1; } else if (a2.kind() == act_type) { return a2; } else { throw new internal_error("Conflict resolution of bogus actions"); } }
protected parse_action insert_action( parse_action a1, parse_action a2, int act_type) throws internal_error { if ((a1.kind() == act_type) && (a2.kind() == act_type)) { throw new internal_error("Conflict resolution of bogus actions"); } else if (a1.kind() == act_type) { return a1; } else if (a2.kind() == act_type) { return a2; } else { throw new internal_error("Conflict resolution of bogus actions"); } }
protected parse_action insert_action( parse_action a1, parse_action a2, int act_type) throws internal_error { if ((a1.kind() == act_type) && (a2.kind() == act_type)) { throw new internal_error("Conflict resolution of bogus actions"); } else if (a1.kind() == act_type) { return a1; } else if (a2.kind() == act_type) { return a2; } else { throw new internal_error("Conflict resolution of bogus actions"); } }
protected parse_action insert_action( parse_action a1, parse_action a2, int act_type) throws internal_error { if ((a1.kind() == act_type) && (a2.kind() == act_type)) { throw new internal_error("Conflict resolution of bogus actions"); } else if (a1.kind() == act_type) { return a1; } else if (a2.kind() == act_type) { return a2; } else { throw new internal_error("Conflict resolution of bogus actions"); } }
public String toString() { String result; int cnt; result = "-------- ACTION_TABLE --------\n"; for (int row = 0; row < num_states(); row++) { result += "From state #" + row + "\n"; cnt = 0; for (int col = 0; col < under_state[row].size(); col++) { /* if the action is not an error print it */ if (under_state[row].under_term[col].kind() != parse_action.ERROR) { result += col + ":" + under_state[row].under_term[col] + " "; /* end the line after the 3rd one */ cnt++; if (cnt == 3) { result += "\n"; cnt = 0; } } } /* finish the line if we haven't just done that */ if (cnt != 0) result += "\n"; } result += "------------------------------"; return result; }