|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.pmd.cpd.cppast.SimpleCharStream
public class SimpleCharStream
An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without unicode processing).
Field Summary | |
---|---|
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 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 Summary | |
---|---|
SimpleCharStream(InputStream dstream)
Constructor. |
|
SimpleCharStream(InputStream dstream,
int startline,
int startcolumn)
Constructor. |
|
SimpleCharStream(InputStream dstream,
int startline,
int startcolumn,
int buffersize)
Constructor. |
|
SimpleCharStream(InputStream dstream,
String encoding)
Constructor. |
|
SimpleCharStream(InputStream dstream,
String encoding,
int startline,
int startcolumn)
Constructor. |
|
SimpleCharStream(InputStream dstream,
String encoding,
int startline,
int startcolumn,
int buffersize)
Constructor. |
|
SimpleCharStream(Reader dstream)
Constructor. |
|
SimpleCharStream(Reader dstream,
int startline,
int startcolumn)
Constructor. |
|
SimpleCharStream(Reader dstream,
int startline,
int startcolumn,
int buffersize)
Constructor. |
Method Summary | |
---|---|
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 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(InputStream dstream)
Reinitialise. |
void |
ReInit(InputStream dstream,
int startline,
int startcolumn)
Reinitialise. |
void |
ReInit(InputStream dstream,
int startline,
int startcolumn,
int buffersize)
Reinitialise. |
void |
ReInit(InputStream dstream,
String encoding)
Reinitialise. |
void |
ReInit(InputStream dstream,
String encoding,
int startline,
int startcolumn)
Reinitialise. |
void |
ReInit(InputStream dstream,
String encoding,
int startline,
int startcolumn,
int buffersize)
Reinitialise. |
void |
ReInit(Reader dstream)
Reinitialise. |
void |
ReInit(Reader dstream,
int startline,
int startcolumn)
Reinitialise. |
void |
ReInit(Reader dstream,
int startline,
int startcolumn,
int buffersize)
Reinitialise. |
protected static void |
setTabSize(int i)
|
protected static void |
UpdateLineColumn(char c)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 Reader inputStream
protected static char[] buffer
protected static int maxNextCharInd
protected static int inBuf
protected static int tabSize
Constructor Detail |
---|
public SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
public SimpleCharStream(Reader dstream, int startline, int startcolumn)
public SimpleCharStream(Reader dstream)
public SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws UnsupportedEncodingException
UnsupportedEncodingException
public SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
public SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException
UnsupportedEncodingException
public SimpleCharStream(InputStream dstream, int startline, int startcolumn)
public SimpleCharStream(InputStream dstream, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingException
public SimpleCharStream(InputStream dstream)
Method Detail |
---|
protected static void setTabSize(int i)
protected static int getTabSize(int i)
protected static void ExpandBuff(boolean wrapAround)
protected static void FillBuff() throws IOException
IOException
public static char BeginToken() throws IOException
IOException
protected static void UpdateLineColumn(char c)
public static char readChar() throws IOException
IOException
public static int getColumn()
getEndColumn()
public static int getLine()
getEndLine()
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(Reader dstream, int startline, int startcolumn, int buffersize)
public void ReInit(Reader dstream, int startline, int startcolumn)
public void ReInit(Reader dstream)
public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws UnsupportedEncodingException
UnsupportedEncodingException
public void ReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
public void ReInit(InputStream dstream, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingException
public void ReInit(InputStream dstream)
public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException
UnsupportedEncodingException
public void ReInit(InputStream dstream, int startline, int startcolumn)
public static String GetImage()
public static char[] GetSuffix(int len)
public static void Done()
public static void adjustBeginLineColumn(int newLine, int newCol)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |