Method Summary |
|
public void | changeDelimiter(char newDelim) Change this Lexer so that it uses a new delimiter. |
public void | changeQuote(char newQuote) Change this Lexer so that it uses a new character for quoting. |
public int | getLineNumber() Get the line number that the last token came from. |
public String | getNextToken() Resumes scanning until the next regular expression is matched, the end of
input is encountered or an I/O-Error occurs. |
public static void | main(String[] args) Prints out tokens and line numbers from a file or System.in. |
public void | setCommentStart(String commentDelims) Set the characters that indicate a comment at the beginning of the line.
For example if the string "#;!" were passed in, all of the following
lines would be comments:
# Comment
; Another Comment
! Yet another comment
By default there are no comments in CVS files. |
public void | setEscapes(String escapes, String replacements) Specify escape sequences and their replacements. |
final public void | yybegin(int newState) |
final public char | yycharat(int pos) Returns the character at position pos from the matched text.
It is equivalent to yytext().charAt(pos), but faster
Parameters: pos - the position of the character to fetch. |
final public void | yyclose() Closes the input stream. |
final public int | yylength() Returns the length of the matched text region. |
public void | yypushback(int number) Pushes the specified amount of characters back into the input stream.
They will be read again by then next call of the scanning method
Parameters: number - the number of characters to be read again. |
final public void | yyreset(java.io.Reader reader) Resets the scanner to read from a new input stream. |
final public int | yystate() Returns the current lexical state. |
final public String | yytext() Returns the text matched by the current regular expression. |