IntStream class abstract

A simple stream of symbols whose values are represented as integers. This interface provides marked ranges with support for a minimum level of buffering necessary to implement arbitrary lookahead during prediction. For more information on marked ranges, see {@link #mark}.

Initializing Methods: Some methods in this interface have unspecified behavior if no call to an initializing method has occurred after the stream was constructed. The following is a list of initializing methods:

  • {@link #LA}
  • {@link #consume}
  • {@link #size}
Implementers

Constructors

IntStream()

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
Return the index into the stream of the input symbol referred to by {@code LA(1)}.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
Returns the total number of symbols in the stream, including a single EOF symbol.
no setter
sourceName String
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 {@link #UNKNOWN_SOURCE_NAME}.
no setter

Methods

consume() → void
Consumes the current symbol in the stream. This method has the following effects:
LA(int i) int?
Gets the value of the symbol at offset i from the current position. When {@code i==1}, this method returns the value of the current symbol in the stream (which is the next symbol to be consumed). When {@code i==-1}, this method returns the value of the previously read symbol in the stream. It is not valid to call this method with {@code i==0}, but the specific behavior is unspecified because this method is frequently called from performance-critical code.
mark() int
A mark provides a guarantee that {@link #seek seek()} operations will be valid over a "marked range" extending from the index where {@code mark()} was called to the current {@link #index index()}. This allows the use of streaming input sources by specifying the minimum buffering requirements to support arbitrary lookahead during prediction.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
release(int marker) → void
This method releases a marked range created by a call to {@link #mark mark()}. Calls to {@code release()} must appear in the reverse order of the corresponding calls to {@code mark()}. If a mark is released twice, or if marks are not released in reverse order of the corresponding calls to {@code mark()}, the behavior is unspecified.
seek(int index) → void
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.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

EOF → const int
The value returned by {@link #LA LA()} when the end of the stream is reached.
UNKNOWN_SOURCE_NAME → const String
The value returned by {@link #getSourceName} when the actual name of the underlying source is not known.