All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.kvisco.xsl.ExpressionParser

com.kvisco.xsl.ExpressionParser

public class ExpressionParser
A class for parsing expression strings

Author:
Keith Visco

Constructor Index

 o ExpressionParser()

Method Index

 o createExpr(String)
 o createFilterExpr(String)
creates a FilterExpr from the given string.
 o createFunctionCall(String, List)
Creates the appropriate FunctionCall based on the given name
 o createLocationStep(String)
Creates a LocationStep from the given string.
 o createMatchExpr(String)
Parses the a pattern String into a MatchExpr
 o createNodeExpr(ExprLexer)
creates a NodeExpr from the given string argument
 o createPathExpr(ExprLexer)
Creates a PathExpr from the string argument.
 o createPathExpr(String)
Creates a PathExpr from the string argument.
 o createSelectExpr(String)
Parses the a pattern String into a SelectExpr
 o createStringExpr(String)
Creates a StringExpr from the given String
 o createUnionExpr(String)
Creates a UnionExpr from the given string argument.
 o isAxisIdentifierToken(Token)
 o isLocationStepToken(Token)
 o isNodeTypeToken(Token)
 o main(String[])

Constructors

 o ExpressionParser
 public ExpressionParser()

Methods

 o createExpr
 public static Expr createExpr(String exprString) throws InvalidExprException
 o createFilterExpr
 public static FilterExpr createFilterExpr(String pattern) throws InvalidExprException
creates a FilterExpr from the given string.

Parameters:
pattern - the String to create the FilterExpr from
Returns:
s the new FilterExpr
 o createLocationStep
 public static LocationStep createLocationStep(String pattern) throws InvalidExprException
Creates a LocationStep from the given string.

Parameters:
pattern - the String to create the LocationStep from
Returns:
s the new LocationStep
 o isLocationStepToken
 public static boolean isLocationStepToken(Token token)
 o isAxisIdentifierToken
 public static boolean isAxisIdentifierToken(Token token)
 o isNodeTypeToken
 public static boolean isNodeTypeToken(Token token)
 o createFunctionCall
 public static FunctionCall createFunctionCall(String name,
                                               List params)
Creates the appropriate FunctionCall based on the given name

Parameters:
name - the name of the function to call
params - the List of Expr paramaters for the function call
Returns:
the new FunctionCall
 o createMatchExpr
 public static MatchExpr createMatchExpr(String matchString) throws InvalidExprException
Parses the a pattern String into a MatchExpr

Parameters:
matchString - the pattern string to create the MatchExpr from
Returns:
the new MatchExpr
 o createNodeExpr
 public static NodeExpr createNodeExpr(ExprLexer lexer) throws InvalidExprException
creates a NodeExpr from the given string argument

Parameters:
pattern - the string to create the RefrencePattern from
Returns:
the NodeExpr or null if the string was not a valid NodeExpr
 o createPathExpr
 public static PathExpr createPathExpr(String pattern) throws InvalidExprException
Creates a PathExpr from the string argument.

Parameters:
pattern - the string to create the PathExpr from
Returns:
the new PathExpr
 o createPathExpr
 public static PathExpr createPathExpr(ExprLexer lexer) throws InvalidExprException
Creates a PathExpr from the string argument.

Parameters:
lexer - the ExprLexer to create the PathExpr from
Returns:
the new PathExpr
 o createSelectExpr
 public static SelectExpr createSelectExpr(String selectString) throws InvalidExprException
Parses the a pattern String into a SelectExpr

Parameters:
selectString - the pattern string to create the SelectExpr from
Returns:
the new SelectExpr
 o createStringExpr
 public static StringExpr createStringExpr(String attValue) throws InvalidExprException
Creates a StringExpr from the given String

Parameters:
attValue - the String to create the StringExpr from
Returns:
the new StringExpr
 o createUnionExpr
 public static UnionExpr createUnionExpr(String pattern) throws InvalidExprException
Creates a UnionExpr from the given string argument.

Parameters:
pattern - the string to create the UnionExpr from
Returns:
the new UnionExpr
 o main
 public static void main(String args[]) throws InvalidExprException

All Packages  Class Hierarchy  This Package  Previous  Next  Index