Package org.exolab.adaptx.xpath.engine
Class Parser
java.lang.Object
org.exolab.adaptx.xpath.engine.Parser
A class for parsing expression strings
- Version:
- $Revision: 4090 $ $Date: 2004-01-24 02:21:23 +0100 (Sat, 24 Jan 2004) $
- Author:
- Keith Visco
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic XPathExpression
createExpr
(String exprString) Creates an Expr from the given Stringstatic FunctionCall
createFunctionCall
(String name) Creates the appropriate FunctionCall based on the given namestatic XPathExpression
createLiteralExpr
(String literal) Creates a literal expression, which simply evaluates to the given string literal.static MatchExpression
createMatchExpr
(String matchString) Parses the a pattern String into a MatchExprstatic PathExpr
createPathExpr
(String pattern) Creates a PathExpr from the string argument.static SelectExpr
createSelectExpr
(String selectString) Parses the a pattern String into a SelectExprstatic UnionExpr
createUnionExpr
(String pattern) Creates a UnionExpr from the given string argument.static void
-
Constructor Details
-
Parser
public Parser()
-
-
Method Details
-
createExpr
Creates an Expr from the given String- Parameters:
exprString
- the String to create the Expr from- Returns:
- the new Expr
-
createLiteralExpr
Creates a literal expression, which simply evaluates to the given string literal.- Parameters:
literal
- the string literal the literal expression should evaluate to.- Returns:
- an XPathExpression which will evaluate to the given string literal.
-
createFunctionCall
Creates the appropriate FunctionCall based on the given name- Parameters:
name
- the name of the function to callparams
- the List of Expr paramaters for the function call- Returns:
- the new FunctionCall
- Throws:
XPathException
-
createMatchExpr
Parses the a pattern String into a MatchExpr- Parameters:
matchString
- the pattern string to create the MatchExpr from- Returns:
- the new MatchExpr
-
createPathExpr
Creates a PathExpr from the string argument.- Parameters:
pattern
- the string to create the PathExpr from- Returns:
- the new PathExpr
-
createSelectExpr
Parses the a pattern String into a SelectExpr- Parameters:
selectString
- the pattern string to create the SelectExpr from- Returns:
- the new SelectExpr
-
createUnionExpr
Creates a UnionExpr from the given string argument.- Parameters:
pattern
- the string to create the UnionExpr from- Returns:
- the new UnionExpr
-
main
- Throws:
XPathException
-