[stringtemplate-interest] Constructing a Separator

Magnus Knuth mai00cas at studserv.uni-leipzig.de
Sat Sep 22 09:54:23 PDT 2007


I use a group file for generating some logic formulas and in one case I 
want to use a concatenation of an argument and spaces as the separator 
for another arbitrary long multi-valued argument. Is that possible, anyhow?

what works is:
group otter;
connective(app, phi) ::= <<(<phi; separator=signMap.(app.symbol.ID)>)>>

Assume signMap.(app.symbol.ID) = "&" and phi = {"P(a)","P(b)"}, it delivers:
(P(a)&P(b))

so I want the separator to be a combination like " "+signMap.(app.symbol.ID)+" ", which should deliver:
(P(a) & P(b))

I found nothing in the docs. Is it possible? Any ideas?

... Damn and Wow, this took me hours, and now when I wanna ask for help, it works exactly the same as i wanted to ask for:
group otter;
connective(app, phi) ::= <<(<phi; separator=" "+signMap.(app.symbol.ID)+" ">)>>

Please note it somewhere.




-- 
Magnus Knuth
mai00cas at studserv.uni-leipzig.de




More information about the stringtemplate-interest mailing list