public final class TsonFlexFast extends Object implements TsonLexicalAnalyzer
| Modifier and Type | Field and Description |
|---|---|
InputStream |
binaryStream |
static int |
BINARYSTREAM |
static int |
CHARLITERAL |
Reader |
charStream |
static int |
CHARSTREAM |
static int |
CHARSTREAM_CODE |
char |
charVal |
CharStreamCodeSupport |
code |
Kmp |
kmp |
static int |
REGEX |
StringBuilder |
string |
static int |
STRING |
String |
stringVal |
static int |
YYEOF
This character denotes the end of file
|
static int |
YYINITIAL
lexical states
|
| Constructor and Description |
|---|
TsonFlexFast(Reader in)
Creates a new scanner
|
| Modifier and Type | Method and Description |
|---|---|
char |
currentChar() |
String |
currentImage() |
InputStream |
currentInputStream() |
Reader |
currentReader() |
String |
currentString() |
int |
nextToken() |
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.
|
public static final int YYEOF
public static final int YYINITIAL
public static final int STRING
public static final int CHARLITERAL
public static final int REGEX
public static final int CHARSTREAM
public static final int CHARSTREAM_CODE
public static final int BINARYSTREAM
public StringBuilder string
public String stringVal
public char charVal
public Reader charStream
public InputStream binaryStream
public Kmp kmp
public CharStreamCodeSupport code
public TsonFlexFast(Reader in)
in - the java.io.Reader to read input from.public int nextToken()
nextToken in interface TsonLexicalAnalyzerpublic Reader currentReader()
currentReader in interface TsonLexicalAnalyzerpublic InputStream currentInputStream()
currentInputStream in interface TsonLexicalAnalyzerpublic String currentImage()
currentImage in interface TsonLexicalAnalyzerpublic String currentString()
currentString in interface TsonLexicalAnalyzerpublic char currentChar()
currentChar in interface TsonLexicalAnalyzerpublic final void yyclose()
throws IOException
IOExceptionpublic final void yyreset(Reader reader)
All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to ZZ_INITIAL.
Internal scan buffer is resized down to its initial length, if it has grown.
reader - the new input streampublic final int yystate()
public final void yybegin(int newState)
newState - the new lexical statepublic final String yytext()
public final char yycharat(int pos)
It is equivalent to yytext().charAt(pos), but faster
pos - the position of the character to fetch.
A value from 0 to yylength()-1.public final int yylength()
public void yypushback(int number)
They will be read again by then next call of the scanning method
number - the number of characters to be read again.
This number must not be greater than yylength()!public int yylex()
throws IOException
IOException - if any I/O-Error occursCopyright © 2025 vpc open source initiative. All rights reserved.