Esempio n. 1
0
        public static Production Or(string name)
        {
            ProductionOfOr production = new ProductionOfOr();

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

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

            parent.Add(lhs);
            parent.Add(rhs);
            return(parent);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 6
0
        public override void Add(Production rhs)
        {
            ProductionOfOr or = rhs as ProductionOfOr;

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