[antlr-interest] Reading from stdin (C backend)

Jim Idle jimi at temporal-wave.com
Sun Aug 3 17:29:14 PDT 2008


On Sun, 2008-08-03 at 20:08 -0400, Jason Nielsen wrote:

> Hello all,
> 
> Sorry if this question is ridiculously simple but how does one read a 
> stream from standard input?

Because the lexer requires the entire input to work, you need to find
some point in your input stream where you can accumulate packets, then
you can use the standard constructors for in memory input streams and so
on, reset/rebuild the lexer/parser/tree parser combinations for each
'packet'. There is not continuous parsing at the moment, though I have
some ideas on how this might be done (it is not trivial).

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080803/32afee5f/attachment.html 


More information about the antlr-interest mailing list