Interface CharStream
- All Superinterfaces:
IntStream
- All Known Implementing Classes:
ANTLRFileStream, ANTLRInputStream, CodePointCharStream, CodePointCharStream.CodePoint16BitCharStream, CodePointCharStream.CodePoint32BitCharStream, CodePointCharStream.CodePoint8BitCharStream, UnbufferedCharStream
A source of characters for an ANTLR lexer.
-
Field Summary
Fields inherited from interface IntStream
EOF, UNKNOWN_SOURCE_NAME -
Method Summary
-
Method Details
-
getText
This method returns the text for a range of characters within this input stream. This method is guaranteed to not throw an exception if the specifiedintervallies entirely within a marked range. For more information about marked ranges, seeIntStream.mark().- Parameters:
interval- an interval within the stream- Returns:
- the text of the specified interval
- Throws:
NullPointerException- ifintervalisnullIllegalArgumentException- ifinterval.a < 0, or ifinterval.b < interval.a - 1, or ifinterval.blies at or past the end of the streamUnsupportedOperationException- if the stream does not support getting the text of the specified interval
-