All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Java.target.apidocs.org.antlr.v4.runtime.CodePointCharStream.html Maven / Gradle / Ivy

There is a newer version: 4.9.0
Show newest version






CodePointCharStream (ANTLR 4 Runtime (Optimized) 4.7.3 API)











org.antlr.v4.runtime

Class CodePointCharStream

    • Field Detail

      • size

        protected final int size
      • name

        protected final String name
      • position

        protected int position
    • Method Detail

      • consume

        public final void consume()
        Description copied from interface: IntStream
        Consumes the current symbol in the stream. This method has the following effects:
        • Forward movement: The value of index() before calling this method is less than the value of index() after calling this method.
        • Ordered lookahead: The value of LA(1) before calling this method becomes the value of LA(-1) after calling this method.
        Note that calling this method does not guarantee that index() is incremented by exactly 1, as that would preclude the ability to implement filtering streams (e.g. CommonTokenStream which distinguishes between "on-channel" and "off-channel" tokens).
        Specified by:
        consume in interface IntStream
      • index

        public final int index()
        Description copied from interface: IntStream
        Return the index into the stream of the input symbol referred to by LA(1).

        The behavior of this method is unspecified if no call to an initializing method has occurred after this stream was constructed.

        Specified by:
        index in interface IntStream
      • size

        public final int size()
        Description copied from interface: IntStream
        Returns the total number of symbols in the stream, including a single EOF symbol.
        Specified by:
        size in interface IntStream
      • mark

        public final int mark()
        mark/release do nothing; we have entire buffer
        Specified by:
        mark in interface IntStream
        Returns:
        An opaque marker which should be passed to release() when the marked range is no longer required.
      • release

        public final void release(int marker)
        Description copied from interface: IntStream
        This method releases a marked range created by a call to mark(). Calls to release() must appear in the reverse order of the corresponding calls to mark(). If a mark is released twice, or if marks are not released in reverse order of the corresponding calls to mark(), the behavior is unspecified.

        For more information and an example, see IntStream.mark().

        Specified by:
        release in interface IntStream
        Parameters:
        marker - A marker returned by a call to mark().
        See Also:
        IntStream.mark()
      • seek

        public final void seek(int index)
        Description copied from interface: IntStream
        Set the input cursor to the position indicated by index. If the specified index lies past the end of the stream, the operation behaves as though index was the index of the EOF symbol. After this method returns without throwing an exception, then at least one of the following will be true.
        • index() will return the index of the first symbol appearing at or after the specified index. Specifically, implementations which filter their sources should automatically adjust index forward the minimum amount required for the operation to target a non-ignored symbol.
        • LA(1) returns IntStream.EOF
        This operation is guaranteed to not throw an exception if index lies within a marked region. For more information on marked regions, see IntStream.mark(). The behavior of this method is unspecified if no call to an initializing method has occurred after this stream was constructed.
        Specified by:
        seek in interface IntStream
        Parameters:
        index - The absolute index to seek to.
      • supportsUnicodeCodePoints

        public final boolean supportsUnicodeCodePoints()
        Description copied from interface: UnicodeCharStream
        Determines if the current stream supports Unicode code points.
        Specified by:
        supportsUnicodeCodePoints in interface UnicodeCharStream
        Returns:
        true if the current input stream supports Unicode code points; otherwise, false if the current input stream returns UTF-16 code units for code points above U+FFFF.

Copyright © 1992–2019 Tunnel Vision Laboratories, LLC. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy