if (itm1.the_production().index() < itm2.the_production().index()) System.err.println("the first production.\n"); else
System.out.print(itm.the_production().lhs().the_symbol().name()); System.out.print(" ::= "); for (int i = 0; i<itm.the_production().rhs_length(); i++) part = itm.the_production().rhs(i); if (part.is_action()) System.out.print("{action} ");
for (int pos = dot_pos() + 1; pos < the_production().rhs_length(); pos++) part = the_production().rhs(pos);
/** Produce the new lalr_item that results from shifting the dot one position * to the right. */ public lalr_item shift() throws internal_error { lalr_item result; /* can't shift if we have dot already at the end */ if (dot_at_end()) throw new internal_error("Attempt to shift past end of an lalr_item"); /* create the new item w/ the dot shifted by one */ result = new lalr_item(the_production(), dot_pos()+1, new terminal_set(lookahead())); /* change in our lookahead needs to be propagated to this item */ add_propagate(result); return result; }
for (pos = dot_pos()+1; pos < the_production().rhs_length(); pos++) part = the_production().rhs(pos);
act = new reduce_action(itm.the_production()); if (itm.the_production().index() < ((reduce_action)other_act).reduce_with().index()) if(fix_with_precedence(itm.the_production(), t, our_act_row, act)) { term = null;