ANTLRInputStream which treats the input
as a series of Unicode code points, instead of a series of UTF-16
code units.
Use this if you need to parse input which potentially contains
Unicode values > U+FFFF.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| protected final String | |
| protected int | |
| protected final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public final void | consume()
Implements org. |
| public static CodePointCharStream | fromBuffer(CodePointBuffer codePointBuffer)
Constructs a |
| public static CodePointCharStream | fromBuffer(CodePointBuffer codePointBuffer, String name)
Constructs a named |
| pack-priv abstract Object | |
| public final String | getSourceName()
Implements org. |
| public final int | index()
Implements org. LA(1).
|
| public final int | mark()
Implements org. |
| public final void | release(int
A marker returned by a call to marker)mark().Implements org. mark().
|
| public final void | seek(int
The absolute index to seek to. index)Implements org. index.
|
| public final int | size()
Implements org. |
| public final boolean | supportsUnicodeCodePoints()
Implements org. |
| public final String |
| name | back to summary |
|---|---|
| protected final String name | |
| position | back to summary |
|---|---|
| protected int position | |
| size | back to summary |
|---|---|
| protected final int size | |
| CodePointCharStream | back to summary |
|---|---|
| private CodePointCharStream(int position, int remaining, String name) | |
| consume | back to summary |
|---|---|
| public final void consume() Implements org. Doc from org. Consumes the current symbol in the stream. This method has the following effects:
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).
| |
| fromBuffer | back to summary |
|---|---|
| public static CodePointCharStream fromBuffer(CodePointBuffer codePointBuffer) Constructs a | |
| fromBuffer | back to summary |
|---|---|
| public static CodePointCharStream fromBuffer(CodePointBuffer codePointBuffer, String name) Constructs a named | |
| getInternalStorage | back to summary |
|---|---|
| pack-priv abstract Object getInternalStorage() | |
| getSourceName | back to summary |
|---|---|
| public final String getSourceName() Implements org. Doc from org. Gets the name of the underlying symbol source. This method returns a
non-null, non-empty string. If such a name is not known, this method
returns
| |
| index | back to summary |
|---|---|
| public final int index() Implements org. Doc from org. Return the index into the stream of the input symbol referred to by
The behavior of this method is unspecified if no call to an
| |
| mark | back to summary |
|---|---|
| public final int mark() Implements org. mark/release do nothing; we have entire buffer
| |
| release | back to summary |
|---|---|
| public final void release(int marker) Implements org. Doc from org. This method releases a marked range created by a call to
For more information and an example, see
| |
| seek | back to summary |
|---|---|
| public final void seek(int index) Implements org. Doc from org. Set the input cursor to the position indicated by
index
lies within a marked region. For more information on marked regions, see
mark. The behavior of this method is unspecified if no call to
an initializing method has occurred after this stream
was constructed.
| |
| size | back to summary |
|---|---|
| public final int size() Implements org. Doc from org. Returns the total number of symbols in the stream, including a single EOF symbol.
| |
| supportsUnicodeCodePoints | back to summary |
|---|---|
| public final boolean supportsUnicodeCodePoints() Implements org. Doc from org. Determines if the current stream supports Unicode code points.
| |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| private final char[] |
| Access | Constructor and Description |
|---|---|
| private | CodePoint16BitCharStream(int position, int remaining, String name, char[] charArray, int arrayOffset)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Object | getInternalStorage()
Implements abstract org. |
| public String | getText(Interval
an interval within the stream interval)Implements org. |
| public int | LA(int i)
Implements org. i from the current
position.
|
| charArray | back to summary |
|---|---|
| private final char[] charArray | |
| CodePoint16BitCharStream | back to summary |
|---|---|
| private CodePoint16BitCharStream(int position, int remaining, String name, char[] charArray, int arrayOffset) | |
| getInternalStorage | back to summary |
|---|---|
| pack-priv Object getInternalStorage() Implements abstract org.
| |
| getText | back to summary |
|---|---|
| public String getText(Interval interval) Implements org. Return the UTF-16 encoded string for the given interval
| |
| LA | back to summary |
|---|---|
| public int LA(int i) Implements org. Doc from org. Gets the value of the symbol at offset This method is guaranteed to succeed if any of the following are true:
If The return value is unspecified if
| |
| Modifier and Type | Field and Description |
|---|---|
| private final int[] |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Object | getInternalStorage()
Implements abstract org. |
| public String | getText(Interval
an interval within the stream interval)Implements org. |
| public int | LA(int i)
Implements org. i from the current
position.
|
| intArray | back to summary |
|---|---|
| private final int[] intArray | |
| CodePoint32BitCharStream | back to summary |
|---|---|
| private CodePoint32BitCharStream(int position, int remaining, String name, int[] intArray, int arrayOffset) | |
| getInternalStorage | back to summary |
|---|---|
| pack-priv Object getInternalStorage() Implements abstract org.
| |
| getText | back to summary |
|---|---|
| public String getText(Interval interval) Implements org. Return the UTF-16 encoded string for the given interval
| |
| LA | back to summary |
|---|---|
| public int LA(int i) Implements org. Doc from org. Gets the value of the symbol at offset This method is guaranteed to succeed if any of the following are true:
If The return value is unspecified if
| |
| Modifier and Type | Field and Description |
|---|---|
| private final byte[] |
| Access | Constructor and Description |
|---|---|
| private | CodePoint8BitCharStream(int position, int remaining, String name, byte[] byteArray, int arrayOffset)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Object | getInternalStorage()
Implements abstract org. |
| public String | getText(Interval
an interval within the stream interval)Implements org. |
| public int | LA(int i)
Implements org. i from the current
position.
|
| byteArray | back to summary |
|---|---|
| private final byte[] byteArray | |
| CodePoint8BitCharStream | back to summary |
|---|---|
| private CodePoint8BitCharStream(int position, int remaining, String name, byte[] byteArray, int arrayOffset) | |
| getInternalStorage | back to summary |
|---|---|
| pack-priv Object getInternalStorage() Implements abstract org.
| |
| getText | back to summary |
|---|---|
| public String getText(Interval interval) Implements org. Return the UTF-16 encoded string for the given interval
| |
| LA | back to summary |
|---|---|
| public int LA(int i) Implements org. Doc from org. Gets the value of the symbol at offset This method is guaranteed to succeed if any of the following are true:
If The return value is unspecified if
| |