org.springmodules.validation.valang.parser
Class ValangParser

java.lang.Object
  extended by org.springmodules.validation.valang.parser.ValangParser
All Implemented Interfaces:
ValangParserConstants

public class ValangParser
extends Object
implements ValangParserConstants


Field Summary
 Token jj_nt
          Next token.
 Token token
          Current token.
 ValangParserTokenManager token_source
          Generated Token Manager.
 
Fields inherited from interface org.springmodules.validation.valang.parser.ValangParserConstants
ADD, AND, BETWEEN, DATE, DEFAULT, DIGIT, DIVIDE, DOT, ENUM, EOF, EQUALS, FALSE, FUNCTION_NAME, GREATER_THAN, GREATER_THAN_OR_EQUAL, HAS_LENGTH, HAS_NO_LENGTH, HAS_NO_TEXT, HAS_TEXT, IN, INDEXED_PATH_ELEMENT, IS_BLANK, IS_LOWER_CASE, IS_NOT_BLANK, IS_NOT_LOWER_CASE, IS_NOT_NULL, IS_NOT_UPPER_CASE, IS_NOT_WORD, IS_NULL, IS_UPPER_CASE, IS_WORD, LESS_THAN, LESS_THAN_OR_EQUAL, LOWERLETTER, MOD, MULTIPLY, NOT, NOT_BETWEEN, NOT_EQUAL, NOT_IN, NUM, OR, PATH, PLAIN_PATH_ELEMENT, POSITIVE_INTEGER, STRING, SUBTRACT, tokenImage, TRUE, UNDERSCORE, UPPERLETTER, WHERE
 
Constructor Summary
ValangParser(InputStream stream)
          Constructor with InputStream.
ValangParser(InputStream stream, String encoding)
          Constructor with InputStream and supplied encoding
ValangParser(Reader stream)
          Constructor.
ValangParser(String expression)
          Constructor
ValangParser(String expression, Map<String,Object> customFunctions, Map dateParsers)
          Constructor
ValangParser(String expression, String className, Map<String,Object> customFunctions, Map dateParsers)
          Constructor
ValangParser(ValangParserTokenManager tm)
          Constructor with generated Token Manager.
 
Method Summary
 Function additiveExpr(Function fieldFunction)
           
 Function beanProperty(Function fieldFunction)
           
 Function beanPropertyOrLiteral(Function fieldFunction)
           
 Operator binaryOperator()
           
 void disable_tracing()
          Disable tracing.
 void enable_tracing()
          Enable tracing.
 org.apache.commons.collections.Predicate expression(Function fieldFunction)
           
 Function function(Function fieldFunction)
           
 ParseException generateParseException()
          Generate ParseException.
 Token getNextToken()
          Get the next Token.
 Token getToken(int index)
          Get the specific Token.
 DefaultVisitor getVisitor()
          Gets visitor used for processing parsed expressions.
 Function literal()
           
 Function multiplicativeExpr(Function fieldFunction)
           
 org.apache.commons.collections.Predicate not(Function fieldFunction)
           
 org.apache.commons.collections.Predicate parseExpression()
           
 Collection<ValidationRule> parseValidation()
           
 Function path()
           
 org.apache.commons.collections.Predicate predicate(Function fieldFunction)
           
 org.apache.commons.collections.Predicate predicates(Function fieldFunction)
           
 void ReInit(InputStream stream)
          Reinitialise.
 void ReInit(InputStream stream, String encoding)
          Reinitialise.
 void ReInit(Reader stream)
          Reinitialise.
 void ReInit(ValangParserTokenManager tm)
          Reinitialise.
 void setDateParsersByRegexp(Map dateParsersByRegexp)
           
 void setFunctionsByName(Map<String,Object> hFunctions)
          Sets functions by name.
 void setVisitor(DefaultVisitor visitor)
          Sets visitor used for processing parsed expressions.
 Function subtractiveExpr(Function fieldFunction)
           
 Operator unaryOperator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public ValangParserTokenManager token_source
Generated Token Manager.


token

public Token token
Current token.


jj_nt

public Token jj_nt
Next token.

Constructor Detail

ValangParser

public ValangParser(String expression)
Constructor


ValangParser

public ValangParser(String expression,
                    Map<String,Object> customFunctions,
                    Map dateParsers)
Constructor


ValangParser

public ValangParser(String expression,
                    String className,
                    Map<String,Object> customFunctions,
                    Map dateParsers)
Constructor


ValangParser

public ValangParser(InputStream stream)
Constructor with InputStream.


ValangParser

public ValangParser(InputStream stream,
                    String encoding)
Constructor with InputStream and supplied encoding


ValangParser

public ValangParser(Reader stream)
Constructor.


ValangParser

public ValangParser(ValangParserTokenManager tm)
Constructor with generated Token Manager.

Method Detail

getVisitor

public DefaultVisitor getVisitor()
Gets visitor used for processing parsed expressions.


setVisitor

public void setVisitor(DefaultVisitor visitor)
Sets visitor used for processing parsed expressions.


setDateParsersByRegexp

public void setDateParsersByRegexp(Map dateParsersByRegexp)

setFunctionsByName

public void setFunctionsByName(Map<String,Object> hFunctions)
Sets functions by name.


parseExpression

public final org.apache.commons.collections.Predicate parseExpression()
                                                               throws ParseException
Throws:
ParseException

parseValidation

public final Collection<ValidationRule> parseValidation()
                                                 throws ParseException
Throws:
ParseException

not

public final org.apache.commons.collections.Predicate not(Function fieldFunction)
                                                   throws ParseException
Throws:
ParseException

predicates

public final org.apache.commons.collections.Predicate predicates(Function fieldFunction)
                                                          throws ParseException
Throws:
ParseException

expression

public final org.apache.commons.collections.Predicate expression(Function fieldFunction)
                                                          throws ParseException
Throws:
ParseException

predicate

public final org.apache.commons.collections.Predicate predicate(Function fieldFunction)
                                                         throws ParseException
Throws:
ParseException

function

public final Function function(Function fieldFunction)
                        throws ParseException
Throws:
ParseException

additiveExpr

public final Function additiveExpr(Function fieldFunction)
                            throws ParseException
Throws:
ParseException

subtractiveExpr

public final Function subtractiveExpr(Function fieldFunction)
                               throws ParseException
Throws:
ParseException

multiplicativeExpr

public final Function multiplicativeExpr(Function fieldFunction)
                                  throws ParseException
Throws:
ParseException

beanPropertyOrLiteral

public final Function beanPropertyOrLiteral(Function fieldFunction)
                                     throws ParseException
Throws:
ParseException

literal

public final Function literal()
                       throws ParseException
Throws:
ParseException

beanProperty

public final Function beanProperty(Function fieldFunction)
                            throws ParseException
Throws:
ParseException

path

public final Function path()
                    throws ParseException
Throws:
ParseException

binaryOperator

public final Operator binaryOperator()
                              throws ParseException
Throws:
ParseException

unaryOperator

public final Operator unaryOperator()
                             throws ParseException
Throws:
ParseException

ReInit

public void ReInit(InputStream stream)
Reinitialise.


ReInit

public void ReInit(InputStream stream,
                   String encoding)
Reinitialise.


ReInit

public void ReInit(Reader stream)
Reinitialise.


ReInit

public void ReInit(ValangParserTokenManager tm)
Reinitialise.


getNextToken

public final Token getNextToken()
Get the next Token.


getToken

public final Token getToken(int index)
Get the specific Token.


generateParseException

public ParseException generateParseException()
Generate ParseException.


enable_tracing

public final void enable_tracing()
Enable tracing.


disable_tracing

public final void disable_tracing()
Disable tracing.



Copyright © 2009. All Rights Reserved.