[antlr-interest] Parsing a little at a time?

Benjamin Niemann pink at odahoda.de
Sun Oct 14 13:39:06 PDT 2007


Hi Rick,

Rick Mann wrote:

> I posted this question once already, but got no response. Let me try
> rewording it.
> 
> I'd like to parse input as I get it from the user, a line at a time.
> Is this possible? Can I pass a string to the parser, and then have it
> return without error, even if the input is incomplete? Then I'd pass
> another string to the same parser instance, etc. Eventually, I'd like
> the parser to return an indication that it completed some work
> (although, in my case, I don't really even need that).
> 
> I'm about to try the experiment, but I'd hoped to know ahead of time.
> Maybe the API docs say...

ANTLR3 does not support this yet. There have been plans for this and it may
appear in a later release. Search the list for 'incremential parsing' for
past discussions.

HTH

-- 
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/



More information about the antlr-interest mailing list