org.ejen.ext.parsers.java_1_2
Class JavaCharStream

java.lang.Object
  |
  +--org.ejen.ext.parsers.java_1_2.JavaCharStream

public final class JavaCharStream
extends Object

An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (with java-like unicode escape processing).


Field Summary
static int bufpos
           
static boolean staticFlag
           
 
Constructor Summary
JavaCharStream(InputStream dstream)
           
JavaCharStream(InputStream dstream, int startline, int startcolumn)
           
JavaCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
           
JavaCharStream(Reader dstream)
           
JavaCharStream(Reader dstream, int startline, int startcolumn)
           
JavaCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
           
 
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)
           
static char BeginToken()
           
static void Done()
           
static int getBeginColumn()
           
static int getBeginLine()
           
static int getColumn()
          Deprecated.  
static int getEndColumn()
           
static int getEndLine()
           
static String GetImage()
           
static int getLine()
          Deprecated.  
static char[] GetSuffix(int len)
           
static char readChar()
           
 void ReInit(InputStream dstream)
           
 void ReInit(InputStream dstream, int startline, int startcolumn)
           
 void ReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
           
 void ReInit(Reader dstream)
           
 void ReInit(Reader dstream, int startline, int startcolumn)
           
 void ReInit(Reader dstream, int startline, int startcolumn, int buffersize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

staticFlag

public static final boolean staticFlag
See Also:
Constant Field Values

bufpos

public static int bufpos
Constructor Detail

JavaCharStream

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

JavaCharStream

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

JavaCharStream

public JavaCharStream(Reader dstream)

JavaCharStream

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

JavaCharStream

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

JavaCharStream

public JavaCharStream(InputStream dstream)
Method Detail

BeginToken

public static final char BeginToken()
                             throws IOException
IOException

readChar

public static final char readChar()
                           throws IOException
IOException

getColumn

public static final int getColumn()
Deprecated.  

See Also:
getEndColumn()

getLine

public static final int getLine()
Deprecated.  

See Also:
getEndLine()

getEndColumn

public static final int getEndColumn()

getEndLine

public static final int getEndLine()

getBeginColumn

public static final int getBeginColumn()

getBeginLine

public static final int getBeginLine()

backup

public static final 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,
                   int startline,
                   int startcolumn,
                   int buffersize)

ReInit

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

ReInit

public void ReInit(InputStream dstream)

GetImage

public static final String GetImage()

GetSuffix

public static final char[] GetSuffix(int len)

Done

public static void Done()

adjustBeginLineColumn

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