[antlr-interest] Preserving ALL comments!

sohail at taggedtype.net sohail at taggedtype.net
Tue Feb 21 09:13:25 PST 2006


>> And we already have that hidden channels and hidden
>> objects that are supposed to solve such problems.
>>
>> Any easier solution?
>
> And the hidden channels seem like the wrong solution...they split the
> comments and whitespace into
> a separate stream of tokens to be independently processed. But if you
> really want to know which
> comments go with which code, you can't do your processing independently.
> You need to treat
> the comments and whitespace in the context of the stream of "real" tokens.

Very well put. You can't do language translation + comments without making
comments part of your representation.




More information about the antlr-interest mailing list