/** Add a single terminal to the set. * @param sym the terminal being added. * @return true if this changes the set. */ public boolean add(terminal sym) throws internal_error { boolean result; not_null(sym); /* see if we already have this */ result = _elements.get(sym.index()); /* if not we add it */ if (!result) _elements.set(sym.index()); return result; }
/** Convert to a string. */ public String toString() { return super.toString() + "[" + index() + "]"; }
/** Determine if the set contains a particular terminal. * @param sym the terminal symbol we are looking for. */ public boolean contains(terminal sym) throws internal_error { not_null(sym); return _elements.get(sym.index()); }
/** Remove a terminal if it is in the set. * @param sym the terminal being removed. */ public void remove(terminal sym) throws internal_error { not_null(sym); _elements.clear(sym.index()); }
/** convert to string */ public String toString() { return super.toString() + "[" + index() + "]" + (nullable() ? "*" : ""); }
out.print(/* lhs symbol # */ prod.lhs().the_symbol().index() + ", "); out.print(/* rhs size */ prod.rhs_length() + "}");
prod_table[i][0] = (short) prod.lhs().the_symbol().index(); prod_table[i][1] = (short) prod.rhs_length();
prod_table[i][0] = (short) prod.lhs().the_symbol().index(); prod_table[i][1] = (short) prod.rhs_length();
prod_table[i][0] = (short) prod.lhs().the_symbol().index(); prod_table[i][1] = (short) prod.rhs_length();
prod_table[i][0] = (short) prod.lhs().the_symbol().index(); prod_table[i][1] = (short) prod.rhs_length();
prod_table[i][0] = (short) prod.lhs().the_symbol().index(); prod_table[i][1] = (short) prod.rhs_length();
if (!shift_sym.is_non_term() && shift_sym.index() == conflict_sym)
prod.lhs().the_symbol().stack_type() + "(/*" + prod.lhs().the_symbol().name() + "*/" + prod.lhs().the_symbol().index() + ");");
if (!shift_sym.is_non_term() && shift_sym.index() == conflict_sym)
if (!shift_sym.is_non_term() && shift_sym.index() == conflict_sym)
if (!shift_sym.is_non_term() && shift_sym.index() == conflict_sym)
if (!shift_sym.is_non_term() && shift_sym.index() == conflict_sym)
if (!shift_sym.is_non_term() && shift_sym.index() == conflict_sym)
if (!shift_sym.is_non_term() && shift_sym.index() == conflict_sym)