Modifier and Type | Class and Description |
---|---|
private static class |
LexScan.ZzFlexStreamInfo
inner class used to store info for nested
input streams
|
Modifier and Type | Field and Description |
---|---|
(package private) int |
action_line |
(package private) java.util.List<Action> |
actions |
(package private) java.lang.StringBuilder |
actionText |
(package private) int |
balance |
(package private) boolean |
bolUsed |
(package private) int |
bufferSize |
(package private) boolean |
caseless |
static int |
CHARCLASS |
static int |
CHARCLASS_CODEPOINT |
private CharClasses |
charClasses |
(package private) boolean |
charCount |
(package private) java.lang.String |
classCode |
(package private) java.lang.String |
className |
(package private) boolean |
columnCount |
static int |
COMMENT |
(package private) int |
commentbalance |
static int |
COPY |
static int |
CTOR_ARG |
(package private) java.util.List<java.lang.String> |
ctorArgs |
(package private) java.util.List<java.lang.String> |
ctorTypes |
(package private) boolean |
cup2Compatible |
(package private) boolean |
cupCompatible |
(package private) boolean |
cupDebug |
(package private) java.lang.String |
cupSymbol |
(package private) boolean |
debugOption |
static int |
EATWSPNL |
(package private) boolean |
emitInputStreamCtor |
(package private) boolean |
eofclose |
(package private) java.lang.String |
eofCode |
(package private) java.lang.String |
eofThrow |
(package private) java.lang.String |
eofVal |
(package private) java.io.File |
file |
(package private) java.util.Stack<java.io.File> |
files |
(package private) java.lang.String |
functionName |
(package private) boolean |
inclusive_states |
(package private) java.lang.String |
initCode |
(package private) java.lang.String |
initThrow |
(package private) boolean |
isAbstract |
(package private) boolean |
isASCII |
(package private) java.lang.String |
isExtending |
(package private) boolean |
isFinal |
(package private) java.lang.String |
isImplementing |
(package private) boolean |
isInteger |
(package private) boolean |
isIntWrap |
(package private) boolean |
isPublic |
(package private) boolean |
isYYEOF |
static int |
JAVA_CODE |
(package private) java.lang.String |
lexThrow |
(package private) boolean |
lineCount |
(package private) boolean |
macroDefinition |
static int |
MACROS |
private int |
nextState |
(package private) boolean |
notUnix |
static int |
REGEXP |
static int |
REGEXP_CODEPOINT_SEQUENCE |
static int |
REGEXPSTART |
static int |
REPEATEXP |
(package private) java.lang.String |
scanErrorException |
(package private) boolean |
standalone |
static int |
STATELIST |
(package private) LexicalStates |
states |
static int |
STATES |
(package private) java.lang.StringBuilder |
string |
static int |
STRING_CODEPOINT_SEQUENCE |
static int |
STRING_CONTENT |
(package private) Timer |
t |
(package private) java.lang.String |
tokenType |
private UnicodeProperties |
unicodeProperties |
(package private) java.lang.StringBuilder |
userCode |
(package private) java.lang.String |
visibility |
private int |
yychar
the number of characters up to the start of the matched text
|
private int |
yycolumn
the number of characters from the last newline up to the start of the
matched text
|
static int |
YYEOF
This character denotes the end of file
|
static int |
YYINITIAL
lexical states
|
private int |
yyline
number of newlines encountered up to the start of the matched text
|
private static int[] |
ZZ_ACTION
Translates DFA states to action switch labels.
|
private static java.lang.String |
ZZ_ACTION_PACKED_0 |
private static int[] |
ZZ_ATTRIBUTE
ZZ_ATTRIBUTE[aState] contains the attributes of state
aState |
private static java.lang.String |
ZZ_ATTRIBUTE_PACKED_0 |
private static int |
ZZ_BUFFERSIZE
initial size of the lookahead buffer
|
private static char[] |
ZZ_CMAP
Translates characters to character classes
|
private static java.lang.String |
ZZ_CMAP_PACKED
Translates characters to character classes
|
private static java.lang.String[] |
ZZ_ERROR_MSG |
private 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
|
private static int |
ZZ_NO_MATCH |
private static int |
ZZ_PUSHBACK_2BIG |
private static int[] |
ZZ_ROWMAP
Translates a state to a row index in the transition table
|
private static java.lang.String |
ZZ_ROWMAP_PACKED_0 |
private static int[] |
ZZ_TRANS
The transition table of the DFA
|
private static java.lang.String |
ZZ_TRANS_PACKED_0 |
private static int |
ZZ_UNKNOWN_ERROR |
private boolean |
zzAtBOL
zzAtBOL == true <=> the scanner is currently at the beginning of a line
|
private boolean |
zzAtEOF
zzAtEOF == true <=> the scanner is at the EOF
|
private char[] |
zzBuffer
this buffer contains the current text to be matched and is
the source of the yytext() string
|
private int |
zzCurrentPos
the current text position in the buffer
|
private int |
zzEndRead
endRead marks the last character in the buffer, that has been read
from input
|
private boolean |
zzEOFDone
denotes if the user-EOF-code has already been executed
|
private int |
zzFinalHighSurrogate
The number of occupied positions in zzBuffer beyond zzEndRead.
|
private int |
zzLexicalState
the current lexical state
|
private int |
zzMarkedPos
the textposition at the last accepting state
|
private java.io.Reader |
zzReader
the input device
|
private int |
zzStartRead
startRead marks the beginning of the yytext() string in the buffer
|
private int |
zzState
the current state of the DFA
|
private java.util.Stack<LexScan.ZzFlexStreamInfo> |
zzStreams
the stack of open (nested) input streams to read from
|
ACTION, ASCII, BANG, BAR, CCLASS, CCLASSNOT, CHAR, CHAR_I, CLOSEBRACKET, CLOSECLASS, COMMA, CONCAT, DASH, DELIMITER, DIFFERENCE, DIGITCLASS, DIGITCLASSNOT, DOLLAR, EOF, EOFRULE, EQUALS, error, FULL, HAT, IDENT, INTERSECTION, JLETTERCLASS, JLETTERDIGITCLASS, LBRACE, LESSTHAN, LETTERCLASS, LOOKAHEAD, LOWERCLASS, MACROUSE, MORETHAN, NEWLINE, NOACTION, OPENBRACKET, OPENCLASS, PLUS, POINT, QUESTION, RBRACE, REGEXPEND, REPEAT, STAR, STRING, STRING_I, SYMMETRICDIFFERENCE, terminalNames, TILDE, UNICODE, UNION, UNIPROPCCLASS, UNIPROPCCLASSNOT, UPPERCLASS, USERCODE, WHITESPACECLASS, WHITESPACECLASSNOT, WORDCLASS, WORDCLASSNOT
Constructor and Description |
---|
LexScan(java.io.Reader in)
Creates a new scanner
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
conc(java.lang.Object a,
java.lang.Object b) |
static java.lang.String |
concExc(java.lang.Object a,
java.lang.Object b) |
int |
currentLine() |
java_cup.runtime.Symbol |
debug_next_token()
Same as next_token but also prints the token to standard out
for debugging.
|
CharClasses |
getCharClasses() |
private java.lang.String |
getTokenName(int token)
Converts an int token code into the name of the
token by reflection on the cup symbol class/interface sym
This code was contributed by Karl Meissner
|
UnicodeProperties |
getUnicodeProperties() |
private void |
includeFile(java.lang.String filePath) |
static void |
main(java.lang.String[] argv)
Runs the scanner on input files.
|
private java.lang.String |
makeMacroIdent() |
java_cup.runtime.Symbol |
next_token()
Resumes scanning until the next regular expression is matched,
the end of input is encountered or an I/O-Error occurs.
|
private void |
populateDefaultVersionUnicodeProperties() |
void |
setFile(java.io.File file) |
private java_cup.runtime.Symbol |
symbol_countUpdate(int type,
java.lang.Object value) |
private java_cup.runtime.Symbol |
symbol(int type) |
private java_cup.runtime.Symbol |
symbol(int type,
java.lang.Object value) |
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.
|
boolean |
yymoreStreams()
Returns true iff there are still streams left
to read from on the stream stack.
|
void |
yypopStream()
Closes the current input stream and continues to
read from the one on top of the stream stack.
|
void |
yypushback(int number)
Pushes the specified amount of characters back into the input stream.
|
void |
yypushStream(java.io.Reader reader)
Stores the current input stream on a stack, and
reads from a new stream.
|
void |
yyreset(java.io.Reader reader)
Resets the scanner to read from a new input stream.
|
int |
yystate()
Returns the current lexical state.
|
java.lang.String |
yytext()
Returns the text matched by the current regular expression.
|
private void |
zzDoEOF()
Contains user EOF-code, which will be executed exactly once,
when the end of file is reached
|
private boolean |
zzRefill()
Refills the input buffer.
|
private void |
zzScanError(int errorCode)
Reports an error that occured while scanning.
|
private static int[] |
zzUnpackAction() |
private static int |
zzUnpackAction(java.lang.String packed,
int offset,
int[] result) |
private static int[] |
zzUnpackAttribute() |
private static int |
zzUnpackAttribute(java.lang.String packed,
int offset,
int[] result) |
private static char[] |
zzUnpackCMap(java.lang.String packed)
Unpacks the compressed character translation table.
|
private static int[] |
zzUnpackRowMap() |
private static int |
zzUnpackRowMap(java.lang.String packed,
int offset,
int[] result) |
private static int[] |
zzUnpackTrans() |
private static int |
zzUnpackTrans(java.lang.String packed,
int offset,
int[] result) |
public static final int YYEOF
private static final int ZZ_BUFFERSIZE
public static final int YYINITIAL
public static final int COMMENT
public static final int STATELIST
public static final int MACROS
public static final int REGEXPSTART
public static final int REGEXP
public static final int JAVA_CODE
public static final int STATES
public static final int STRING_CONTENT
public static final int CHARCLASS
public static final int COPY
public static final int REPEATEXP
public static final int EATWSPNL
public static final int CTOR_ARG
public static final int REGEXP_CODEPOINT_SEQUENCE
public static final int STRING_CODEPOINT_SEQUENCE
public static final int CHARCLASS_CODEPOINT
private static final int[] ZZ_LEXSTATE
private static final java.lang.String ZZ_CMAP_PACKED
private static final char[] ZZ_CMAP
private static final int[] ZZ_ACTION
private static final java.lang.String ZZ_ACTION_PACKED_0
private static final int[] ZZ_ROWMAP
private static final java.lang.String ZZ_ROWMAP_PACKED_0
private static final int[] ZZ_TRANS
private static final java.lang.String ZZ_TRANS_PACKED_0
private static final int ZZ_UNKNOWN_ERROR
private static final int ZZ_NO_MATCH
private static final int ZZ_PUSHBACK_2BIG
private static final java.lang.String[] ZZ_ERROR_MSG
private static final int[] ZZ_ATTRIBUTE
aState
private static final java.lang.String ZZ_ATTRIBUTE_PACKED_0
private java.io.Reader zzReader
private int zzState
private int zzLexicalState
private char[] zzBuffer
private int zzMarkedPos
private int zzCurrentPos
private int zzStartRead
private int zzEndRead
private int yyline
private int yychar
private int yycolumn
private boolean zzAtBOL
private boolean zzAtEOF
private boolean zzEOFDone
private int zzFinalHighSurrogate
private java.util.Stack<LexScan.ZzFlexStreamInfo> zzStreams
int balance
int commentbalance
int action_line
int bufferSize
java.io.File file
java.util.Stack<java.io.File> files
java.lang.StringBuilder userCode
java.lang.String classCode
java.lang.String initCode
java.lang.String initThrow
java.lang.String eofCode
java.lang.String eofThrow
java.lang.String lexThrow
java.lang.String eofVal
java.lang.String scanErrorException
java.lang.String cupSymbol
java.lang.StringBuilder actionText
java.lang.StringBuilder string
private UnicodeProperties unicodeProperties
boolean charCount
boolean lineCount
boolean columnCount
boolean cupCompatible
boolean cup2Compatible
boolean cupDebug
boolean isInteger
boolean isIntWrap
boolean isYYEOF
boolean notUnix
boolean isPublic
boolean isFinal
boolean isAbstract
boolean bolUsed
boolean standalone
boolean debugOption
boolean caseless
boolean inclusive_states
boolean eofclose
boolean isASCII
boolean emitInputStreamCtor
java.lang.String isImplementing
java.lang.String isExtending
java.lang.String className
java.lang.String functionName
java.lang.String tokenType
java.lang.String visibility
java.util.List<java.lang.String> ctorArgs
java.util.List<java.lang.String> ctorTypes
LexicalStates states
java.util.List<Action> actions
private int nextState
boolean macroDefinition
Timer t
private CharClasses charClasses
public LexScan(java.io.Reader in)
in
- the java.io.Reader to read input from.private static int[] zzUnpackAction()
private static int zzUnpackAction(java.lang.String packed, int offset, int[] result)
private static int[] zzUnpackRowMap()
private static int zzUnpackRowMap(java.lang.String packed, int offset, int[] result)
private static int[] zzUnpackTrans()
private static int zzUnpackTrans(java.lang.String packed, int offset, int[] result)
private static int[] zzUnpackAttribute()
private static int zzUnpackAttribute(java.lang.String packed, int offset, int[] result)
public CharClasses getCharClasses()
public int currentLine()
public void setFile(java.io.File file)
private java_cup.runtime.Symbol symbol(int type, java.lang.Object value)
private java_cup.runtime.Symbol symbol(int type)
private java_cup.runtime.Symbol symbol_countUpdate(int type, java.lang.Object value)
private java.lang.String makeMacroIdent()
public static java.lang.String conc(java.lang.Object a, java.lang.Object b)
public static java.lang.String concExc(java.lang.Object a, java.lang.Object b)
public UnicodeProperties getUnicodeProperties()
private void populateDefaultVersionUnicodeProperties()
private void includeFile(java.lang.String filePath)
private static char[] zzUnpackCMap(java.lang.String packed)
packed
- the packed character translation tableprivate boolean zzRefill() throws java.io.IOException
false
, iff there was new input.java.io.IOException
- if any I/O-Error occurspublic final void yyclose() throws java.io.IOException
java.io.IOException
public final void yypushStream(java.io.Reader reader)
reader
- the new input stream to read fromyypopStream()
public final void yypopStream() throws java.io.IOException
java.util.EmptyStackException
- if there is no further stream to read from.java.io.IOException
- if there was an error in closing the stream.yypushStream(java.io.Reader)
public final boolean yymoreStreams()
public final void yyreset(java.io.Reader reader)
reader
- the new input streamyypushStream(java.io.Reader)
,
yypopStream()
public final int yystate()
public final void yybegin(int newState)
newState
- the new lexical statepublic final java.lang.String yytext()
public final char yycharat(int pos)
pos
- the position of the character to fetch.
A value from 0 to yylength()-1.public final int yylength()
private void zzScanError(int errorCode)
errorCode
- the code of the errormessage to displaypublic void yypushback(int number)
number
- the number of characters to be read again.
This number must not be greater than yylength()!private void zzDoEOF() throws java.io.IOException
java.io.IOException
public java_cup.runtime.Symbol next_token() throws java.io.IOException
next_token
in interface java_cup.runtime.Scanner
java.io.IOException
- if any I/O-Error occursprivate java.lang.String getTokenName(int token)
public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] argv)
argv
- the command line, contains the filenames to run
the scanner on.