[antlr-interest] Another question......

Hill, Robert rhill03 at eds.com
Thu Jun 9 01:12:44 PDT 2005


Hi all,,
	<gasp> another question... :)

Im using the stringtemplate as the final code formatting phase of my tool trying to follow the separation of model/view etc, and was wondering if there was anyway of formating the strings in the template, kind of like you would  with sprintf?.. What I'd like to do would be something along the lines of

$name; separator = "\n"; format = "%.10s"$

At the moment I have a switch {} that checks which destination style im outputting in, and then formats the string before the 

xxx.setAttribute("name",myformattedstring);

If there isn't already a way of doing this (I don't see it in the string template docs) then is there any reason why this wouldn't be a good idea since it makes the view deal with any formatting, taking more output specifics away from the model?

If so I might have a bash at modding (read: messing up) stringtemplate :)

Cheers,
/2ob

Ps..If this isn't the list for stringtemplate discussion, could someone point me in the right direction? 



Rob Hill
EDS UKNMSC				+44 (0) 114 291 1928
Innovation Centre			+44 (0) 114 291 2000
217 Portobello			+44 (0) 791 732 1227
Sheffield				rhill03 at eds.com
S1 4DP





Rob Hill
F UKNMSC
Innovation Centre
217 Portobello
Sheffield	
S1 4DP
*	+44 (0) 114 291 1928
6	+44 (0) 114 291 2000
* +44 (0) 791 732 1227
*	rhill03 at eds.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20050609/01bbe9bd/attachment-0001.html


More information about the antlr-interest mailing list