public virtual void Consume()
{
if (La(1) == IntStreamConstants.Eof)
{
throw new InvalidOperationException("cannot consume EOF");
}
// buf always has at least data[p==0] in this method due to ctor
lastChar = data[p];
// track last char for LA(-1)
if (p == n - 1 && numMarkers == 0)
{
n = 0;
p = -1;
// p++ will leave this at 0
lastCharBufferStart = lastChar;
}
p++;
currentCharIndex++;
Sync(1);
}