[antlr-interest] StringTemplate + preserving comments

sohail at taggedtype.net sohail at taggedtype.net
Tue Nov 8 10:00:21 PST 2005


> Sohail Somani wrote:
>
>>I think the subject line is basically impossible with antlr
>>+stringtemplate, BUT in the off-chance someone has any ideas to do this,
>>I would appreciate some pointers.
>>
>>It would be really nice if one could do it without a TreeParser :)
>>
>>Thanks!
>>
>>Sohail
>>
>>
>>
> Hi
> I don't know much about Stringtemplate, but if you want to preserve
> comments,
> you could use a tokenstreamhiddentoken filter after pasrsing, see
> http://www.antlr.org/doc/streams.html

Hi Ed!

I am aware of this technique. I would ideally like the separation that
StringTemplate provides. This is a bit difficult because (I think) it
would require me to insert <comment>'s between every tag in my template. I
should probably sign up for the stringtemplate ml now.

Sohail


More information about the antlr-interest mailing list