[antlr-interest] Building interactive interpreters?

Giovanni Lagorio lagorio at disi.unige.it
Thu Jan 15 06:43:09 PST 2009


Hi,
I'm new to ANTLR and I'd like to use it to build an interactive 
interpreter (generating C or, even better, a C++ parser).
If I've understood correctly, ANTLR wants to tokenize all the input 
upfront, which makes building interactive parsers cumbersome.
I think I can work around this limitation by trying to parse whole 
statements each time I get some input from the command line, and then 
wait for more input, without displaying any error, if the parsing fails 
because there are not enough tokens. While this approach may work, I 
don't like it very much.
Is there a better method? I hope I'm missing something ;-)

Regards,
Giovanni



More information about the antlr-interest mailing list