Interruptible parsers in Javascript

I’m trying to write a parser in JavaScript that is able to be interrupted by the fact that the entire input source is not available during the parse. When subsequent chunks of the input become available, the parser should be able to pick up where it left off.

Tokens in the grammar being parsed includes multi-character keywords as well as identifiers of unknown length. Determining if the parse has failed due to invalid syntax or incomplete input is important.

There are a number of edge cases to consider and it seems that this type of thing should have been done before. Searching for ‘interruptible parser’ doesn’t provide much info. Is there another name for such a thing? What are some gotchas edge cases to be aware of?