Beispiel #1
0
        public static Production Or(string name)
        {
            ProductionOfOr production = new ProductionOfOr();

            production.name = name;
            return(production);
        }
Beispiel #2
0
        public override Production Copy()
        {
            ProductionOfOr production = new ProductionOfOr();

            production.name = this.name;
            this.CopyChildrenTo(production);
            return(production);
        }
Beispiel #3
0
        public static Production operator |(Production lhs, Production rhs)
        {
            ProductionOfOr parent = new ProductionOfOr();

            parent.Add(lhs);
            parent.Add(rhs);
            return(parent);
        }
Beispiel #4
0
        public static Production operator |(Production lhs, int tokenID)
        {
            ProductionOfOr parent = new ProductionOfOr();

            parent.Add(lhs);
            parent.Add(new ProductionOfInt()
            {
                tokenid = tokenID
            });
            return(parent);
        }
Beispiel #5
0
        public static Production operator |(string content, Production rhs)
        {
            ProductionOfOr parent = new ProductionOfOr();

            parent.Add(new ProductionOfString()
            {
                content = content
            });
            parent.Add(rhs);
            return(parent);
        }
Beispiel #6
0
        public override void Add(Production rhs)
        {
            ProductionOfOr or = rhs as ProductionOfOr;

            if (or)
            {
                children.AddRange(or.children);
            }
            else
            {
                children.Add(rhs);
            }
        }