Modify CTarget.java (if you need to in any way) and the templates, then install 
Maven. Find the pom.xml file in the main directory and read the BUILD.TXT file 
that is there.

You can also set the classpath to include the path of your template before 
anything else and it should load your template rather than the one in the jar 
(or at least it used to ;), but if you want to change the output file names, 
then it is easier to rebuild your own jar and use that.

I thought objective C could use any suffix though just like gcc (but you have 
to tell it that it is a C file). That might be easier than changing the output 
templates. Also, when using as part of a build, you could just add the rename 
to the Makefile.

Jim



> -----Original Message-----
> From: [email protected] [mailto:antlr-interest-
> [email protected]] On Behalf Of Alan Condit
> Sent: Tuesday, May 11, 2010 9:14 AM
> To: [email protected]
> Subject: [antlr-interest] Directory organization
> 
> I am running a Mac with OS X 10.6.
> 
> I have built a grammar under Antlrworks and have it compiling in my
> project with Objective-C. I am currently using "language=C".  It is a
> real pain in the butt to have to go delete the parser and lexer '.m'
> files and rename the '.c' files to '.m' every time I do code generation
> under Antlrworks.
> 
> I downloaded the tarball for Antlr-3.2 and unpacked it in my "source"
> directory. In looking at the documentation on code generation targets,
> the directories from the source tarball don't seem to come close to the
> directories discussed on the wiki documentation pages.
> 
> I have the last two books by Terrance Parr also but I am not finding
> any good info on getting started on modifying template files and using
> them from within Antlrworks.
> 
> I have found the C templates and where to modify them to generate .m
> files that I need instead of .c files they now generate. Now I just
> need to figure out how to get Antlrworks/Antlr to use them instead of
> the ones in the jar.
> 
> Help please!
> 
> Thanks,
> Alan
> ---
> 
> Alan Condit
> 1085 Tierra Ct.
> Woodburn, OR 97071
> 
> Email -- [email protected]
> Home-Office (503) 982-0906
> 
> 
> 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].
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