org.apache.camel.language.simple
Class SimplePredicateParser

java.lang.Object
  extended by org.apache.camel.language.simple.BaseSimpleParser
      extended by org.apache.camel.language.simple.SimplePredicateParser

public class SimplePredicateParser
extends BaseSimpleParser

A parser to parse simple language as a Camel Predicate


Field Summary
 
Fields inherited from class org.apache.camel.language.simple.BaseSimpleParser
allowEscape, expression, index, nodes, previousIndex, token, tokens
 
Constructor Summary
SimplePredicateParser(String expression)
          Deprecated. 
SimplePredicateParser(String expression, boolean allowEscape)
           
 
Method Summary
protected  boolean binaryOperator()
           
protected  boolean booleanValue()
           
protected  Predicate doParsePredicate()
           
protected  boolean doubleQuotedLiteralText()
           
protected  boolean doubleQuotedLiteralWithFunctionsText()
           
protected  boolean functionText()
           
protected  boolean logicalOperator()
           
protected  boolean nullValue()
           
protected  boolean numericValue()
           
 Predicate parsePredicate()
           
protected  void parseTokensAndCreateNodes()
          Parses the tokens and crates the AST nodes.
protected  boolean singleQuotedLiteralText()
           
protected  boolean singleQuotedLiteralWithFunctionsText()
           
protected  boolean unaryOperator()
           
 
Methods inherited from class org.apache.camel.language.simple.BaseSimpleParser
accept, clear, expect, expectAndAcceptMore, nextToken, nextToken, prepareBlocks, prepareUnaryExpressions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePredicateParser

@Deprecated
public SimplePredicateParser(String expression)
Deprecated. 


SimplePredicateParser

public SimplePredicateParser(String expression,
                             boolean allowEscape)
Method Detail

parsePredicate

public Predicate parsePredicate()

doParsePredicate

protected Predicate doParsePredicate()

parseTokensAndCreateNodes

protected void parseTokensAndCreateNodes()
Parses the tokens and crates the AST nodes.

After the initial parsing of the input (input -> tokens) then we parse again (tokens -> ast).

In this parsing the balance of the blocks is checked, so that each block has a matching start and end token. For example a single quote block, or a function block etc.


singleQuotedLiteralWithFunctionsText

protected boolean singleQuotedLiteralWithFunctionsText()

singleQuotedLiteralText

protected boolean singleQuotedLiteralText()

doubleQuotedLiteralWithFunctionsText

protected boolean doubleQuotedLiteralWithFunctionsText()

doubleQuotedLiteralText

protected boolean doubleQuotedLiteralText()

functionText

protected boolean functionText()

unaryOperator

protected boolean unaryOperator()

binaryOperator

protected boolean binaryOperator()

logicalOperator

protected boolean logicalOperator()

numericValue

protected boolean numericValue()

booleanValue

protected boolean booleanValue()

nullValue

protected boolean nullValue()


Apache CAMEL