|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.graph.query.parse.SqlQueryParser.SqlTokenizer
public static class SqlQueryParser.SqlTokenizer

A TokenStream.Tokenizer implementation that parses words, quoted phrases, comments, and symbols. Words are
delimited by whitespace and consist only of alpha-number characters plus the underscore character. Quoted phrases are
delimited by single-quote and double-quote characters (which may be escaped within the quote). Comments are the characters
starting with '/*' and ending with '*/', or starting with '--' and ending with the next line terminator (or the end of
the content).
| Field Summary | |
|---|---|
static int |
COMMENT
The token type for tokens that consist of all the characters between "/*" and "*/" or between "--" and the next line terminator (e.g., '\n', '\r' or "\r\n") |
static int |
OTHER
The token type for tokens that consist of other characters. |
static int |
QUOTED_STRING
The token type for tokens that consist of all the characters within single-quotes, double-quotes, or square brackets. |
static int |
SYMBOL
The token type for tokens that consist of an individual "symbol" character. |
static int |
WORD
The token type for tokens that represent an unquoted string containing a character sequence made up of non-whitespace and non-symbol characters. |
| Constructor Summary | |
|---|---|
SqlQueryParser.SqlTokenizer(boolean useComments)
|
|
| Method Summary | |
|---|---|
void |
tokenize(TokenStream.CharacterStream input,
TokenStream.Tokens tokens)
Process the supplied characters and construct the appropriate TokenStream.Token objects. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int WORD
public static final int SYMBOL
[]<>=-+(),
public static final int OTHER
public static final int QUOTED_STRING
public static final int COMMENT
| Constructor Detail |
|---|
public SqlQueryParser.SqlTokenizer(boolean useComments)
| Method Detail |
|---|
public void tokenize(TokenStream.CharacterStream input,
TokenStream.Tokens tokens)
throws ParsingException
TokenStream.Token objects.
tokenize in interface TokenStream.Tokenizerinput - the character input stream; never nulltokens - the factory for TokenStream.Token objects, which records the order in which the tokens are created
ParsingException - if there is an error while processing the character stream (e.g., a quote is not closed, etc.)org.modeshape.common.text.TokenStream.Tokenizer#tokenize(CharacterStream, Tokens)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||