It should be enough to add your Target's java directory to the classpath.
So you don't need to physically put the code into the antlr source.

On Tue, Jan 20, 2009 at 8:37 AM, Rick Mann <[email protected]> wrote:

>
> On Jan 19, 2009, at 19:05:38, Sam Harwell wrote:
>
> > I ported the entire tool to C#. This is in that ported code, not in
> > the
> > original Java code. I needed it so I could make changes to the
> > templates
> > without recompiling the entire tool.
>
> Oh! Now I understand. Seems like you could do something similar to
> what I did. Mine's hard-coded to check for the name of my target, and
> if it sees that, it changes the StringTemplate loader and location to
> get it off a directory of my choosing. The change I proposed should
> make that nicely generalized to all users.
>
> >
> >
> > Sam
> >
> > -----Original Message-----
> > From: Rick Mann [mailto:[email protected]]
> > Sent: Monday, January 19, 2009 8:26 PM
> > To: Sam Harwell
> > Cc: antlr-interest Interest
> > Subject: Re: [antlr-interest] Proposal to make writing language
> > targets
> > a biteasier
> >
> >
> > On Jan 19, 2009, at 18:16:13, Sam Harwell wrote:
> >
> >> Here's what I'm working on in the C# port:
> >>
> >> If a target class is not present in the executable (Antlr3.exe), it
> >> tries to load Antlr3.Target.<targetname>.dll, then check for the
> >> target
> >> in there. Then it has the target return a StringTemplateGroup that
> >> knows
> >> the location of the .stg file, whether embedded in the satellite
> >> assembly or located on disk.
> >
> >
> > I'm not sure I understand. Did you modify the ANTLR tool code to do
> > this? I don't really know how loading, etc. works on Windows. I didn't
> > see anything in the XYZTarget.java file that lets one easily change
> > where to find the other bits.
> >
> > I changed CodeGenerator.loadTemplates() to do it.
> >
> > --
> > Rick
> >
>
> --
> Rick
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>



-- 
I am but a man.

--~--~---------~--~----~------------~-------~--~----~
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/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to