Parses the the rule ComparisionExpr according to the following production
rule:
<p>
[10] ComparisonExpr ::= RangeExpr ( (ValueComp | GeneralComp | NodeComp) RangeExpr )? .
</p>

@throws TTXPathException
437269
private void parseComparisionExpr() throws TTXPathException {

        parseRangeExpr();

        final String mComp = mToken.getContent();

        if (isComp()) {

            // parse second operator axis
            mPipeBuilder.addExpressionSingle();

            parseRangeExpr();

            mPipeBuilder.addCompExpression(getTransaction(), mComp);
        }

    }
1164802
private void parseForExpr() throws TTXPathException {

        // get number of all for conditions
        final int rangeVarNo = parseSimpleForClause();
        consume("return", true);

        // parse return clause
        parseExprSingle();

        mPipeBuilder.addForExpression(rangeVarNo);

    }
1168248
final public Selector BetweenPredicate() throws ParseException {
                                Selector expr1, expr2, expr3; boolean neg=false;
    expr1 = Expression();
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case NOT:
      jj_consume_token(NOT);
                                   neg = true;
      break;
    default:
      jj_la1[16] = jj_gen;
      ;
    }
    jj_consume_token(BETWEEN);
    expr2 = Expression();
    jj_consume_token(AND);
    expr3 = Expression();
    Selector ans = ParseUtil.convertRange(expr1, expr2, expr3);
    if (neg) {if (true) return new OperatorImpl(Operator.NOT, ans);}
    else {if (true) return ans;}
    throw new Error("Missing return statement in function");
  }
609287
public final EObject ruleXExpressionOrVarDeclaration() throws RecognitionException {
        EObject current = null;

        EObject this_XVariableDeclaration_0 = null;

        EObject this_XExpression_1 = null;



        	enterRule();

        try {
            // InternalPureXbase.g:4474:2: ( (this_XVariableDeclaration_0= ruleXVariableDeclaration | this_XExpression_1= ruleXExpression ) )
            // InternalPureXbase.g:4475:2: (this_XVariableDeclaration_0= ruleXVariableDeclaration | this_XExpression_1= ruleXExpression )
            {
            // InternalPureXbase.g:4475:2: (this_XVariableDeclaration_0= ruleXVariableDeclaration | this_XExpression_1= ruleXExpression )
            int alt79=2;
            int LA79_0 = input.LA(1);

            if ( ((LA79_0>=18 && LA79_0<=19)) ) {
                alt79=1;
            }
            else if ( ((LA79_0>=RULE_STRING && LA79_0<=RULE_ID)||(LA79_0>=14 && LA79_0<=15)||LA79_0==28||(LA79_0>=44 && LA79_0<=45)||LA79_0==50||(LA79_0>=58 && LA79_0<=59)||LA79_0==61||LA79_0==64||LA79_0==66||(LA79_0>=69 && LA79_0<=80)) ) {
                alt79=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return current;}
                NoViableAltException nvae =
                    new NoViableAltException("", 79, 0, input);

                throw nvae;
            }
            switch (alt79) {
                case 1 :
                    // InternalPureXbase.g:4476:3: this_XVariableDeclaration_0= ruleXVariableDeclaration
                    {
                    if ( state.backtracking==0 ) {

                      			newCompositeNode(grammarAccess.getXExpressionOrVarDeclarationAccess().getXVariableDeclarationParserRuleCall_0());
                      		
                    }
                    pushFollow(FOLLOW_2);
                    this_XVariableDeclaration_0=ruleXVariableDeclaration();

                    state._fsp--;
                    if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current = this_XVariableDeclaration_0;
                      			afterParserOrEnumRuleCall();
                      		
                    }

                    }
                    break;
                case 2 :
                    // InternalPureXbase.g:4485:3: this_XExpression_1= ruleXExpression
                    {
                    if ( state.backtracking==0 ) {

                      			newCompositeNode(grammarAccess.getXExpressionOrVarDeclarationAccess().getXExpressionParserRuleCall_1());
                      		
                    }
                    pushFollow(FOLLOW_2);
                    this_XExpression_1=ruleXExpression();

                    state._fsp--;
                    if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current = this_XExpression_1;
                      			afterParserOrEnumRuleCall();
                      		
                    }

                    }
                    break;

            }


            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
91926
private CompositeExpression parseComparisonRange() {
        Token token = tokens.lookahead();
        CompositeExpression expr;
        switch (token.type) {
            case EQUAL:
                tokens.consume();
                expr = eq(parseVersion());
                break;
            case NOT_EQUAL:
                tokens.consume();
                expr = neq(parseVersion());
                break;
            case GREATER:
                tokens.consume();
                expr = gt(parseVersion());
                break;
            case GREATER_EQUAL:
                tokens.consume();
                expr = gte(parseVersion());
                break;
            case LESS:
                tokens.consume();
                expr = lt(parseVersion());
                break;
            case LESS_EQUAL:
                tokens.consume();
                expr = lte(parseVersion());
                break;
            default:
                expr = eq(parseVersion());
        }
        return expr;
    }
579232
public final void ruleXOrExpression() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXbase.g:171:2: ( ( ( rule__XOrExpression__Group__0 ) ) )
            // InternalXbase.g:172:2: ( ( rule__XOrExpression__Group__0 ) )
            {
            // InternalXbase.g:172:2: ( ( rule__XOrExpression__Group__0 ) )
            // InternalXbase.g:173:3: ( rule__XOrExpression__Group__0 )
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getXOrExpressionAccess().getGroup()); 
            }
            // InternalXbase.g:174:3: ( rule__XOrExpression__Group__0 )
            // InternalXbase.g:174:4: rule__XOrExpression__Group__0
            {
            pushFollow(FOLLOW_2);
            rule__XOrExpression__Group__0();

            state._fsp--;
            if (state.failed) return ;

            }

            if ( state.backtracking==0 ) {
               after(grammarAccess.getXOrExpressionAccess().getGroup()); 
            }

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
224145
private void parseExprSingle() throws TTXPathException {

        mPipeBuilder.addExpressionSingle();

        final String tContent = mToken.getContent();
        if ("for".equals(tContent)) {
            parseForExpr();
        } else if ("some".equals(tContent) || "every".equals(tContent)) {
            parseQuantifiedExpr();
        } else if ("if".equals(tContent)) {
            parseIfExpr();
        } else {
            parseOrExpr();
        }
    }
1351095
static Parser<Expression> compare(Parser<Expression> expr) {
    return Parsers.or(
        compare(expr, ">", Op.GT), compare(expr, ">=", Op.GE),
        compare(expr, "<", Op.LT), compare(expr, "<=", Op.LE),
        compare(expr, "=", Op.EQ), compare(expr, "<>", Op.NE),
        nullCheck(expr), like(expr), between(expr));
  }
1216707
public final void ruleXExpression() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXbase.g:71:2: ( ( ruleXAssignment ) )
            // InternalXbase.g:72:2: ( ruleXAssignment )
            {
            // InternalXbase.g:72:2: ( ruleXAssignment )
            // InternalXbase.g:73:3: ruleXAssignment
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getXExpressionAccess().getXAssignmentParserRuleCall()); 
            }
            pushFollow(FOLLOW_2);
            ruleXAssignment();

            state._fsp--;
            if (state.failed) return ;
            if ( state.backtracking==0 ) {
               after(grammarAccess.getXExpressionAccess().getXAssignmentParserRuleCall()); 
            }

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
812942
@Nullable
  public static Number numberValue(TreePath exprPath, Context context) {
    Constant val = DataFlow.expressionDataflow(exprPath, context, CONSTANT_PROPAGATION);
    if (val == null || !val.isConstant()) {
      return null;
    }
    return val.getValue();
  }
33243
private void parseExpression() throws TTXPathException {

        mPipeBuilder.addExpr();

        int no = 0;
        do {
            parseExprSingle();
            no++;

        } while (is(TokenType.COMMA, true));

        mPipeBuilder.finishExpr(getTransaction(), no);
    }
1261580
private void processFunction(final Expression expression, final FunctionDescriptor od, RulesTextProvider textProvider) throws ParserException
	{
    	log.debug("processFunction");
		if (!exact("(",textProvider))
			throw new ParserException("Expected ')' after '"+od.getName()+"': ",textProvider);
		Class<?> args[] = od.getParameterTypes();
		for (int arg=1;arg <= args.length;arg++)
		{
			if (args[arg-1].equals(Expression.class))
			{
				Expression e = processExpression(textProvider);
				expression.expression(e);
			}
			if (args[arg-1].equals(List.class))
			{	
				if (!xpath(textProvider))
					throw new ParserException("expected list operand: ",textProvider);
				// operand string found
				String operand = textProvider.getLastToken();
				if (!textProvider.findOperandInScope(operand))
				{
					throw new ParserException("Could not locate "+operand+" in scope",textProvider);
				}
				expression.list(textProvider.getLastToken(),textProvider.getLastResolvedField());
			}
			else
			{
	             Expression e = processExpression(textProvider);
	             expression.expression(e);
			}
			if (arg < args.length)
			{
				// ensure arguments are separated by a comma
			    exactOrError(",",textProvider);
			}
		}
		exactOrError(")",textProvider);
		expression.function(od);
	}
571409
public void parseQuery() throws TTXPathException {

        // get first token, ignore all white spaces
        do {
            mToken = mScanner.nextToken();
        } while (mToken.getType() == TokenType.SPACE);

        // parse the query according to the rules specified in the XPath 2.0 REC
        parseExpression();

        // after the parsing of the expression no token must be left
        if (mToken.getType() != TokenType.END) {
            throw new IllegalStateException("The query has not been processed completely.");
        }
    }
560102
private Selector parsePredicate(String predicate, String fullPath) 
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.entry(cclass,
               "parsePredicate",
               "predicate: " + predicate); 

    Selector parsed = null;
    try
    {
      // Preprocess predicate for special characters
      String parserInput = preProcessForSpecials(predicate);
      
      // Attempt to parse predicate with "JMS" parser
      predicateParser =  MatchParserImpl.prime(predicateParser, parserInput, true);     
      parsed = predicateParser.getSelector(parserInput);
      if (parsed.getType() == Selector.INVALID)
      {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
          tc.debug(this,cclass, "parsePredicate", "Unable to parse predicate");           
        // reset the output to null
        parsed = null;
      }
      else
      {
        postProcessSelectorTree(parsed, fullPath);
      }
    }
    catch (Exception ex)
    {
      // No FFDC Code Needed.
      // In this case we will only trace the exception that we encountered.
      // It could be that the XPath parser is able to process this predicate
      // and that we've encountered a discrepancy between the syntax of an
      // expression supported by JMS and by XPath.
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        tc.debug(this,cclass, "parsePredicate", ex);   
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.exit(this,cclass, "parsePredicate", parsed);     
    return parsed;
  }
1298267
private void parseUnionExpr() throws TTXPathException {

        parseIntersectExceptExpr();

        while (is("union", true) || is(TokenType.OR, true)) {

            // parse second operand axis

            mPipeBuilder.addExpressionSingle();

            parseIntersectExceptExpr();

            mPipeBuilder.addUnionExpression(getTransaction());

        }
    }
696832
public static void assertXpathValuesEqual(String controlXpath,
                                              String testXpath,
                                              String inXMLString)
        throws SAXException, IOException,
               XpathException {
        assertXpathValuesEqual(controlXpath, testXpath,
                               XMLUnit.buildControlDocument(inXMLString));
    }
982788
private SingleType parseSingleType() throws TTXPathException {

        final String atomicType = parseAtomicType();
        final boolean intero = is(TokenType.INTERROGATION, true);
        return new SingleType(atomicType, intero);
    }