[antlr-interest] Preserve source code comments

Jim Idle jimi at temporal-wave.com
Thu Oct 18 21:08:48 PDT 2012


It's a thorny problem. Your assumptions (and you have to make some) about
which comment belongs to which piece of code will always get you in to
trouble in the end.

But, as most programmers don’t use comments, perhaps you can ignore the
issue ;)

Jim

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Juancarlo Añez
Sent: Friday, October 19, 2012 10:53 AM
To: Terence Parr
Cc: antlr-interest at antlr.org
Subject: Re: [antlr-interest] Preserve source code comments

Terrence,

 This is what hidden channels are for :)
>
> http://www.antlr.org/wiki/pages/viewpage.action?pageId=557063
>

That would work.

How do I recover the current token index? Mmm. this.input.index() ?

-- 
Juancarlo *Añez*

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