[antlr-interest] New article on StringTemplates and Treewalkers

sohail at taggedtype.net sohail at taggedtype.net
Tue Jan 10 13:14:08 PST 2006


>
> On Jan 10, 2006, at 10:25 AM, Andy Tripp wrote:
>
>> I posted the article on antlr.org:
>> http://antlr.org/article/1136917339929/stringTemplate.html
>>
>> It's in the "articles" section, under "Heresy" ;)
>
> Ha hah ha!  Cool.  Thanks.
>
> Before posting my thoughts, I would like to hear people's comments
> for/against.  I will add initially, however, that you seem to be
> sweeping under the rug the one big counterexample of your statement,
> "one assumption is that the structure of the input and output
> language ASTs are similar."  I'm pretty sure that ANTLR's input /
> output languages are vastly more different than your C->Java
> translation. ;)
>
> This should make for an excellent discussion, which hopefully will
> get folded in a future book.

I was struck by the example of 5 lines of C code being folded into one
line of Java code. Why couldn't you have a tree parser do this? It would
be inefficient, but I don't know if that is the point of the article.


More information about the antlr-interest mailing list