/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* Generated By:JavaCC: Do not edit this line. ASCII_CharStream.java Version 0.7pre6 */
/**
* An implementation of interface CharStream, where the stream is assumed to
* contain only ASCII characters (without unicode processing).
*/
final class ASCII_CharStream
{
public static final boolean staticFlag = false;
int bufsize;
int available;
int tokenBegin;
private int bufline[];
private int bufcolumn[];
private boolean prevCharIsCR = false;
private boolean prevCharIsLF = false;
private 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;
}
private final 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;
}
if (++bufpos >= maxNextCharInd)
FillBuff();
UpdateLineColumn(c);
return (c);
}
/**
* @deprecated
* @see #getEndColumn
*/
public final int getColumn() {
}
/**
* @deprecated
* @see #getEndLine
*/
public final int getLine() {
}
public final int getEndColumn() {
}
public final int getEndLine() {
}
public final int getBeginColumn() {
return bufcolumn[tokenBegin];
}
public final 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
}
}
}
}