hi.  ST uses lazy evaluation in the sense that you can reference any  
attribute or template without concern that it will be evaluated until  
"the end" (ie., when you call toString()). This allows you to  
gradually fill in attributes as it's convenient to compute the as  
opposed to when the template references them. the key is to decouple  
the order of the output from the order of attribute computation. You  
also want to build up the overall output template in any order you  
want without concern that things will be evaluated too soon.

This is sort of a poor man's lazy evaluation in the sense that it  
doesn't do any dependency graph between values. It simply says make  
sure that all your values are set before calling toString.

  does that help?

Ter

On Mar 19, 2009, at 4:16 AM, [email protected] wrote:

> Hi,
>
> Does someone know of a real example of lazy evaluation in string  
> templates used in conjunction with a grammar or tree grammar.
>
> Best regards
> Bernard
> <bernard.vcf>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: 
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to