[stringtemplate-interest] Dynamic binding of templates?
Terence Parr
parrt at cs.usfca.edu
Mon Jun 20 11:40:45 PDT 2011
coorect. no interfaces. turns out they added nothing and were annoying on antlr project. counterintuitive, eh?
T
On Jun 5, 2011, at 5:20 AM, Sam Barnett-Cormack wrote:
> Also, am I right from my scanning of docs that interfaces aren't around
> anymore in ST4? If so, what's the reasoning behind that?
>
> On 05/06/2011 13:12, Sam Barnett-Cormack wrote:
>> On 05/06/2011 12:55, Sam Barnett-Cormack wrote:
>>> I want the extension templates to actually be satisfying some abstract
>>> interface and be called by the core templates. So a core template might
>>> only know that it's going to invoke 'some item template', and then it
>>> will invoke a specific template that was not even conceived off at the
>>> time the core template was written. The immediate idea that occurs to me
>>> is if it were possible to pass a template reference as a parameter and
>>> invoke it, but that would be kind of awkward and still hard to use, as
>>> it would have to be passed down through any external templates (although
>>> it could be deeper in a data structure, so it's possible - say that the
>>> core template just receives a list of items, and the template reference
>>> is a member of the item data structure, and so forth - maybe this could
>>> be done through invoking a 'getOutput' method on the item that invokes
>>> its own template, which may then invoke core templates perhaps, and then
>>> is just used as a string for output). Is anything like this possible?
>>
>> And as I scan docs I can see that this element can be handled by the
>> syntax<(expr)(argument-list)>... that's embarassing... but thoughts and
>> ideas on the whole lot are still welcome.
>>
>> Sam
>>
>> _______________________________________________
>> stringtemplate-interest mailing list
>> stringtemplate-interest at antlr.org
>> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
More information about the stringtemplate-interest
mailing list