org.z3950.zing.cql
Class CQLLexer

java.lang.Object
  extended by org.z3950.zing.cql.CQLLexer
All Implemented Interfaces:
CQLTokenizer

public class CQLLexer
extends Object
implements CQLTokenizer

Implementation of the CQL lexical syntax analyzer

Author:
jakub

Field Summary
 
Fields inherited from interface org.z3950.zing.cql.CQLTokenizer
TT_AND, TT_EOF, TT_EQEQ, TT_GE, TT_LE, TT_NE, TT_NOT, TT_NOTHING, TT_OR, TT_PROX, TT_SORTBY, TT_STRING, TT_WORD
 
Constructor Summary
CQLLexer(String cql, boolean debug)
           
 
Method Summary
static void main(String[] args)
           
 void move()
          Consume next input token
 int pos()
           
 String render()
          Render the type and value of the last consumed token
 String render(int token, boolean quoteChars)
          Render specified token type
 String value()
          Return the value of the last consumed token
 int what()
          Return the type of the last consumed token
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CQLLexer

public CQLLexer(String cql,
                boolean debug)
Method Detail

move

public void move()
Description copied from interface: CQLTokenizer
Consume next input token

Specified by:
move in interface CQLTokenizer

value

public String value()
Description copied from interface: CQLTokenizer
Return the value of the last consumed token

Specified by:
value in interface CQLTokenizer
Returns:
value of the token

what

public int what()
Description copied from interface: CQLTokenizer
Return the type of the last consumed token

Specified by:
what in interface CQLTokenizer
Returns:
last consumed token

render

public String render()
Description copied from interface: CQLTokenizer
Render the type and value of the last consumed token

Specified by:
render in interface CQLTokenizer
Returns:
human-readable string

render

public String render(int token,
                     boolean quoteChars)
Description copied from interface: CQLTokenizer
Render specified token type

Specified by:
render in interface CQLTokenizer
Parameters:
token - token type
quoteChars - true, if single characters should be quoted for readability
Returns:
human-readable string

pos

public int pos()
Specified by:
pos in interface CQLTokenizer

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2008-2014 Index Data. All Rights Reserved.