[antlr-interest] Retaining comments

Terence Parr parrt at cs.usfca.edu
Tue Mar 11 10:42:55 PDT 2008


send comments to parser on different channel.  then lookin token  
buffer for them between "real" tokens.
Ter
On Feb 27, 2008, at 1:19 PM, <bmeike at speakeasy.net> <bmeike at speakeasy.net 
 > wrote:

>
>
>
>
> On Wed Feb 27 12:29 , Gavin Lambert sent:
> > This will keep the comment tokens in the token stream at the
> > appropriate points. To transfer them you'll have to add some code
> > that looks for comment tokens nearby recognised parser constructs
> > so you can emit them at the right place in the output.
>
> Sound great.  What do you mean by "looks for comment tokens".  As  
> far as I can tell, the parser only sees the DEFAULT channel.  Where  
> do I look, to find nearby tokens?
>
> Thanks!
>   Blake Meike
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080311/8d5f5cf6/attachment.html 


More information about the antlr-interest mailing list