On Wed, 2008-10-22 at 17:45 +0200, Heinrich du Toit wrote:

> Hi
> 
> It seems that if you have template in the .g file the C target doesn't work.


Templates are only supported by object oriented languages; at least for
the moment.

> 
> Is it possibly to still hack into the token stream somehow and add a few 
> additional "tokens"..
> and hopefully write the file out again in modified form?

StringTemplate is a convenience and design feature, it isn't needed for
any kind of functionality. It is just often a neater way to separate
your parsing code and output.

> 
> I think it should be, would appreciate it if somebody just tell me where 
> to look.

Perhaps it would be easier if you gave an example of what you want to
do. The text is available to your code, so you can do anything. Have a
look through the C examples for the basics and the C API for the rest.

> 
> Another question...
> Are the tokens in the token stream and in the tree the same tokens?


The tokens are the same, but they are carried around as payloads in tree
nodes. 

Jim

> 
> Thanks
> Heinrich
> 
> List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
> Unsubscribe: 
> http://www.antlr.org:8080/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]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

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

Reply via email to