edu.northwestern.at.wordhoard.swing.calculator.cql
Class CQLQueryTokenizer

java.lang.Object
  extended by java.io.StreamTokenizer
      extended by edu.northwestern.at.wordhoard.swing.calculator.cql.CQLQueryTokenizer

public class CQLQueryTokenizer
extends java.io.StreamTokenizer

A tokenizer for parsing a WordHoard Corpus Query Language query.


Field Summary
protected  boolean debug
          True to write debugging information to System.out, false otherwise.
 
Fields inherited from class java.io.StreamTokenizer
nval, sval, TT_EOF, TT_EOL, TT_NUMBER, TT_WORD, ttype
 
Constructor Summary
CQLQueryTokenizer(java.lang.String queryString)
          Create a CQL query tokenizer.
 
Method Summary
 int nextToken()
          Get next token.
 void setDebug(boolean debug)
          Set debug flag.
 
Methods inherited from class java.io.StreamTokenizer
commentChar, eolIsSignificant, lineno, lowerCaseMode, ordinaryChar, ordinaryChars, parseNumbers, pushBack, quoteChar, resetSyntax, slashSlashComments, slashStarComments, toString, whitespaceChars, wordChars
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

protected boolean debug
True to write debugging information to System.out, false otherwise.

Constructor Detail

CQLQueryTokenizer

public CQLQueryTokenizer(java.lang.String queryString)
Create a CQL query tokenizer.

Parameters:
queryString - The query string.
Method Detail

nextToken

public int nextToken()
Get next token.

Overrides:
nextToken in class java.io.StreamTokenizer
Returns:
The token type. I/O errors return TT_EOF, indicating the end of file.

setDebug

public void setDebug(boolean debug)
Set debug flag.

Parameters:
debug - True to write debugging information, false otherwise.