[antlr-interest] problem in translation with tree walker

Jim Idle jimi at temporal-wave.com
Thu Apr 29 06:48:54 PDT 2010


Once you have created an instance of your tree walker, then you must tell it what template to use: 	

	treeWalker.setTemplateLib(jgg.getTemplates());

ANTLRWorks does not let you do this kind of development, so what you must do is move to a project such as Maven or Netbeans with Maven, then generate your grammar using the -debug option to ANTLR. You can still use ANTLRWorks in remote debugging mode - that is the point of remote debugging because you cannot use ANTLRWorks with a full blown code environment otherwise.

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Nourchn Nor
> Sent: Thursday, April 29, 2010 3:22 AM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] problem in translation with tree walker
> 
> Hello everybody,
> I want to make a translation between two languages A and B and I choose
> to
> use the ANTLRWork, I'm writing a  grammar of A  and the string template
> of
> B,  and I am spirit of writing the tree walker of translation with the
> template which I have defines in the string template, but the problem
> is
> that this templates don't known in this Tree walker. What can I do? Or
> how I
> have to make or add, please?
> Note that I want to use only the ANTLRWork.
> Please help me
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address





More information about the antlr-interest mailing list