jd.xml.xpath.parser
Class Scanner
java.lang.Object
jd.xml.xpath.parser.Scanner
- All Implemented Interfaces:
- TokenConstants
- public class Scanner
- extends Object
- implements TokenConstants
A Scanner to tokenize XPath expressions.
Fields inherited from interface jd.xml.xpath.parser.TokenConstants |
AT, AXISNAME, BRACKET_CLOSE, BRACKET_OPEN, COMMA, DOT, DOTDOT, END_OF_EXPRESSION, EQUALS, GREATER, GREATER_EQUALS, LESS, LESS_EQUALS, LITERAL, MAX, MINUS, MULTIPLY, NAME, NOT_EQUALS, NUMBER, PARENTHESIS_CLOSE, PARENTHESIS_OPEN, PLUS, SLASH, SLASHSLASH, UNDEFINED, UNION, VARIABLE_REFERENCE |
Constructor Summary |
Scanner(String expression)
Create a Scanner for the given expression. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
token
public int token
value
public String value
Scanner
public Scanner(String expression)
- Create a Scanner for the given expression.
stopAtUnexpectedChar
public void stopAtUnexpectedChar()
nextToken
public int nextToken()
throws XPathParseException
- Throws:
XPathParseException
matchToken
public boolean matchToken(int token)
matchToken
public boolean matchToken(int token,
String value)
consumeToken
public boolean consumeToken(int token)
throws XPathParseException
- Throws:
XPathParseException
consumeToken
public boolean consumeToken(int token,
String value)
throws XPathParseException
- Throws:
XPathParseException
consumeExpectedToken
public void consumeExpectedToken(int token)
throws XPathParseException
- Throws:
XPathParseException
consumeExpectedToken
public void consumeExpectedToken(int token,
String value)
throws XPathParseException
- Throws:
XPathParseException
createParseException
public XPathParseException createParseException(String message)
getTokenString
public String getTokenString()
getTokenName
public String getTokenName()
getTokenName
public static String getTokenName(int token)
getExpressionString
public String getExpressionString()
getRestString
public String getRestString()
getPosition
public int getPosition()
print
public static void print(String expr)
throws XPathParseException
- Throws:
XPathParseException