Package org.exolab.castor.jdo.oql
Class Lexer
java.lang.Object
org.exolab.castor.jdo.oql.Lexer
Seperates an input string of OQL into a stream of
Token
s.- Version:
- $Revision: 7950 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Nissim Karpenstein
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether the query strin has been fully consumed.Returns the nextToken
from the stream.
-
Constructor Details
-
Lexer
Creates a lexer which will seperate a string query into a series of tokens.- Parameters:
oqlQueryString
- The string representation of the OQL Query
-
-
Method Details
-
hasMoreTokens
public boolean hasMoreTokens()Checks whether the query strin has been fully consumed.- Returns:
- True if there is text in the query which hasn't been tokenized, otherwise false.
-
nextToken
Returns the nextToken
from the stream.- Returns:
- The next token in the stream.
- Throws:
InvalidCharException
- if an invalid character is found while generating the next Token.
-