| java.lang.Object java.io.Reader gnu.text.Lexer
Lexer | public class Lexer extends Reader (Code) | | Framework for implementing lexical scanners.
author: Per Bothner |
Method Summary | |
public boolean | checkErrors(PrintWriter out, int max) Returns true if any error were seen. | public void | clearErrors() | public void | close() | public void | eofError(String msg) | public void | error(char severity, String filename, int line, int column, String message) | public void | error(char severity, String message) | public void | error(String message) | public void | fatal(String message) | public int | getColumnNumber() | public SourceError | getErrors() | public int | getLineNumber() | public SourceMessages | getMessages() | public String | getName() | final public LineBufferedReader | getPort() | public int | peek() | public int | read() | public int | read(char[] buf, int offset, int length) | public static long | readDigitsInBuffer(LineBufferedReader port, int radix) | public int | readOptionalExponent() Read an optional signed integer. | public boolean | seenErrors() | public void | setMessages(SourceMessages messages) | public void | skip() | protected void | skip_quick() | public void | tokenBufferAppend(int ch) Append one character to tokenBuffer, resizing it if need be. | public void | unread(int ch) | protected void | unread() | protected void | unread_quick() |
tokenBuffer | public char[] tokenBuffer(Code) | | For building tokens of various kinds.
|
tokenBufferLength | public int tokenBufferLength(Code) | | The number of chars of tokenBuffer that are used.
|
checkErrors | public boolean checkErrors(PrintWriter out, int max)(Code) | | Returns true if any error were seen. Prints and clears the errors.
Parameters: out - where to write the error message to Parameters: max - maximum number of messages to print (can be 0) |
clearErrors | public void clearErrors()(Code) | | |
error | public void error(char severity, String filename, int line, int column, String message)(Code) | | |
getColumnNumber | public int getColumnNumber()(Code) | | |
getLineNumber | public int getLineNumber()(Code) | | |
readDigitsInBuffer | public static long readDigitsInBuffer(LineBufferedReader port, int radix)(Code) | | Read digits, up to the first non-digit or the buffer limit
the digits seen as a non-negative long, or -1 on overflow |
readOptionalExponent | public int readOptionalExponent() throws java.io.IOException(Code) | | Read an optional signed integer.
If there is no integer in the input stream, return 1.
For excessively large exponents, return Integer.MIN_VALUE
or Integer.MAX_VALUE.
|
seenErrors | public boolean seenErrors()(Code) | | |
tokenBufferAppend | public void tokenBufferAppend(int ch)(Code) | | Append one character to tokenBuffer, resizing it if need be.
|
|
|