Jim, I have never built anything before with Java, so when you say "set the classpath to include the path of your template" I guess that I am trying to find out where to do that. The antlr-3.2 jar is inside the antlrworks package. I have built a lot of unix tools in the terminal environment and set environment variables but I have never had to set a path variable in the OS X graphics environment.
It is part of a multi-source project built under xcode. The xcode build rules expect (require) that a file end with '.m' to compile as an Objective-C file. Since I am calling Objective-C methods in the parser, I have to compile it as an Objective-C source, hence it needs to be a '.m' file. There isn't a 'makefile' in the conventional sense. Also I have c-files that have to be compiled as c-files so I can't just change the build rules willy-nilly. If I can avoid learning yet another language 'Java' to solve my problem, that would be my preference. Alan --- Alan Condit 1085 Tierra Ct. Woodburn, OR 97071 Email -- [email protected] Home-Office (503) 982-0906 On May 11, 2010, at 12:00 PM, [email protected] wrote: > Message: 16 > Date: Tue, 11 May 2010 10:25:02 -0700 > From: "Jim Idle" <[email protected]> > Subject: Re: [antlr-interest] Directory organization > To: "[email protected]" <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset="us-ascii" > > 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 -- 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.
