[antlr-interest] lazy reading

Michael Laszlo mjl at nova.edu
Fri Oct 19 09:07:59 PDT 2007


The ANTLRReaderStream class is not very helpful for interactive, command-line applications since its constructor eagerly consumes input up to end-of-file. I wonder whether there is a lazy version of this class? If not, can anyone suggest a clean workaround? One approach might be to iteratively read input up to a delimiter (such as newline) into a string, wrap it in an ANTLRStreamString object, and hand it off to the lexer.

Thanks,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20071019/0e1cdb63/attachment.html 


More information about the antlr-interest mailing list