Ensure that only the tokens needed are fetched by TristonianJones · Pull Request #3722 · antlr/antlr4
Update the Go and Java runtimes to match the C++ runtime for syncing to only the tokens needed
to read the text from the supplied interval.
The fill() methods search for EOF as a signal to conclude the token syncing; however, when there
is an errant input, EOF may be missing and this can result in fill() re-reading the entire token stream
for each error encountered in the input. As such fill() has been replaced with sync() calls which
provide equivalent functionality.
Signed-off-by: Tristan Swadell tswadell@google.com