[stringtemplate-interest] List of used Attributes from ST without formal parameters
Dreyer Ulf (CR/APA3)
Ulf.Dreyer at de.bosch.com
Tue Feb 27 22:59:56 PST 2007
Hi Terence,
sorry for not answering but I was out of Town for some Time.
I looked at tht StructureString and DebugString.
At least the C#-Implementation of StructureString yealds next to nothing when
anonymous Templates are used. The DebugString makes no distinction between
text- and action-chunks.
Right now I'm thinking of restricting the use of anonymous templates in my Application.
This brings me to a quick question:
I'm trying to use ST to support a VERY easy template mechanism in one of
our applications. It has to be very simple as nobody of the users will
write anything as complex as <mylist:{i | something <i.foo> = some more <i.bar>}>
So I'm thinking of removing(= not using) all anonymous Templates.
There will still be Template application like <myList:TemplateA()> or <TemplateB(myList)>
but nothing fancy.
This shouldn't reduce the power of ST right (only some convenience for experienced users)?
I will probably also disallow the <(expr)(argument-List)> and <attribute.(expr)> constructs.
This WILL reduce the power of ST but I don't think these constructs are necessary for what we need
and they are way to complicated.
With these restrictions it will be a lot easier to deduce which variables/symbols are used in a
given Template and its subtemplates.
Is there any mayor flaw in this argumentation?
Thank you Terence
--
Dipl. Inf. Ulf Dreyer
Robert Bosch GmbH
Zentralbereich Forschung und Vorausentwicklung
Software und Systemengineering in der Fertigungsautomatisierung CR/
APA3
Postfach 30 02 40 D-70442 Stuttgart
Tel.: 0711/811- 34365
Fax: 0711/811-518 34365
eMail: ulf . dreyer at de . bosch . com
Robert Bosch GmbH, Sitz: Stuttgart, Registergericht: Amtsgericht
Stuttgart HRB 14000 Aufsichtsratsvorsitzender: Hermann Scholl;
Geschäftsführung: Franz Fehrenbach, Siegfried Dais; Bernd Bohr,
Wolfgang Chur, Rudolf Colm, Gerhard Kümmel, Wolfgang
Malchow, Peter
Marks; Volkmar Denner, Peter Tyroller.
> -----Original Message-----
> From: Terence Parr [mailto:parrt at cs.usfca.edu]
> Sent: Monday, February 26, 2007 9:21 PM
> To: Dreyer Ulf (CR/APA3)
> Subject: Re: [stringtemplate-interest] List of used
> Attributes from ST without formal parameters
>
> Hi Ulf, did my answer help about toStructureString etc...?
> Thanks,
> Ter
> On Feb 22, 2007, at 5:01 AM, Dreyer Ulf (CR/APA3) wrote:
>
> > Hi,
> >
> >
> > Is there any way to ask a template for a list of all the
> Attributes
> > it uses?
> > I'd like to check template-chunks for required variables:
> >
> > Example:
> >
> > From "$log.length$"
> > I would like to get 'log.length', or possibly [log,log.length]
> >
> > more complicated:
> > "$logs:{u| $u.name - u.length$}$ --> [logs, logs.name, logs.length]
> >
> > Is there any way to do this besides writing another parser.
> > This seems such a waste because ST already contains a lot of
> > the needed mechanisms.
> >
> > Thans a lot,
> >
> > Ulf
> >
> > P.S.: (Using StringTemplate for C# 3.0.1)
> >
> >
> > --
> > Dipl. Inf. Ulf Dreyer
> > Robert Bosch GmbH
> > Zentralbereich Forschung und Vorausentwicklung
> > Software und Systemengineering in der Fertigungsautomatisierung CR/
> > APA3
> > Postfach 30 02 40 D-70442 Stuttgart
> > Tel.: 0711/811- 34365
> > Fax: 0711/811-518 34365
> > eMail: ulf . dreyer at de . bosch . com
> >
> > Robert Bosch GmbH, Sitz: Stuttgart, Registergericht: Amtsgericht
> > Stuttgart HRB 14000 Aufsichtsratsvorsitzender: Hermann Scholl;
> > Geschäftsführung: Franz Fehrenbach, Siegfried Dais; Bernd Bohr,
> > Wolfgang Chur, Rudolf Colm, Gerhard Kümmel, Wolfgang
> Malchow, Peter
> > Marks; Volkmar Denner, Peter Tyroller.
> >
> > _______________________________________________
> > stringtemplate-interest mailing list
> > stringtemplate-interest at antlr.org
> > http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
>
>
More information about the stringtemplate-interest
mailing list