Ejemplo n.º 1
0
        /// <summary>
        /// Parser for AndPredicate
        /// </summary>
        /// <returns>Parsed AndPredicate</returns>
        public AndPredicate ParseAndPredicate(Predicate parsedLeftPredicate)
        {
            AndPredicate andPredicate = new AndPredicate();

            //Add left predicate
            andPredicate.SetLeftPredicate(parsedLeftPredicate);

            //Skip && tokens
            NextToken("&", "predicate && predicate", '&');
            NextToken("&", "predicate && predicate", '&');

            //Parse right predicate
            andPredicate.SetRightPredicate(ParsePredicate());

            return andPredicate;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Set predicate of IfElseStatement
 /// </summary>
 /// <param name="predicate">Predicate to set</param>
 public void SetPredicate(Predicate predicate)
 {
     Predicate = predicate;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Set rightpredicate of OrPredicate
 /// </summary>
 /// <param name="rightPredicate">RightPredicate to set</param>
 public void SetRightPredicate(Predicate rightPredicate)
 {
     RightPredicate = rightPredicate;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Parser for OrPredicate
        /// </summary>
        /// <returns>Parsed OrPredicate</returns>
        public OrPredicate ParseOrPredicate(Predicate parsedLeftPredicate)
        {
            OrPredicate orPredicate = new OrPredicate();

            //Add left predicate
            orPredicate.SetLeftPredicate(parsedLeftPredicate);

            //Skip || tokens
            NextToken("|", "predicate || predicate", '|');
            NextToken("|", "predicate || predicate", '|');

            //Parse right predicate
            orPredicate.SetRightPredicate(ParsePredicate());

            return orPredicate;
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Set leftpredicate of OrPredicate
 /// </summary>
 /// <param name="leftPredicate">LeftPredicate to set</param>
 public void SetLeftPredicate(Predicate leftPredicate)
 {
     LeftPredicate = leftPredicate;
 }