[stringtemplate-interest] StringTemplateGroup multiple inheritance diff
Zenaan Harkness
zen at freedbms.net
Tue Dec 11 12:46:53 PST 2007
On Tue, Dec 11, 2007 at 11:58:37AM -0800, Terence Parr wrote:
>
> On Dec 10, 2007, at 6:08 PM, Zenaan Harkness wrote:
> >>
> >> Hi Zen,
> >>
> >> I think we'd need to modify syntax in group file also so you could
> >> do:
> >>
> >> group T : S1, S2;
> >>
> >> I wonder what multiple inheritance means in template group case.
> >> Probably ok. What's your use case?
> >
> > Librifaction.
> >
> > Simply size of templates - to break my 'lib' into more than one
> > parent.
> >
> > Simply chaining (single inheritance) works, but it's nice to be able
> > to
> > group templates into logically consistent units, and then 'pull in'
> > the
> > ones that are needed, explicitly.
> >
> > I'm not quite there yet with my current project, but I can see I
> > want it
> > :)
>
> Yes, this makes sense. Like grammar composition in new ANTLR 3.1.
> Hmm...I can't see a problem with this. We'd need to use order to
> resolve duplicate template names and other look up stuff. E.g., if a
> writer is not set for a group, it looks to it's super. Would that
> still work in your world?
Yes. I imagine super groups being a list, ordered by sequence added (or
listed in group file) as super groups to sub group.
zen
More information about the stringtemplate-interest
mailing list