[antlr-interest] Import a class or a jar file in ANTLRWorks

Jim Idle jimi at temporal-wave.com
Wed Apr 28 08:18:46 PDT 2010


Once you get to the point where you have external code in your grammar (and you should limit this to method calls to helper classes), then switch to building the grammar as part of a project (Netbeans, Maven, etc) and build the grammar with the -debug option. Then you debug remotely. It is generally the easier way to do things.

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Razvan Radu
> Sent: Wednesday, April 28, 2010 4:50 AM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] Import a class or a jar file in ANTLRWorks
> 
> Hello,
> In the last days i search everywhere for an answer to this:
> How can i import a class or a jar file in my .g file in ANTLRWorks.
> I se that you can import thinks like:
> 
> @header {
> import java.util.HashMap;
> }
> 
> but i can't import classes that i created in other project, or jar
> files of that project.
> I tried everythink, for example:
> 
> @header {
> import mypackage.ClassName;
> }
> and i put this jar in the same location whit the .g file and the
> generated files, but it dosen't work.
> 
> Please help me!
> 
> Thank you.
> 
> 
> 
> 
> 
> 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