/// <summary>helper routine to clone a new production part adding a given label /// </summary> protected virtual production_part add_lab(production_part part, string lab) { /* 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); }