[antlr-interest] [SPAM] [SPAM] Re: [SPAM] [SPAM] Syntax ambiguity?

Kevin J. Cummings cummings at kjchome.homeip.net
Fri Mar 4 12:32:07 PST 2011


On 03/04/2011 03:28 PM, Olivier Lefevre wrote:
> Just for my understanding of ANTLR, though, I wonder if
> there isn't a solution at the lexer level: some way to tell
> the lexer that if it sees a 'fun2(' then it *must* look for
> an ID2 next.

That would involve the lexer knowing something about the parsing
context, which it doesn't.  Your entire character stream gets tokenized
before the parser even gets run....

> Regards,
> 
> -- O.L.
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address


-- 
Kevin J. Cummings
kjchome at verizon.net
cummings at kjchome.homeip.net
cummings at kjc386.framingham.ma.us
Registered Linux User #1232 (http://counter.li.org)


More information about the antlr-interest mailing list