|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jeffpalm.javaparser.CharStream
public abstract class CharStream
Basic character stream. The javacc tool creates one of four different types of character streams. To be able to switch between different types, I've created this parent class. The parent class invokes the appropriate child class that was created by javacc.
Field Summary | |
---|---|
static int |
ASCII
Use the ascii character stream |
protected int |
available
Are there more characters available |
protected int[] |
bufcolumn
The buffer column |
protected char[] |
buffer
The buffer |
protected int[] |
bufline
The buffer line |
int |
bufpos
The buffer location |
protected int |
bufsize
The buffer size |
protected int |
column
The column index |
static int |
FULL_CHAR
Use the unicode character stream |
protected int |
inBuf
Index into the buffer |
protected java.io.Reader |
inputStream
The input |
static int |
JAVA_LIKE
Use the Java character stream |
protected int |
line
The line index |
protected int |
maxNextCharInd
The maximum next character index |
protected boolean |
prevCharIsCR
Was the previous character a CR? |
protected boolean |
prevCharIsLF
Was the previous character a LF? |
static boolean |
staticFlag
Is this a parser |
protected int |
tokenBegin
Index of the current token's starting point |
static int |
UNICODE
Use the unicode character stream |
Constructor Summary | |
---|---|
CharStream()
|
Method Summary | |
---|---|
abstract void |
adjustBeginLineColumn(int newLine,
int newCol)
Description of the Method |
abstract void |
backup(int amount)
Description of the Method |
char |
BeginToken()
Description of the Method |
int |
getBeginColumn()
Gets the BeginColumn attribute of the CharStream class |
int |
getBeginLine()
Gets the BeginLine attribute of the CharStream class |
int |
getColumn()
Deprecated. |
int |
getEndColumn()
Gets the EndColumn attribute of the CharStream class |
int |
getEndLine()
Gets the EndLine attribute of the CharStream class |
abstract java.lang.String |
GetImage()
Description of the Method |
int |
getLine()
Deprecated. |
abstract char[] |
GetSuffix(int len)
Description of the Method |
static CharStream |
make(java.io.InputStream dstream,
int startline,
int startcolumn)
Constructor for the CharStream object |
static CharStream |
make(java.io.InputStream dstream,
int startline,
int startcolumn,
int buffersize)
Constructor for the CharStream object |
static CharStream |
make(java.io.Reader dstream,
int startline,
int startcolumn)
Constructor for the CharStream object |
static CharStream |
make(java.io.Reader dstream,
int startline,
int startcolumn,
int buffersize)
Constructor for the CharStream object |
abstract char |
readChar()
Description of the Method |
void |
ReInit(java.io.InputStream dstream,
int startline,
int startcolumn)
Description of the Method |
void |
ReInit(java.io.InputStream dstream,
int startline,
int startcolumn,
int buffersize)
Description of the Method |
void |
ReInit(java.io.Reader dstream,
int startline,
int startcolumn)
Description of the Method |
abstract void |
ReInit(java.io.Reader dstream,
int startline,
int startcolumn,
int buffersize)
Description of the Method |
static void |
setCharStreamType(int type)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int available
protected int[] bufcolumn
protected char[] buffer
protected int[] bufline
public int bufpos
protected int bufsize
protected int column
protected int inBuf
protected java.io.Reader inputStream
protected int line
protected int maxNextCharInd
protected boolean prevCharIsCR
protected boolean prevCharIsLF
protected int tokenBegin
public static final int ASCII
public static final int FULL_CHAR
public static final int JAVA_LIKE
public static final int UNICODE
public static final boolean staticFlag
Constructor Detail |
---|
public CharStream()
Method Detail |
---|
public abstract java.lang.String GetImage()
public abstract char[] GetSuffix(int len)
len
- Description of Parameter
public int getBeginColumn()
public int getBeginLine()
public int getColumn()
getEndColumn()
public int getEndColumn()
public int getEndLine()
public int getLine()
getEndLine()
public char BeginToken() throws java.io.IOException
java.io.IOException
- Description of Exceptionpublic abstract void ReInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize)
dstream
- Description of Parameterstartline
- Description of Parameterstartcolumn
- Description of Parameterbuffersize
- Description of Parameterpublic void ReInit(java.io.Reader dstream, int startline, int startcolumn)
dstream
- Description of Parameterstartline
- Description of Parameterstartcolumn
- Description of Parameterpublic void ReInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize)
dstream
- Description of Parameterstartline
- Description of Parameterstartcolumn
- Description of Parameterbuffersize
- Description of Parameterpublic void ReInit(java.io.InputStream dstream, int startline, int startcolumn)
dstream
- Description of Parameterstartline
- Description of Parameterstartcolumn
- Description of Parameterpublic abstract void adjustBeginLineColumn(int newLine, int newCol)
newLine
- Description of ParameternewCol
- Description of Parameterpublic abstract void backup(int amount)
amount
- Description of Parameterpublic abstract char readChar() throws java.io.IOException
java.io.IOException
- Description of Exceptionpublic static void setCharStreamType(int type)
public static CharStream make(java.io.Reader dstream, int startline, int startcolumn, int buffersize)
dstream
- Description of Parameterstartline
- Description of Parameterstartcolumn
- Description of Parameterbuffersize
- Description of Parameter
public static CharStream make(java.io.Reader dstream, int startline, int startcolumn)
dstream
- Description of Parameterstartline
- Description of Parameterstartcolumn
- Description of Parameter
public static CharStream make(java.io.InputStream dstream, int startline, int startcolumn, int buffersize)
dstream
- Description of Parameterstartline
- Description of Parameterstartcolumn
- Description of Parameterbuffersize
- Description of Parameter
public static CharStream make(java.io.InputStream dstream, int startline, int startcolumn)
dstream
- Description of Parameterstartline
- Description of Parameterstartcolumn
- Description of Parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |