StringTemplate is an object oriented system that relies on run time type 
information and so on. It does not work with C. You need to construct a small 
set of C functions that can accumulate strings, or use the builtin 
ANTLR3_STRING stuff that I provide (but make sure you understand it first so 
you don't use too much memory to achieve your ends - it is a convenience thing 
in the library and better to have your own specific things to suit your 
purpose). Avoid printf directly - best to build a buffer then do what you need 
to do with that.

Jim

> -----Original Message-----
> From: [email protected] [mailto:antlr-interest-
> [email protected]] On Behalf Of Heiko Folkerts
> Sent: Wednesday, November 18, 2009 2:20 AM
> To: [email protected]
> Subject: [antlr-interest] Can the C Target be used with String
> template?
> 
> Hi,
> I'd like to write a translator as explained in the ANTLR book using the
> String Template Library. When I try to run antlr I get an error that
> the file "ST.stg" was not found. Changing the target language to jave
> e.g. results in other errors which propably come from erros in my
> grammar.
> 
> So, can the C Target be used together with the String template library?
> If not, are there alternatives beside print statements?
> Regards
> Heiko
> 
> 
> Mit freundlichem Gruß
> Heiko Folkerts
> Systementwicklung und -design
> --
> ______________________________________________
> DAVID GmbH · Wendenring 1 · 38114 Braunschweig
> Tel.: +49 531 24379-14
> Fax.: +49 531 24379-79
> E-Mail: mailto:[email protected]
> WWW:   http://www.david-bs.de
> Eintragung: Amtsgericht Braunschweig, HRB 3167
> Geschäftsführer: Frank Ptok
> ______________________________________________
> 
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address




List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--

You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=.


Reply via email to