[stringtemplate-interest] How does one map properties/methods of an object to ST attributes?

Terence Parr parrt at cs.usfca.edu
Tue Oct 16 10:16:55 PDT 2007


On Oct 16, 2007, at 8:43 AM, Johannes Luber wrote:

> Terence Parr wrote:
>>
>> On Oct 16, 2007, at 2:30 AM, Johannes Luber wrote:
>>> The problem in my case is that I need to manipulate the tree  
>>> after the
>>> recognition for optimization purposes etc., so I can't use ANTLR's
>>> inbuilt faculties while building the tree. So I have write an own  
>>> tree
>>> walker after all, don't I?
>>
>> ANTLR 3.1 allows tree -> tree rewrites...wanna test it out?
>>
>> Ter
>>
> How would that work with non-ANTLR trees? Do you need the source files
> for the tree and its nodes?

Nope, just a TreeAdaptor (hence, here is where the Object tree type  
comes in handy) :)

Ter


More information about the stringtemplate-interest mailing list