Hi Jared,

this could be a good and elegant solution :)

I think you mean the TokenStreamRewriteEngine? There, I can add a  
String before and after a hidden token. But how can I access the  
String which is produced by a specific template? And how can I map the  
template output to the hidden token? I see no way to access the  
template output within the grammar and no way to access the token  
within my main() method.

I'm not very familiar with ANTLRs internals, so I don't see any  
starting point :(

Kind regards,

Chris


On 23.11.2008 at 05:34 Jared Bunting wrote:

> Not sure if it will meet your needs or not, but you might want to  
> look at the rewrite functionality.  It should allow you to use your  
> source file as a starting point, and replace code in it with your  
> template output.  By ignoring comments in your parser, I would think  
> the rewrite would simply leave those where they are.


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
-~----------~----~----~----~------~----~------~--~---

Reply via email to