[antlr-interest] access token stream from parser action

Jim Idle jimi at temporal-wave.com
Fri Apr 16 11:13:40 PDT 2010


input.LT(n)

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Mark Volkmann
> Sent: Friday, April 16, 2010 6:27 AM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] access token stream from parser action
> 
> I'm trying to access comment tokens that are written to the hidden
> channel from a parser action. I'm using the Java 1.5 grammar that
> Terrance wrote. When it finds things like classes, fields and methods,
> I want to grab the comment, if any, that immediately precedes it.
> 
> I think I'm close to having it figured out, but I don't know how to
> get access to the token stream from a parser action. How can I do
> that?
> 
> --
> R. Mark Volkmann
> Object Computing, Inc.
> 
> 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