Use endOfFileMark instead of position >= length()

This allows certain lines in the tokenizer to actually be
reached, so it needed to happen.