public void setTokenSource(TokenSource tokenSource) {
        this.tokenSource = tokenSource;
        tokens.clear();
        p = -1;
        fetchedEOF = false;
    }
Reset this token stream by setting its token source.
runtime/Java/src/org/antlr/v4/runtime/BufferedTokenStream.java