1 package org.devaki.nextobjects.ui.editor.syntax;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import java.io.IOException;
22 /***
23 * A lexer should implement this interface.
24 */
25 public interface Lexer
26 {
27 /***
28 * Returns the next token.
29 *
30 * @return the next token
31 * @throws IOException i/o exception
32 */
33 Token getNextToken() throws IOException;
34 /***
35 * Closes the current input stream, and resets the scanner to read from a
36 * new input stream.
37 * All internal variables are reset, the old input stream cannot be reused
38 * (content of the internal buffer is discarded and lost).
39 * The lexical state is set to the inititial state.
40 * Subsequent tokens read from the lexer will start with the line, char,
41 * and column values given here.
42 *
43 * @param reader The new input.
44 * @param yyline The line number of the first token.
45 * @param yychar The position (relative) of the first token.
46 * @param yycolumn The position (relative to the line) of the first token.
47 * @throws IOException occurs while switching readers.
48 */
49 void reset(
50 java.io.Reader reader,
51 int yyline,
52 int yychar,
53 int yycolumn)
54 throws IOException;
55 }