public static Production Or(string name) { ProductionOfOr production = new ProductionOfOr(); production.name = name; return(production); }
public override Production Copy() { ProductionOfOr production = new ProductionOfOr(); production.name = this.name; this.CopyChildrenTo(production); return(production); }
public static Production operator |(Production lhs, Production rhs) { ProductionOfOr parent = new ProductionOfOr(); parent.Add(lhs); parent.Add(rhs); return(parent); }
public static Production operator |(Production lhs, int tokenID) { ProductionOfOr parent = new ProductionOfOr(); parent.Add(lhs); parent.Add(new ProductionOfInt() { tokenid = tokenID }); return(parent); }
public static Production operator |(string content, Production rhs) { ProductionOfOr parent = new ProductionOfOr(); parent.Add(new ProductionOfString() { content = content }); parent.Add(rhs); return(parent); }
public override void Add(Production rhs) { ProductionOfOr or = rhs as ProductionOfOr; if (or) { children.AddRange(or.children); } else { children.Add(rhs); } }