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: [email protected] [mailto:antlr-interest- > [email protected]] On Behalf Of Marcin Rzeznicki > Sent: Monday, February 22, 2010 9:12 AM > To: shmuel siegel > Cc: [email protected] > Subject: Re: [antlr-interest] Actions in predicates > > On Mon, Feb 22, 2010 at 6:05 PM, shmuel siegel > <[email protected]>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 List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
