KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ppg > lex > LexerResult


1 package ppg.lex;
2
3 import java.io.*;
4
5 /**
6  * The main interface for the return of Lexer output
7  */

8 interface LexerResult {
9     /**
10      * Displays the parsed token in human-readable form.
11      * The token has the form <token-type, attribute, line-number>
12      * @param o The OutputStream onto which to print the token
13      */

14     void unparse(OutputStream o) throws IOException;
15         // Print a human-readable representation of this token on the
16
// output stream o; one that contains all the relevant information
17
// associated with the token. The representation has the form
18
// <token-type, attribute, line-number>
19
/**
20      * @return line number on which the token was found
21      */

22     int lineNumber();
23         // Return the number of the line that this token came from.
24
}
25
26
Popular Tags