org.jaxen.saxpath.base
Class XPathReader
java.lang.Object
org.jaxen.saxpath.base.XPathReader
- All Implemented Interfaces:
- SAXPathEventSource, TokenTypes, XPathReader
- public class XPathReader
- extends java.lang.Object
- implements XPathReader, TokenTypes
Implementation of SAXPath's XPathReader
which
generates callbacks to an XPathHandler
.
- Author:
- bob mcwhirter (bob@werken.com)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tokens
private java.util.LinkedList tokens
lexer
private XPathLexer lexer
handler
private XPathHandler handler
LEFT_PAREN
public static final int LEFT_PAREN
- See Also:
- Constant Field Values
RIGHT_PAREN
public static final int RIGHT_PAREN
- See Also:
- Constant Field Values
LEFT_BRACKET
public static final int LEFT_BRACKET
- See Also:
- Constant Field Values
RIGHT_BRACKET
public static final int RIGHT_BRACKET
- See Also:
- Constant Field Values
PLUS
public static final int PLUS
- See Also:
- Constant Field Values
MINUS
public static final int MINUS
- See Also:
- Constant Field Values
LESS_THAN
public static final int LESS_THAN
- See Also:
- Constant Field Values
LESS_THAN_EQUALS
public static final int LESS_THAN_EQUALS
- See Also:
- Constant Field Values
GREATER_THAN
public static final int GREATER_THAN
- See Also:
- Constant Field Values
GREATER_THAN_EQUALS
public static final int GREATER_THAN_EQUALS
- See Also:
- Constant Field Values
SLASH
public static final int SLASH
- See Also:
- Constant Field Values
DOUBLE_SLASH
public static final int DOUBLE_SLASH
- See Also:
- Constant Field Values
DOT
public static final int DOT
- See Also:
- Constant Field Values
DOT_DOT
public static final int DOT_DOT
- See Also:
- Constant Field Values
IDENTIFIER
public static final int IDENTIFIER
- See Also:
- Constant Field Values
AT
public static final int AT
- See Also:
- Constant Field Values
PIPE
public static final int PIPE
- See Also:
- Constant Field Values
COLON
public static final int COLON
- See Also:
- Constant Field Values
DOUBLE_COLON
public static final int DOUBLE_COLON
- See Also:
- Constant Field Values
STAR
public static final int STAR
- See Also:
- Constant Field Values
EQUALS
public static final int EQUALS
- See Also:
- Constant Field Values
NOT_EQUALS
public static final int NOT_EQUALS
- See Also:
- Constant Field Values
NOT
public static final int NOT
- See Also:
- Constant Field Values
DIV
public static final int DIV
- See Also:
- Constant Field Values
MOD
public static final int MOD
- See Also:
- Constant Field Values
DOLLAR
public static final int DOLLAR
- See Also:
- Constant Field Values
LITERAL
public static final int LITERAL
- See Also:
- Constant Field Values
AND
public static final int AND
- See Also:
- Constant Field Values
OR
public static final int OR
- See Also:
- Constant Field Values
INTEGER
public static final int INTEGER
- See Also:
- Constant Field Values
DOUBLE
public static final int DOUBLE
- See Also:
- Constant Field Values
COMMA
public static final int COMMA
- See Also:
- Constant Field Values
SKIP
public static final int SKIP
- See Also:
- Constant Field Values
EOF
public static final int EOF
- See Also:
- Constant Field Values
XPathReader
public XPathReader()
setXPathHandler
public void setXPathHandler(XPathHandler handler)
- Description copied from interface:
SAXPathEventSource
- Set the
XPathHandler
to receive
event callbacks during the parse.
- Specified by:
setXPathHandler
in interface SAXPathEventSource
- Parameters:
handler
- The handler to receive callbacks.
getXPathHandler
public XPathHandler getXPathHandler()
- Description copied from interface:
SAXPathEventSource
- Retrieve the current
XPathHandler
which receives the event callbacks.
- Specified by:
getXPathHandler
in interface SAXPathEventSource
- Returns:
- The currently installed
XPathHandler
.
parse
public void parse(java.lang.String xpath)
throws SAXPathException
- Description copied from interface:
XPathReader
- Perform parsing of the textual XPath expression,
and produce event callbacks to an
XPathHandler
.
- Specified by:
parse
in interface XPathReader
- Parameters:
xpath
- The textual XPath expression to parse.
- Throws:
SAXPathException
- In the event an error occurs.
setUpParse
void setUpParse(java.lang.String xpath)
pathExpr
void pathExpr()
throws SAXPathException
- Throws:
SAXPathException
numberDouble
void numberDouble()
throws SAXPathException
- Throws:
SAXPathException
numberInteger
void numberInteger()
throws SAXPathException
- Throws:
SAXPathException
literal
void literal()
throws SAXPathException
- Throws:
SAXPathException
functionCall
void functionCall()
throws SAXPathException
- Throws:
SAXPathException
arguments
void arguments()
throws SAXPathException
- Throws:
SAXPathException
filterExpr
void filterExpr()
throws SAXPathException
- Throws:
SAXPathException
variableReference
void variableReference()
throws SAXPathException
- Throws:
SAXPathException
locationPath
void locationPath(boolean isAbsolute)
throws SAXPathException
- Throws:
SAXPathException
absoluteLocationPath
void absoluteLocationPath()
throws SAXPathException
- Throws:
SAXPathException
relativeLocationPath
void relativeLocationPath()
throws SAXPathException
- Throws:
SAXPathException
steps
void steps()
throws SAXPathException
- Throws:
SAXPathException
step
void step(boolean first)
throws SAXPathException
- Throws:
SAXPathException
axisSpecifier
int axisSpecifier()
throws SAXPathException
- Throws:
SAXPathException
nodeTest
void nodeTest(int axis)
throws SAXPathException
- Throws:
SAXPathException
nodeTypeTest
void nodeTypeTest(int axis)
throws SAXPathException
- Throws:
SAXPathException
nameTest
void nameTest(int axis)
throws SAXPathException
- Throws:
SAXPathException
abbrStep
void abbrStep()
throws SAXPathException
- Throws:
SAXPathException
predicates
void predicates()
throws SAXPathException
- Throws:
SAXPathException
predicate
void predicate()
throws SAXPathException
- Throws:
SAXPathException
predicateExpr
void predicateExpr()
throws SAXPathException
- Throws:
SAXPathException
expr
void expr()
throws SAXPathException
- Throws:
SAXPathException
orExpr
void orExpr()
throws SAXPathException
- Throws:
SAXPathException
andExpr
void andExpr()
throws SAXPathException
- Throws:
SAXPathException
equalityExpr
void equalityExpr()
throws SAXPathException
- Throws:
SAXPathException
relationalExpr
void relationalExpr()
throws SAXPathException
- Throws:
SAXPathException
additiveExpr
void additiveExpr()
throws SAXPathException
- Throws:
SAXPathException
multiplicativeExpr
void multiplicativeExpr()
throws SAXPathException
- Throws:
SAXPathException
unaryExpr
void unaryExpr()
throws SAXPathException
- Throws:
SAXPathException
unionExpr
void unionExpr()
throws SAXPathException
- Throws:
SAXPathException
match
Token match(int tokenType)
LA
int LA(int position)
LT
Token LT(int position)
isNodeTypeName
boolean isNodeTypeName(Token name)
throwSyntaxException
void throwSyntaxException(java.lang.String message)
throws SAXPathException
- Throws:
SAXPathException
throwInvalidAxis
void throwInvalidAxis(java.lang.String invalidAxis)
throws SAXPathException
- Throws:
SAXPathException
throwUnexpected
void throwUnexpected()
throws SAXPathException
- Throws:
SAXPathException