private XPathExpr ParseOrExpression()
        {
            XPathExpr expr = this.ParseAndExpression();

            if ((expr == null) || (this.NextToken(XPathTokenID.Or) == null))
            {
                return(expr);
            }
            XPathExpr expr2 = new XPathExpr(XPathExprType.Or, ValueDataType.Boolean);

            expr2.AddBooleanExpression(XPathExprType.Or, expr);
            do
            {
                expr = this.ParseAndExpression();
                if (expr == null)
                {
                    this.ThrowError(QueryCompileError.InvalidExpression);
                }
                expr2.AddBooleanExpression(XPathExprType.Or, expr);
            }while (this.NextToken(XPathTokenID.Or) != null);
            return(expr2);
        }
예제 #2
0
        XPathExpr ParseOrExpression()
        {
            XPathExpr andExpr = this.ParseAndExpression();

            if (null != andExpr && null != this.NextToken(XPathTokenID.Or))
            {
                XPathExpr orExpr = new XPathExpr(XPathExprType.Or, ValueDataType.Boolean);

                orExpr.AddBooleanExpression(XPathExprType.Or, andExpr);
                do
                {
                    andExpr = this.ParseAndExpression();
                    if (andExpr == null)
                    {
                        this.ThrowError(QueryCompileError.InvalidExpression);
                    }
                    orExpr.AddBooleanExpression(XPathExprType.Or, andExpr);
                } while (null != this.NextToken(XPathTokenID.Or));

                return(orExpr);
            }

            return(andExpr);
        }
예제 #3
0
        XPathExpr ParseAndExpression()
        {
            XPathExpr eqExpr = this.ParseEqualityExpression();

            if (null != eqExpr && null != this.NextToken(XPathTokenID.And))
            {
                XPathExpr andExpr = new XPathExpr(XPathExprType.And, ValueDataType.Boolean);

                andExpr.AddBooleanExpression(XPathExprType.And, eqExpr);
                do
                {
                    eqExpr = this.ParseEqualityExpression();
                    if (eqExpr == null)
                    {
                        this.ThrowError(QueryCompileError.InvalidExpression);
                    }
                    andExpr.AddBooleanExpression(XPathExprType.And, eqExpr);
                } while (null != this.NextToken(XPathTokenID.And));

                return(andExpr);
            }

            return(eqExpr);
        }
예제 #4
0
        XPathExpr ParseOrExpression()
        {
            XPathExpr andExpr = this.ParseAndExpression();

            if (null != andExpr && null != this.NextToken(XPathTokenID.Or))
            {
                XPathExpr orExpr = new XPathExpr(XPathExprType.Or, ValueDataType.Boolean);

                orExpr.AddBooleanExpression(XPathExprType.Or, andExpr);
                do
                {
                    andExpr = this.ParseAndExpression();
                    if (andExpr == null)
                        this.ThrowError(QueryCompileError.InvalidExpression);
                    orExpr.AddBooleanExpression(XPathExprType.Or, andExpr);
                } while (null != this.NextToken(XPathTokenID.Or));

                return orExpr;
            }

            return andExpr;
        }
예제 #5
0
        XPathExpr ParseAndExpression()
        {
            XPathExpr eqExpr = this.ParseEqualityExpression();

            if (null != eqExpr && null != this.NextToken(XPathTokenID.And))
            {
                XPathExpr andExpr = new XPathExpr(XPathExprType.And, ValueDataType.Boolean);

                andExpr.AddBooleanExpression(XPathExprType.And, eqExpr);
                do
                {
                    eqExpr = this.ParseEqualityExpression();
                    if (eqExpr == null)
                        this.ThrowError(QueryCompileError.InvalidExpression);
                    andExpr.AddBooleanExpression(XPathExprType.And, eqExpr);
                } while (null != this.NextToken(XPathTokenID.And));

                return andExpr;
            }

            return eqExpr;
        }
 private XPathExpr ParseOrExpression()
 {
     XPathExpr expr = this.ParseAndExpression();
     if ((expr == null) || (this.NextToken(XPathTokenID.Or) == null))
     {
         return expr;
     }
     XPathExpr expr2 = new XPathExpr(XPathExprType.Or, ValueDataType.Boolean);
     expr2.AddBooleanExpression(XPathExprType.Or, expr);
     do
     {
         expr = this.ParseAndExpression();
         if (expr == null)
         {
             this.ThrowError(QueryCompileError.InvalidExpression);
         }
         expr2.AddBooleanExpression(XPathExprType.Or, expr);
     }
     while (this.NextToken(XPathTokenID.Or) != null);
     return expr2;
 }