[antlr-interest] antlr & pipe

Nev antlr at zavalon.com
Fri Mar 7 18:08:14 PST 2008


I *think* your problem is that antlr runs the lexer to completion and then
runs the parser. Without out some termination for the lexer the parser will
never start.

I don't think antlr is able to work on a stream as you require unless the
stream consist of multiple blocks that can be parsed independent of each
other, and you setup your main to invoke a new paser for each block.

Please note I am relatively new to antlr, so this info could be completely
wrong.

nev

 

 

  _____  

From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Alexandru Mosoi
Sent: Saturday, 8 March 2008 10:02 AM
To: antlr-interest at antlr.org
Subject: [antlr-interest] antlr & pipe

 

I'm trying to write a program that parses gdb output as it's displayed. The
gdb's output is sent to a pipe, from where it's read by my program. However
the parser, after reading gdb's output hangs wainting for another token or
EOF. But, gdb doesn't close the pipe (no EOF) and doesn't send any extra
token. I read somewhere that I should disable lookahead, but how do I do
that?

-- 
Alexandru Moşoi
http://alexandru.mosoi.googlepages.com

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080308/e755bddf/attachment.html 


More information about the antlr-interest mailing list