Class SimpleCharStream
- java.lang.Object
-
- net.sf.tweety.logics.rpcl.parser.rpclprobabilitydistributionparser.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
Fields Modifier and Type Field Description protected static int[]bufcolumnprotected static char[]bufferprotected static int[]buflinestatic intbufposPosition in buffer.protected static intcolumnprotected static intinBufprotected static ReaderinputStreamprotected static intlineprotected static intmaxNextCharIndprotected static booleanprevCharIsCRprotected static booleanprevCharIsLFstatic booleanstaticFlagWhether parser is static.protected static inttabSize
-
Constructor Summary
Constructors Constructor Description SimpleCharStream(InputStream dstream)SimpleCharStream(InputStream dstream, int startline, int startcolumn)SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)SimpleCharStream(InputStream dstream, String encoding)SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn)SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)SimpleCharStream(Reader dstream)SimpleCharStream(Reader dstream, int startline, int startcolumn)SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
-
Method Summary
Modifier and Type Method Description static voidadjustBeginLineColumn(int newLine, int newCol)static voidbackup(int amount)static charBeginToken()static voidDone()Reset buffer when finished.protected static voidExpandBuff(boolean wrapAround)protected static voidFillBuff()static intgetBeginColumn()static intgetBeginLine()static intgetColumn()Deprecated.static intgetEndColumn()static intgetEndLine()static StringGetImage()static intgetLine()Deprecated.static char[]GetSuffix(int len)protected static intgetTabSize(int i)static charreadChar()voidReInit(InputStream dstream)voidReInit(InputStream dstream, int startline, int startcolumn)voidReInit(InputStream dstream, int startline, int startcolumn, int buffersize)voidReInit(InputStream dstream, String encoding)voidReInit(InputStream dstream, String encoding, int startline, int startcolumn)voidReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)voidReInit(Reader dstream)voidReInit(Reader dstream, int startline, int startcolumn)voidReInit(Reader dstream, int startline, int startcolumn, int buffersize)protected static voidsetTabSize(int i)protected static voidUpdateLineColumn(char c)
-
-
-
Field Detail
-
staticFlag
public static final boolean staticFlag
Whether parser is static.- See Also:
- Constant Field Values
-
bufpos
public static int bufpos
Position in buffer.
-
bufline
protected static int[] bufline
-
bufcolumn
protected static int[] bufcolumn
-
column
protected static int column
-
line
protected static int line
-
prevCharIsCR
protected static boolean prevCharIsCR
-
prevCharIsLF
protected static boolean prevCharIsLF
-
inputStream
protected static Reader inputStream
-
buffer
protected static char[] buffer
-
maxNextCharInd
protected static int maxNextCharInd
-
inBuf
protected static int inBuf
-
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) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
SimpleCharStream
public SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
-
SimpleCharStream
public SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
SimpleCharStream
public SimpleCharStream(InputStream dstream, int startline, int startcolumn)
-
SimpleCharStream
public SimpleCharStream(InputStream dstream, String encoding) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
SimpleCharStream
public SimpleCharStream(InputStream dstream)
-
-
Method Detail
-
setTabSize
protected static void setTabSize(int i)
-
getTabSize
protected static int getTabSize(int i)
-
ExpandBuff
protected static void ExpandBuff(boolean wrapAround)
-
FillBuff
protected static void FillBuff() throws IOException- Throws:
IOException
-
BeginToken
public static char BeginToken() throws IOException- Throws:
IOException
-
UpdateLineColumn
protected static void UpdateLineColumn(char c)
-
readChar
public static char readChar() throws IOException- Throws:
IOException
-
getColumn
@Deprecated public static int getColumn()
Deprecated.
-
getLine
@Deprecated public static int getLine()
Deprecated.
-
getEndColumn
public static int getEndColumn()
-
getEndLine
public static int getEndLine()
-
getBeginColumn
public static int getBeginColumn()
-
getBeginLine
public static int getBeginLine()
-
backup
public static void backup(int amount)
-
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) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
ReInit
public void ReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
-
ReInit
public void ReInit(InputStream dstream, String encoding) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
ReInit
public void ReInit(InputStream dstream)
-
ReInit
public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
ReInit
public void ReInit(InputStream dstream, int startline, int startcolumn)
-
GetImage
public static String GetImage()
-
GetSuffix
public static char[] GetSuffix(int len)
-
Done
public static void Done()
Reset buffer when finished.
-
adjustBeginLineColumn
public static void adjustBeginLineColumn(int newLine, int newCol)
-
-