Class JavaCharStream

  • All Implemented Interfaces:
    CharStream

    @Deprecated
    @InternalApi
    public class JavaCharStream
    extends Object
    implements CharStream
    Deprecated.
    An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (with java-like unicode escape processing).
    • Field Detail

      • staticFlag

        public static final boolean staticFlag
        Deprecated.
        Whether parser is static.
        See Also:
        Constant Field Values
      • bufpos

        public int bufpos
        Deprecated.
        Position in buffer.
      • bufline

        protected int[] bufline
        Deprecated.
      • bufcolumn

        protected int[] bufcolumn
        Deprecated.
      • column

        protected int column
        Deprecated.
      • line

        protected int line
        Deprecated.
      • prevCharIsCR

        protected boolean prevCharIsCR
        Deprecated.
      • prevCharIsLF

        protected boolean prevCharIsLF
        Deprecated.
      • inputStream

        protected Reader inputStream
        Deprecated.
      • nextCharBuf

        protected char[] nextCharBuf
        Deprecated.
      • buffer

        protected char[] buffer
        Deprecated.
      • maxNextCharInd

        protected int maxNextCharInd
        Deprecated.
      • nextCharInd

        protected int nextCharInd
        Deprecated.
      • inBuf

        protected int inBuf
        Deprecated.
      • tabSize

        protected int tabSize
        Deprecated.
    • Method Detail

      • setTabSize

        protected void setTabSize​(int i)
        Deprecated.
      • getTabSize

        protected int getTabSize​(int i)
        Deprecated.
      • ExpandBuff

        protected void ExpandBuff​(boolean wrapAround)
        Deprecated.
      • BeginToken

        public char BeginToken()
                        throws IOException
        Deprecated.
        Description copied from interface: CharStream
        Returns the next character that marks the beginning of the next token. All characters must remain in the buffer between two successive calls to this method to implement backup correctly.
        Specified by:
        BeginToken in interface CharStream
        Returns:
        starting character for token.
        Throws:
        IOException
      • AdjustBuffSize

        protected void AdjustBuffSize()
        Deprecated.
      • UpdateLineColumn

        protected void UpdateLineColumn​(char c)
        Deprecated.
      • getEndColumn

        public int getEndColumn()
        Deprecated.
        Get end column.
        Specified by:
        getEndColumn in interface CharStream
      • getEndLine

        public int getEndLine()
        Deprecated.
        Get end line.
        Specified by:
        getEndLine in interface CharStream
      • getBeginColumn

        public int getBeginColumn()
        Deprecated.
        Description copied from interface: CharStream
        Returns the column number of the first character for current token (being matched after the last call to BeginTOken).
        Specified by:
        getBeginColumn in interface CharStream
        Returns:
        column of token start
      • getBeginLine

        public int getBeginLine()
        Deprecated.
        Description copied from interface: CharStream
        Returns the line number of the first character for current token (being matched after the last call to BeginTOken).
        Specified by:
        getBeginLine in interface CharStream
        Returns:
        line number of token start
      • backup

        public void backup​(int amount)
        Deprecated.
        Retreat.
        Specified by:
        backup in interface CharStream
      • ReInit

        public void ReInit​(Reader dstream,
                           int startline,
                           int startcolumn,
                           int buffersize)
        Deprecated.
        Reinitialise.
      • ReInit

        public void ReInit​(Reader dstream,
                           int startline,
                           int startcolumn)
        Deprecated.
        Reinitialise.
      • ReInit

        public void ReInit​(Reader dstream)
        Deprecated.
        Reinitialise.
      • ReInit

        public void ReInit​(InputStream dstream,
                           int startline,
                           int startcolumn,
                           int buffersize)
        Deprecated.
        Reinitialise.
      • ReInit

        public void ReInit​(InputStream dstream,
                           int startline,
                           int startcolumn)
        Deprecated.
        Reinitialise.
      • ReInit

        public void ReInit​(InputStream dstream)
        Deprecated.
        Reinitialise.
      • GetImage

        public String GetImage()
        Deprecated.
        Description copied from interface: CharStream
        Returns a string made up of characters from the marked token beginning to the current buffer position. Implementations have the choice of returning anything that they want to. For example, for efficiency, one might decide to just return null, which is a valid implementation.
        Specified by:
        GetImage in interface CharStream
        Returns:
        token image as String
      • GetSuffix

        public char[] GetSuffix​(int len)
        Deprecated.
        Description copied from interface: CharStream
        Returns an array of characters that make up the suffix of length 'len' for the currently matched token. This is used to build up the matched string for use in actions in the case of MORE. A simple and inefficient implementation of this is as follows : { String t = GetImage(); return t.substring(t.length() - len, t.length()).toCharArray(); }
        Specified by:
        GetSuffix in interface CharStream
        Returns:
        suffix
      • Done

        public void Done()
        Deprecated.
        Set buffers back to null when finished.
        Specified by:
        Done in interface CharStream
      • adjustBeginLineColumn

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