/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 3.0 */
/**
* An implementation of interface CharStream, where the stream is assumed to
* contain only ASCII characters (without unicode processing).
*/
public class SimpleCharStream
{
public static final boolean staticFlag = false;
int bufsize;
int available;
int tokenBegin;
protected int bufline[];
protected int bufcolumn[];
protected boolean prevCharIsCR = false;
protected boolean prevCharIsLF = false;
protected char[] buffer;
{
try
{
if (wrapAround)
{
}
else
{
}
}
catch (Throwable t)
{
throw new Error(t.getMessage());
}
bufsize += 2048;
tokenBegin = 0;
}
{
if (maxNextCharInd == available)
{
{
if (tokenBegin > 2048)
{
}
else if (tokenBegin < 0)
else
ExpandBuff(false);
}
else if (available > tokenBegin)
ExpandBuff(true);
else
}
int i;
try {
{
inputStream.close();
}
else
maxNextCharInd += i;
return;
}
--bufpos;
backup(0);
if (tokenBegin == -1)
tokenBegin = bufpos;
throw e;
}
}
{
tokenBegin = -1;
char c = readChar();
tokenBegin = bufpos;
return c;
}
protected void UpdateLineColumn(char c)
{
column++;
if (prevCharIsLF)
{
prevCharIsLF = false;
}
else if (prevCharIsCR)
{
prevCharIsCR = false;
if (c == '\n')
{
prevCharIsLF = true;
}
else
}
switch (c)
{
case '\r' :
prevCharIsCR = true;
break;
case '\n' :
prevCharIsLF = true;
break;
case '\t' :
column--;
break;
default :
break;
}
}
{
if (inBuf > 0)
{
--inBuf;
bufpos = 0;
}
if (++bufpos >= maxNextCharInd)
FillBuff();
UpdateLineColumn(c);
return (c);
}
/**
* @deprecated
* @see #getEndColumn
*/
public int getColumn() {
}
/**
* @deprecated
* @see #getEndLine
*/
public int getLine() {
}
public int getEndColumn() {
}
public int getEndLine() {
}
public int getBeginColumn() {
return bufcolumn[tokenBegin];
}
public int getBeginLine() {
return bufline[tokenBegin];
}
}
int startcolumn, int buffersize)
{
buffer = new char[buffersize];
bufline = new int[buffersize];
bufcolumn = new int[buffersize];
}
int startcolumn)
{
}
{
}
int startcolumn, int buffersize)
{
{
buffer = new char[buffersize];
bufline = new int[buffersize];
bufcolumn = new int[buffersize];
}
prevCharIsLF = prevCharIsCR = false;
bufpos = -1;
}
int startcolumn)
{
}
{
}
int startcolumn, int buffersize)
{
}
int startcolumn)
{
}
{
}
int startcolumn, int buffersize)
{
}
{
}
int startcolumn)
{
}
{
if (bufpos >= tokenBegin)
else
}
{
else
{
}
return ret;
}
public void Done()
{
}
/**
* Method to adjust line and column numbers for the start of a token.
*/
{
int start = tokenBegin;
int len;
if (bufpos >= tokenBegin)
{
}
else
{
}
int i = 0, j = 0, k = 0;
while (i < len &&
{
i++;
}
if (i < len)
{
while (i++ < len)
{
else
}
}
}
}