コード例 #1
0
        public static List <ProductionExpression> operator |(List <ProductionExpression> list, AbstractTerminal term)
        {
            var builder = new ProductionExpressionBuilder(term);

            list.Add(builder.ToExpression());
            return(list);
        }
コード例 #2
0
        public static ProductionExpression operator +(AbstractTerminal old, string self)
        {
            var builder = new ProductionExpressionBuilder(old);

            builder.Append(self);
            return(builder.ToExpression());
        }
コード例 #3
0
        public static ProductionExpression operator +(AbstractTerminal self, ProductionExpression expr)
        {
            var builder = new ProductionExpressionBuilder(self);

            builder.Append(expr);
            return(builder.ToExpression());
        }
コード例 #4
0
        public static ProductionExpression operator +(ProductionExpression expr1, ProductionExpression expr2)
        {
            var builder = new ProductionExpressionBuilder(expr1);

            builder.Append(expr2);
            return(builder.ToExpression());
        }
コード例 #5
0
        public static ProductionExpression operator +(ProductionExpression expr, string str)
        {
            var builder = new ProductionExpressionBuilder(expr);

            builder.Append(str);
            return(builder.ToExpression());
        }
コード例 #6
0
        public Production Add(string str)
        {
            var builder = new ProductionExpressionBuilder(str);
            var expr    = builder.ToExpression();

            Add(expr);
            return(this);
        }