com.thoughtworks.qdox.parser.impl
public class JFlexLexer extends Object implements Lexer
Field Summary | |
---|---|
static int | ASSIGNMENT |
boolean | appendingToCodeBody |
int | assignmentDepth |
int | classDepth |
StringBuffer | codeBody |
static int | CHAR |
static int | CODEBLOCK |
boolean | enumMode |
boolean | javaDocNewLine |
boolean | javaDocStartedContent |
static int | JAVADOC |
static int | MULTILINECOMMENT |
int | nestingDepth |
boolean | newMode |
static int | PARENBLOCK |
boolean | shouldCaptureCodeBody |
int | stateDepth |
int[] | stateStack |
static int | SINGLELINECOMMENT |
static int | STRING lexical states |
int | yychar the number of characters up to the start of the matched text |
int | yycolumn
the number of characters from the last newline up to the start of the
matched text |
int | yyline number of newlines encountered up to the start of the matched text |
static int | YYEOF This character denotes the end of file |
static int | YYINITIAL |
boolean | zzAtBOL
zzAtBOL == true <=> the scanner is currently at the beginning of a line |
boolean | zzAtEOF zzAtEOF == true <=> the scanner is at the EOF |
char[] | zzBuffer this buffer contains the current text to be matched and is
the source of the yytext() string |
int | zzCurrentPos the current text position in the buffer |
int | zzEndRead endRead marks the last character in the buffer, that has been read
from input |
boolean | zzEOFDone denotes if the user-EOF-code has already been executed |
int | zzLexicalState the current lexical state |
int | zzMarkedPos the textposition at the last accepting state |
int | zzPushbackPos the textposition at the last state to be included in yytext |
Reader | zzReader the input device |
int | zzStartRead startRead marks the beginning of the yytext() string in the buffer |
int | zzState the current state of the DFA |
static int[] | ZZ_ACTION
Translates DFA states to action switch labels. |
static String | ZZ_ACTION_PACKED_0 |
static int[] | ZZ_ATTRIBUTE
ZZ_ATTRIBUTE[aState] contains the attributes of state aState |
static String | ZZ_ATTRIBUTE_PACKED_0 |
static int | ZZ_BUFFERSIZE initial size of the lookahead buffer |
static char[] | ZZ_CMAP
Translates characters to character classes |
static String | ZZ_CMAP_PACKED
Translates characters to character classes |
static String[] | ZZ_ERROR_MSG |
static int[] | ZZ_LEXSTATE
ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
at the beginning of a line
l is of the form l = 2*k, k a non negative integer |
static int | ZZ_NO_MATCH |
static int | ZZ_PUSHBACK_2BIG |
static int[] | ZZ_ROWMAP
Translates a state to a row index in the transition table |
static String | ZZ_ROWMAP_PACKED_0 |
static int[] | ZZ_TRANS
The transition table of the DFA |
static String | ZZ_TRANS_PACKED_0 |
static int | ZZ_UNKNOWN_ERROR |
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 | popState() |
void | pushState(int newState) |
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. |
void | zzDoEOF()
Contains user EOF-code, which will be executed exactly once,
when the end of file is reached |
boolean | zzRefill()
Refills the input buffer.
|
void | zzScanError(int errorCode)
Reports an error that occured while scanning.
|
static int[] | zzUnpackAction() |
static int | zzUnpackAction(String packed, int offset, int[] result) |
static int[] | zzUnpackAttribute() |
static int | zzUnpackAttribute(String packed, int offset, int[] result) |
static char[] | zzUnpackCMap(String packed)
Unpacks the compressed character translation table.
|
static int[] | zzUnpackRowMap() |
static int | zzUnpackRowMap(String packed, int offset, int[] result) |
static int[] | zzUnpackTrans() |
static int | zzUnpackTrans(String packed, int offset, int[] result) |
aState
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
Returns: false
, iff there was new input.
Throws: java.io.IOException if any I/O-Error occurs
Parameters: errorCode the code of the errormessage to display
Parameters: packed the packed character translation table
Returns: the unpacked character translation table