org.basex.query.regex.parse
Class RegExLexer

java.lang.Object
  extended by org.basex.query.regex.parse.RegExLexer
All Implemented Interfaces:
RegExParserConstants, TokenManager

public class RegExLexer
extends java.lang.Object
implements TokenManager, RegExParserConstants

A simple lexer for XML Schema regular expressions.

Author:
BaseX Team 2005-12, BSD License, Leo Woerteler

Field Summary
 
Fields inherited from interface org.basex.query.regex.parse.RegExParserConstants
BACK_REF, BR_CLOSE, BR_OPEN, CAT_ESC, CHAR, COMMA, DIGIT, EOF, LINE_END, LINE_START, MULTI_ESC, NEG, NPAR_OPEN, NUMBER, OR, PAR_CLOSE, PAR_OPEN, PLUS, Q_MARK, QUANT_CLOSE, QUANT_OPEN, SINGLE_ESC, STAR, TO, tokenImage, WILDCARD
 
Constructor Summary
RegExLexer(byte[] regex, boolean strip)
          Constructor.
 
Method Summary
 Token getNextToken()
          This gets the next token from the input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegExLexer

public RegExLexer(byte[] regex,
                  boolean strip)
Constructor.

Parameters:
regex - input string
strip - strip whitespace
Method Detail

getNextToken

public Token getNextToken()
Description copied from interface: TokenManager
This gets the next token from the input stream. A token of kind 0 (<EOF>) should be returned on EOF.

Specified by:
getNextToken in interface TokenManager
Returns:
the next token