[antlr-interest] look ahead side effects on interactive parsers
monty at codetransform.com
Wed Jun 23 09:25:30 PDT 2004
I would recommend turning the input, up to and including the newline,
into a string, make a stream out of that, and then call your parser.
That way there will be an EOF from the stream and the parser will know
it has all the input.
ANTLR & Java Consultant -- http://www.codetransform.com
ANSI C/GCC transformation toolkit --
Embrace the Decay -- http://www.codetransform.com/EmbraceDecay.html
On Jun 22, 2004, at 8:51 AM, clay_douglass_at_work wrote:
> I am implementing an expression parser for an interactive debugger.
> Unfortunately the generated parser causes underactivity issues. e.g.
> It doesn't return the command till I hit return twice. I guess this
> is an obvious side effect of the look-ahead k=2. I had though since
> each command pattern ended in NEWLINE that I would get command
> returned as soon as the parser saw the NEWLINE. Any helpful
> suggestion or is my plan to use ANTLR to parse the interactive
> commands just a bad idea?
Yahoo! Groups Links
<*> To visit your group on the web, go to:
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
More information about the antlr-interest