Class CodePointCharStream.CodePoint32BitCharStream

java.lang.Object
org.antlr.v4.runtime.CodePointCharStream
org.antlr.v4.runtime.CodePointCharStream.CodePoint32BitCharStream
All Implemented Interfaces:
CharStream, IntStream
Enclosing class:
CodePointCharStream

private static final class CodePointCharStream.CodePoint32BitCharStream extends CodePointCharStream
  • Field Details

    • intArray

      private final int[] intArray
  • Constructor Details

    • CodePoint32BitCharStream

      private CodePoint32BitCharStream(int position, int remaining, String name, int[] intArray, int arrayOffset)
  • Method Details

    • getText

      public String getText(Interval interval)
      Return the UTF-16 encoded string for the given interval
      Parameters:
      interval - an interval within the stream
      Returns:
      the text of the specified interval
    • LA

      public int LA(int i)
      Description copied from interface: IntStream
      Gets the value of the symbol at offset i from the current position. When i==1, this method returns the value of the current symbol in the stream (which is the next symbol to be consumed). When i==-1, this method returns the value of the previously read symbol in the stream. It is not valid to call this method with i==0, but the specific behavior is unspecified because this method is frequently called from performance-critical code.

      This method is guaranteed to succeed if any of the following are true:

      • i>0
      • i==-1 and index() returns a value greater than the value of index() after the stream was constructed and LA(1) was called in that order. Specifying the current index() relative to the index after the stream was created allows for filtering implementations that do not return every symbol from the underlying source. Specifying the call to LA(1) allows for lazily initialized streams.
      • LA(i) refers to a symbol consumed within a marked region that has not yet been released.

      If i represents a position at or beyond the end of the stream, this method returns IntStream.EOF.

      The return value is unspecified if i<0 and fewer than -i calls to consume() have occurred from the beginning of the stream before calling this method.

    • getInternalStorage

      Object getInternalStorage()
      Specified by:
      getInternalStorage in class CodePointCharStream