[antlr-interest] Actions in predicates
Jim Idle
jimi at temporal-wave.com
Mon Feb 22 09:21:20 PST 2010
It's not completely flawed. To do what you asked, you do not need to influence the lexer, just look ahead in the off-channel at certain points and change the channel of the SEMI back to the default if you wanted it to appear; but as I said, that is an awkward way to do it I think.
Jim
> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Marcin Rzeznicki
> Sent: Monday, February 22, 2010 9:12 AM
> To: shmuel siegel
> Cc: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] Actions in predicates
>
> On Mon, Feb 22, 2010 at 6:05 PM, shmuel siegel
> <antlr at shmuelhome.mine.nu>wrote:
>
> > On 2/22/2010 6:56 PM, Marcin Rzeźnicki wrote:
> > > During predicate used to disambiguate call subrule I'd need to fire
> > action
> > > which sets appropriate flag in my lexer ordering it to emit
> semicolons to
> > > the main channel.
> > >
> > Have things changed so that the parser can affect the lexer? I
> thought
> > that the lexer does all of its parsing before the parser sees any
> tokens.
> >
> >
> >
>
> You may be right, ooops. Then my solution is completely flawed. I'll
> better
> check ANTLR's source code :-)
>
>
>
> --
> Greetings
> Marcin Rzeźnicki
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address
More information about the antlr-interest
mailing list