Class CQLLexer
java.lang.Object
org.z3950.zing.cql.CQLLexer
- All Implemented Interfaces:
CQLTokenizer
Implementation of the CQL lexical syntax analyzer
- Author:
- jakub
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetEnd()Returns the current token's exclusive UTF-16 source end, or -1 before the first move.intgetStart()Returns the current token's inclusive UTF-16 source start, or -1 before the first move.static voidvoidmove()Consume next input tokenintpos()render()Render the type and value of the last consumed tokenrender(int token, boolean quoteChars) Render specified token typevalue()Return the value of the last consumed tokenintwhat()Return the type of the last consumed token
-
Constructor Details
-
CQLLexer
-
-
Method Details
-
move
public void move()Description copied from interface:CQLTokenizerConsume next input token- Specified by:
movein interfaceCQLTokenizer
-
value
Description copied from interface:CQLTokenizerReturn the value of the last consumed token- Specified by:
valuein interfaceCQLTokenizer- Returns:
- value of the token
-
what
public int what()Description copied from interface:CQLTokenizerReturn the type of the last consumed token- Specified by:
whatin interfaceCQLTokenizer- Returns:
- last consumed token
-
render
Description copied from interface:CQLTokenizerRender the type and value of the last consumed token- Specified by:
renderin interfaceCQLTokenizer- Returns:
- human-readable string
-
render
Description copied from interface:CQLTokenizerRender specified token type- Specified by:
renderin interfaceCQLTokenizer- Parameters:
token- token typequoteChars- true, if single characters should be quoted for readability- Returns:
- human-readable string
-
getStart
public int getStart()Returns the current token's inclusive UTF-16 source start, or -1 before the first move. Quotes are included; leading whitespace is excluded. At end of input the span is empty at the input length.- Returns:
- token start
-
getEnd
public int getEnd()Returns the current token's exclusive UTF-16 source end, or -1 before the first move.- Returns:
- token end
-
pos
public int pos()- Specified by:
posin interfaceCQLTokenizer
-
main
-