public class SimpleCharStream
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static int[] |
bufcolumn |
protected static char[] |
buffer |
protected static int[] |
bufline |
static int |
bufpos
Position in buffer.
|
protected static int |
column |
protected static int |
inBuf |
protected static java.io.Reader |
inputStream |
protected static int |
line |
protected static int |
maxNextCharInd |
protected static boolean |
prevCharIsCR |
protected static boolean |
prevCharIsLF |
static boolean |
staticFlag
Whether parser is static.
|
protected static int |
tabSize |
Constructor and Description |
---|
SimpleCharStream(java.io.InputStream dstream)
Constructor.
|
SimpleCharStream(java.io.InputStream dstream,
int startline,
int startcolumn)
Constructor.
|
SimpleCharStream(java.io.InputStream dstream,
int startline,
int startcolumn,
int buffersize)
Constructor.
|
SimpleCharStream(java.io.InputStream dstream,
java.lang.String encoding)
Constructor.
|
SimpleCharStream(java.io.InputStream dstream,
java.lang.String encoding,
int startline,
int startcolumn)
Constructor.
|
SimpleCharStream(java.io.InputStream dstream,
java.lang.String encoding,
int startline,
int startcolumn,
int buffersize)
Constructor.
|
SimpleCharStream(java.io.Reader dstream)
Constructor.
|
SimpleCharStream(java.io.Reader dstream,
int startline,
int startcolumn)
Constructor.
|
SimpleCharStream(java.io.Reader dstream,
int startline,
int startcolumn,
int buffersize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
adjustBeginLineColumn(int newLine,
int newCol)
Method to adjust line and column numbers for the start of a token.
|
static void |
backup(int amount)
Backup a number of characters.
|
static char |
BeginToken()
Start.
|
static void |
Done()
Reset buffer when finished.
|
protected static void |
ExpandBuff(boolean wrapAround) |
protected static void |
FillBuff() |
static int |
getBeginColumn()
Get token beginning column number.
|
static int |
getBeginLine()
Get token beginning line number.
|
static int |
getColumn()
Deprecated.
|
static int |
getEndColumn()
Get token end column number.
|
static int |
getEndLine()
Get token end line number.
|
static java.lang.String |
GetImage()
Get token literal value.
|
static int |
getLine()
Deprecated.
|
static char[] |
GetSuffix(int len)
Get the suffix.
|
protected static int |
getTabSize(int i) |
static char |
readChar()
Read a character.
|
void |
ReInit(java.io.InputStream dstream)
Reinitialise.
|
void |
ReInit(java.io.InputStream dstream,
int startline,
int startcolumn)
Reinitialise.
|
void |
ReInit(java.io.InputStream dstream,
int startline,
int startcolumn,
int buffersize)
Reinitialise.
|
void |
ReInit(java.io.InputStream dstream,
java.lang.String encoding)
Reinitialise.
|
void |
ReInit(java.io.InputStream dstream,
java.lang.String encoding,
int startline,
int startcolumn)
Reinitialise.
|
void |
ReInit(java.io.InputStream dstream,
java.lang.String encoding,
int startline,
int startcolumn,
int buffersize)
Reinitialise.
|
void |
ReInit(java.io.Reader dstream)
Reinitialise.
|
void |
ReInit(java.io.Reader dstream,
int startline,
int startcolumn)
Reinitialise.
|
void |
ReInit(java.io.Reader dstream,
int startline,
int startcolumn,
int buffersize)
Reinitialise.
|
protected static void |
setTabSize(int i) |
protected static void |
UpdateLineColumn(char c) |
public static final boolean staticFlag
public static int bufpos
protected static int[] bufline
protected static int[] bufcolumn
protected static int column
protected static int line
protected static boolean prevCharIsCR
protected static boolean prevCharIsLF
protected static java.io.Reader inputStream
protected static char[] buffer
protected static int maxNextCharInd
protected static int inBuf
protected static int tabSize
public SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn, int buffersize)
public SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn)
public SimpleCharStream(java.io.Reader dstream)
public SimpleCharStream(java.io.InputStream dstream, java.lang.String encoding, int startline, int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public SimpleCharStream(java.io.InputStream dstream, int startline, int startcolumn, int buffersize)
public SimpleCharStream(java.io.InputStream dstream, java.lang.String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public SimpleCharStream(java.io.InputStream dstream, int startline, int startcolumn)
public SimpleCharStream(java.io.InputStream dstream, java.lang.String encoding) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public SimpleCharStream(java.io.InputStream dstream)
protected static void setTabSize(int i)
protected static int getTabSize(int i)
protected static void ExpandBuff(boolean wrapAround)
protected static void FillBuff() throws java.io.IOException
java.io.IOException
public static char BeginToken() throws java.io.IOException
java.io.IOException
protected static void UpdateLineColumn(char c)
public static char readChar() throws java.io.IOException
java.io.IOException
@Deprecated public static int getColumn()
@Deprecated public static int getLine()
public static int getEndColumn()
public static int getEndLine()
public static int getBeginColumn()
public static int getBeginLine()
public static void backup(int amount)
public void ReInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize)
public void ReInit(java.io.Reader dstream, int startline, int startcolumn)
public void ReInit(java.io.Reader dstream)
public void ReInit(java.io.InputStream dstream, java.lang.String encoding, int startline, int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public void ReInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize)
public void ReInit(java.io.InputStream dstream, java.lang.String encoding) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public void ReInit(java.io.InputStream dstream)
public void ReInit(java.io.InputStream dstream, java.lang.String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public void ReInit(java.io.InputStream dstream, int startline, int startcolumn)
public static java.lang.String GetImage()
public static char[] GetSuffix(int len)
public static void Done()
public static void adjustBeginLineColumn(int newLine, int newCol)
Copyright © 2018 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence