Example #1
0
        /// <summary>
        ///     Appends the specified operator to the expression by first
        ///     reducing the operator stack and then pushing the new
        ///     operator on the stack.
        /// </summary>
        /// <param name="op">The operator to push.</param>
        internal void Append(ConstraintOperator op)
        {
            op.LeftContext = _lastPushed;
            if (_lastPushed is ConstraintOperator)
                SetTopOperatorRightContext(op);

            // Reduce any lower precedence operators
            ReduceOperatorStack(op.LeftPrecedence);

            _ops.Push(op);
            _lastPushed = op;
        }
Example #2
0
 /// <summary>
 ///     Pushes the specified operator onto the stack.
 /// </summary>
 /// <param name="op">The op.</param>
 internal void Push(ConstraintOperator op)
 {
     _stack.Push(op);
 }