Examples of WordParser


Examples of org.eclipse.persistence.jpa.internal.jpql.WordParser

      if (hasLeftParenthesis || hasRightParenthesis)  {
        singleInputParameter = Boolean.FALSE;
      }
      else {
        WordParser wordParser = new WordParser(getInItems().toActualText());
        String word = wordParser.word();
        wordParser.moveForward(word);

        singleInputParameter = (word.length() > 0) &&
                               ExpressionTools.isParameter(word.charAt(0)) &&
                               wordParser.isTail();
      }
    }

    return singleInputParameter;
  }
View Full Code Here

Examples of org.eclipse.persistence.jpa.internal.jpql.WordParser

   * @param tolerant Determines if the parsing system should be tolerant, meaning if it should try
   * to parse invalid or incomplete queries
   */
  public JPQLExpression(CharSequence query, IJPAVersion version, boolean tolerant) {
    this(version, tolerant);
    parse(new WordParser(query), tolerant);
  }
View Full Code Here

Examples of org.eclipse.persistence.jpa.internal.jpql.WordParser

   * try to parse invalid or incomplete queries
   * @return The {@link Expression} representing the given text
   */
  final Expression parse(CharSequence expression, boolean tolerant) {
    conditionalExpression = parse(
      new WordParser(expression),
      queryBNF(ConditionalExpressionBNF.ID),
      tolerant
    );
    this.hasSpace = true;
    return conditionalExpression;
View Full Code Here

Examples of org.eclipse.persistence.jpa.internal.jpql.WordParser

   * @param tolerant Determines if the parsing system should be tolerant, meaning if it should try
   * to parse invalid or incomplete queries
   */
  public JPQLExpression(CharSequence query, IJPAVersion version, boolean tolerant) {
    this(version, tolerant);
    parse(new WordParser(query), tolerant);
  }
View Full Code Here

Examples of org.eclipse.persistence.jpa.internal.jpql.WordParser

   * try to parse invalid or incomplete queries
   * @return The {@link Expression} representing the given text
   */
  final Expression parse(CharSequence expression, boolean tolerant) {
    conditionalExpression = parse(
      new WordParser(expression),
      queryBNF(ConditionalExpressionBNF.ID),
      tolerant
    );
    this.hasSpace = true;
    return conditionalExpression;
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.WordParser

                        JPQLGrammar jpqlGrammar,
                        String queryBNFId,
                        boolean tolerant) {

    this(jpqlGrammar, queryBNFId, tolerant);
    parse(new WordParser(jpqlFragment), tolerant);
  }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.WordParser

      if (hasLeftParenthesis || hasRightParenthesis)  {
        singleInputParameter = Boolean.FALSE;
      }
      else {
        WordParser wordParser = new WordParser(getInItems().toActualText());
        String word = wordParser.word();
        wordParser.moveForward(word);

        singleInputParameter = (word.length() > 0) &&
                               ExpressionTools.isParameter(word.charAt(0)) &&
                               wordParser.isTail();
      }
    }

    return singleInputParameter;
  }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.WordParser

      // Calculate the position of the cursor within the parsed tree
      queryPosition = jpqlExpression.buildPosition(jpqlQuery, position);

      // Retrieve the word from the JPQL query (which is the text before the position of the cursor)
      wordParser = new WordParser(jpqlQuery);
      wordParser.setPosition(position);
      word = wordParser.partialWord();

      // Now visit the deepest leaf first and calculate the possible proposals
      proposals = new DefaultContentAssistProposals(queryContext.getGrammar(), extension);
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.WordParser

                        JPQLGrammar jpqlGrammar,
                        String queryBNFId,
                        boolean tolerant) {

    this(jpqlGrammar, queryBNFId, tolerant);
    parse(new WordParser(jpqlFragment), tolerant);
  }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.WordParser

      if (hasLeftParenthesis || hasRightParenthesis)  {
        singleInputParameter = Boolean.FALSE;
      }
      else {
        WordParser wordParser = new WordParser(getInItems().toActualText());
        String word = wordParser.word();
        wordParser.moveForward(word);

        singleInputParameter = (word.length() > 0) &&
                               ExpressionTools.isParameter(word.charAt(0)) &&
                               wordParser.isTail();
      }
    }

    return singleInputParameter;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.