org.devaki.nextobjects.ui.editor.syntax
Interface Lexer

All Known Implementing Classes:
SqlLexer

public interface Lexer

A lexer should implement this interface.


Method Summary
 Token getNextToken()
          Returns the next token.
 void reset(java.io.Reader reader, int yyline, int yychar, int yycolumn)
          Closes the current input stream, and resets the scanner to read from a new input stream.
 

Method Detail

getNextToken

public Token getNextToken()
                   throws java.io.IOException
Returns the next token.

Returns:
the next token
Throws:
java.io.IOException - i/o exception

reset

public void reset(java.io.Reader reader,
                  int yyline,
                  int yychar,
                  int yycolumn)
           throws java.io.IOException
Closes the current input stream, and resets the scanner to read from a new input stream. All internal variables are reset, the old input stream cannot be reused (content of the internal buffer is discarded and lost). The lexical state is set to the inititial state. Subsequent tokens read from the lexer will start with the line, char, and column values given here.

Parameters:
reader - The new input.
yyline - The line number of the first token.
yychar - The position (relative) of the first token.
yycolumn - The position (relative to the line) of the first token.
Throws:
java.io.IOException - occurs while switching readers.


Copyright © 2002-2004 devaki.org. All Rights Reserved.