com.thoughtworks.qdox.parser.impl
public class JFlexLexer extends Object implements Lexer
Field Summary | |
---|---|
static int | ANNOCHAR |
static int | ANNOSTRING |
static int | ANNOTATION |
static int | ASSIGNMENT |
static int | CHAR |
static int | CODEBLOCK |
static int | ENUM lexical states |
static int | JAVADOC |
static int | MULTILINECOMMENT |
static int | PARENBLOCK |
static int | SINGLELINECOMMENT |
static int | STRING |
static int | YYEOF This character denotes the end of file |
static int | YYINITIAL |
Constructor Summary | |
---|---|
JFlexLexer(Reader in)
Creates a new scanner
There is also a java.io.InputStream version of this constructor.
| |
JFlexLexer(InputStream in)
Creates a new scanner.
|
Method Summary | |
---|---|
String | getCodeBody() |
int | getColumn() |
int | getLine() |
int | lex() |
void | setCaptureCodeBody(boolean shouldCaptureCodeBody) |
String | text() |
void | yybegin(int newState)
Enters a new lexical state
|
char | yycharat(int pos)
Returns the character at position pos from the
matched text.
|
void | yyclose()
Closes the input stream. |
int | yylength()
Returns the length of the matched text region. |
int | yylex()
Resumes scanning until the next regular expression is matched,
the end of input is encountered or an I/O-Error occurs.
|
void | yypushback(int number)
Pushes the specified amount of characters back into the input stream.
|
void | yyreset(Reader reader)
Resets the scanner to read from a new input stream.
|
int | yystate()
Returns the current lexical state. |
String | yytext()
Returns the text matched by the current regular expression. |
Parameters: in the java.io.Reader to read input from.
Parameters: in the java.io.Inputstream to read input from.
Parameters: newState the new lexical state
Parameters: pos the position of the character to fetch. A value from 0 to yylength()-1.
Returns: the character at position pos
Returns: the next token
Throws: java.io.IOException if any I/O-Error occurs
Parameters: number the number of characters to be read again. This number must not be greater than yylength()!
Parameters: reader the new input stream