/** 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); }