/** Generic equality comparison. */ public boolean equals(Object other) { if (!(other instanceof production_part)) return false; else return equals((production_part)other); }
/** Helper routine to strip a trailing action off rhs and return it * @param rhs_parts array of RHS parts. * @param len how many of those are valid. * @return the removed action part. */ protected action_part strip_trailing_action( production_part rhs_parts[], int len) { action_part result; /* bail out early if we have nothing to do */ if (rhs_parts == null || len == 0) return null; /* see if we have a trailing action */ if (rhs_parts[len-1].is_action()) { /* snip it out and return it */ result = (action_part)rhs_parts[len-1]; rhs_parts[len-1] = null; return result; } else return null; }
/** Produce a hash code. */ public int hashCode() { return super.hashCode() ^ (code_string()==null ? 0 : code_string().hashCode()); }
/** Convert to a string. */ public String toString() { return super.toString() + "{" + code_string() + "}"; }
/** Produce a hash code. */ public int hashCode() { return super.hashCode() ^ (the_symbol()==null ? 0 : the_symbol().hashCode()); }
/** Helper routine to strip a trailing action off rhs and return it * @param rhs_parts array of RHS parts. * @param len how many of those are valid. * @return the removed action part. */ protected action_part strip_trailing_action( production_part rhs_parts[], int len) { action_part result; /* bail out early if we have nothing to do */ if (rhs_parts == null || len == 0) return null; /* see if we have a trailing action */ if (rhs_parts[len-1].is_action()) { /* snip it out and return it */ result = (action_part)rhs_parts[len-1]; rhs_parts[len-1] = null; return result; } else return null; }
/** Generic equality comparison. */ public boolean equals(Object other) { if (!(other instanceof production_part)) return false; else return equals((production_part)other); }
/** Convert to a string. */ public String toString() { return super.toString() + "{" + code_string() + "}"; }
/** Produce a hash code. */ public int hashCode() { return super.hashCode() ^ (the_symbol()==null ? 0 : the_symbol().hashCode()); }
/** Helper routine to strip a trailing action off rhs and return it * @param rhs_parts array of RHS parts. * @param len how many of those are valid. * @return the removed action part. */ protected action_part strip_trailing_action( production_part rhs_parts[], int len) { action_part result; /* bail out early if we have nothing to do */ if (rhs_parts == null || len == 0) return null; /* see if we have a trailing action */ if (rhs_parts[len-1].is_action()) { /* snip it out and return it */ result = (action_part)rhs_parts[len-1]; rhs_parts[len-1] = null; return result; } else return null; }
/** Generic equality comparison. */ public boolean equals(Object other) { if (!(other instanceof production_part)) return false; else return equals((production_part)other); }
/** Produce a hash code. */ public int hashCode() { return super.hashCode() ^ (code_string()==null ? 0 : code_string().hashCode()); }
/** Helper routine to strip a trailing action off rhs and return it * @param rhs_parts array of RHS parts. * @param len how many of those are valid. * @return the removed action part. */ protected action_part strip_trailing_action( production_part rhs_parts[], int len) { action_part result; /* bail out early if we have nothing to do */ if (rhs_parts == null || len == 0) return null; /* see if we have a trailing action */ if (rhs_parts[len-1].is_action()) { /* snip it out and return it */ result = (action_part)rhs_parts[len-1]; rhs_parts[len-1] = null; return result; } else return null; }
/** Generic equality comparison. */ public boolean equals(Object other) { if (!(other instanceof production_part)) return false; else return equals((production_part)other); }