/** Produce a hash code. */ public int hashCode() { return super.hashCode() ^ (the_symbol()==null ? 0 : the_symbol().hashCode()); }
/** Equality comparison. */ public boolean equals(symbol_part other) { return other != null && super.equals(other) && the_symbol().equals(other.the_symbol()); }
/** Produce a hash code. */ public int hashCode() { return super.hashCode() ^ (the_symbol()==null ? 0 : the_symbol().hashCode()); }
/** Equality comparison. */ public boolean equals(symbol_part other) { return other != null && super.equals(other) && the_symbol().equals(other.the_symbol()); }
/** Produce a hash code. */ public int hashCode() { return super.hashCode() ^ (the_symbol()==null ? 0 : the_symbol().hashCode()); }
/** Produce a hash code. */ public int hashCode() { return super.hashCode() ^ (the_symbol()==null ? 0 : the_symbol().hashCode()); }
/** Produce a hash code. */ public int hashCode() { return super.hashCode() ^ (the_symbol()==null ? 0 : the_symbol().hashCode()); }
/** Convert to a string. */ public String toString() { if (the_symbol() != null) return super.toString() + the_symbol(); else return super.toString() + "$$MISSING-SYMBOL$$"; }
/** Convert to a string. */ public String toString() { if (the_symbol() != null) return super.toString() + the_symbol(); else return super.toString() + "$$MISSING-SYMBOL$$"; }
/** Convert to a string. */ public String toString() { if (the_symbol() != null) return super.toString() + the_symbol(); else return super.toString() + "$$MISSING-SYMBOL$$"; }
/** Convert to a string. */ public String toString() { if (the_symbol() != null) return super.toString() + the_symbol(); else return super.toString() + "$$MISSING-SYMBOL$$"; }
/** helper routine to clone a new production part adding a given label */ protected production_part add_lab(production_part part, String lab) throws internal_error { /* if there is no label, or this is an action, just return the original */ if (lab == null || part.is_action()) return part; /* otherwise build a new one with the given label attached */ return new symbol_part(((symbol_part)part).the_symbol(),lab); }
/** helper routine to clone a new production part adding a given label */ protected production_part add_lab(production_part part, String lab) throws internal_error { /* if there is no label, or this is an action, just return the original */ if (lab == null || part.is_action()) return part; /* otherwise build a new one with the given label attached */ return new symbol_part(((symbol_part)part).the_symbol(),lab); }
/** helper routine to clone a new production part adding a given label */ protected production_part add_lab(production_part part, String lab) throws internal_error { /* if there is no label, or this is an action, just return the original */ if (lab == null || part.is_action()) return part; /* otherwise build a new one with the given label attached */ return new symbol_part(((symbol_part)part).the_symbol(),lab); }
/** Add a production to our set of productions. */ public void add_production(production prod) throws internal_error { /* catch improper productions */ if (prod == null || prod.lhs() == null || prod.lhs().the_symbol() != this) throw new internal_error( "Attempt to add invalid production to non terminal production table"); /* add it to the table, keyed with itself */ _productions.put(prod,prod); }
/** Add a production to our set of productions. */ public void add_production(production prod) throws internal_error { /* catch improper productions */ if (prod == null || prod.lhs() == null || prod.lhs().the_symbol() != this) throw new internal_error( "Attempt to add invalid production to non terminal production table"); /* add it to the table, keyed with itself */ _productions.put(prod,prod); }
/** Add a production to our set of productions. */ public void add_production(production prod) throws internal_error { /* catch improper productions */ if (prod == null || prod.lhs() == null || prod.lhs().the_symbol() != this) throw new internal_error( "Attempt to add invalid production to non terminal production table"); /* add it to the table, keyed with itself */ _productions.put(prod,prod); }
/** Convert to a simpler string. */ public String to_simple_string() throws internal_error { String result; result = ((lhs() != null) ? lhs().the_symbol().name() : "NULL_LHS"); result += " ::= "; for (int i = 0; i < rhs_length(); i++) if (!rhs(i).is_action()) result += ((symbol_part)rhs(i)).the_symbol().name() + " "; return result; }
/** Convert to a simpler string. */ public String to_simple_string() throws internal_error { String result; result = ((lhs() != null) ? lhs().the_symbol().name() : "NULL_LHS"); result += " ::= "; for (int i = 0; i < rhs_length(); i++) if (!rhs(i).is_action()) result += ((symbol_part)rhs(i)).the_symbol().name() + " "; return result; }
/** Convert to a simpler string. */ public String to_simple_string() throws internal_error { String result; result = ((lhs() != null) ? lhs().the_symbol().name() : "NULL_LHS"); result += " ::= "; for (int i = 0; i < rhs_length(); i++) if (!rhs(i).is_action()) result += ((symbol_part)rhs(i)).the_symbol().name() + " "; return result; }