net.sourceforge.pmd.cpd.cppast

Class SimpleCharStream

public class SimpleCharStream extends Object

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 intbufpos
protected static intcolumn
protected static intinBuf
protected static ReaderinputStream
protected static intline
protected static intmaxNextCharInd
protected static booleanprevCharIsCR
protected static booleanprevCharIsLF
static booleanstaticFlag
protected static inttabSize
Constructor Summary
SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
SimpleCharStream(Reader dstream, int startline, int startcolumn)
SimpleCharStream(Reader dstream)
SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn)
SimpleCharStream(InputStream dstream, int startline, int startcolumn)
SimpleCharStream(InputStream dstream, String encoding)
SimpleCharStream(InputStream dstream)
Method Summary
static voidadjustBeginLineColumn(int newLine, int newCol)
Method to adjust line and column numbers for the start of a token.
static voidbackup(int amount)
static charBeginToken()
static voidDone()
protected static voidExpandBuff(boolean wrapAround)
protected static voidFillBuff()
static intgetBeginColumn()
static intgetBeginLine()
static intgetColumn()
static intgetEndColumn()
static intgetEndLine()
static intgetLine()
protected static intgetTabSize(int i)
static StringGetImage()
static char[]GetSuffix(int len)
static charreadChar()
voidReInit(Reader dstream, int startline, int startcolumn, int buffersize)
voidReInit(Reader dstream, int startline, int startcolumn)
voidReInit(Reader dstream)
voidReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
voidReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
voidReInit(InputStream dstream, String encoding)
voidReInit(InputStream dstream)
voidReInit(InputStream dstream, String encoding, int startline, int startcolumn)
voidReInit(InputStream dstream, int startline, int startcolumn)
protected static voidsetTabSize(int i)
protected static voidUpdateLineColumn(char c)

Field Detail

bufcolumn

protected static int[] bufcolumn

buffer

protected static char[] buffer

bufline

protected static int[] bufline

bufpos

public static int bufpos

column

protected static int column

inBuf

protected static int inBuf

inputStream

protected static Reader inputStream

line

protected static int line

maxNextCharInd

protected static int maxNextCharInd

prevCharIsCR

protected static boolean prevCharIsCR

prevCharIsLF

protected static boolean prevCharIsLF

staticFlag

public static final boolean staticFlag

tabSize

protected static int tabSize

Constructor Detail

SimpleCharStream

public SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize)

SimpleCharStream

public SimpleCharStream(Reader dstream, int startline, int startcolumn)

SimpleCharStream

public SimpleCharStream(Reader dstream)

SimpleCharStream

public SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)

SimpleCharStream

public SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)

SimpleCharStream

public SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn)

SimpleCharStream

public SimpleCharStream(InputStream dstream, int startline, int startcolumn)

SimpleCharStream

public SimpleCharStream(InputStream dstream, String encoding)

SimpleCharStream

public SimpleCharStream(InputStream dstream)

Method Detail

adjustBeginLineColumn

public static void adjustBeginLineColumn(int newLine, int newCol)
Method to adjust line and column numbers for the start of a token.

backup

public static void backup(int amount)

BeginToken

public static char BeginToken()

Done

public static void Done()

ExpandBuff

protected static void ExpandBuff(boolean wrapAround)

FillBuff

protected static void FillBuff()

getBeginColumn

public static int getBeginColumn()

getBeginLine

public static int getBeginLine()

getColumn

public static int getColumn()

Deprecated:

See Also: SimpleCharStream

getEndColumn

public static int getEndColumn()

getEndLine

public static int getEndLine()

getLine

public static int getLine()

Deprecated:

See Also: SimpleCharStream

getTabSize

protected static int getTabSize(int i)

GetImage

public static String GetImage()

GetSuffix

public static char[] GetSuffix(int len)

readChar

public static char readChar()

ReInit

public void ReInit(Reader dstream, int startline, int startcolumn, int buffersize)

ReInit

public void ReInit(Reader dstream, int startline, int startcolumn)

ReInit

public void ReInit(Reader dstream)

ReInit

public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)

ReInit

public void ReInit(InputStream dstream, int startline, int startcolumn, int buffersize)

ReInit

public void ReInit(InputStream dstream, String encoding)

ReInit

public void ReInit(InputStream dstream)

ReInit

public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn)

ReInit

public void ReInit(InputStream dstream, int startline, int startcolumn)

setTabSize

protected static void setTabSize(int i)

UpdateLineColumn

protected static void UpdateLineColumn(char c)