@Override
	public void consume() {
		if (LA(1) == Token.EOF) {
			throw new IllegalStateException("cannot consume EOF");
		}

		// buf always has at least tokens[p==0] in this method due to ctor
		lastToken = tokens[p];   // track last token for LT(-1)

		// if we're at last token and no markers, opportunity to flush buffer
		if ( p == n-1 && numMarkers==0 ) {
			n = 0;
			p = -1; // p++ will leave this at 0
			lastTokenBufferStart = lastToken;
		}

		p++;
		currentTokenIndex++;
		sync(1);
	}
Absolute token index. It's the index of the token about to be read via
{@code LT(1)}. Goes from 0 to the number of tokens in the entire stream,
although the stream size is unknown before the end is reached.

<p>This value is used to set the token indexes if the stream provides tokens
that implement {@link WritableToken}.</p>
runtime/Java/src/org/antlr/v4/runtime/UnbufferedTokenStream.java