[antlr-interest] installing antlr on eclipse

Edward O'Flynn esof1 at student.cs.ucc.ie
Tue Nov 8 06:00:29 PST 2005


eric nelson wrote:

> I found a general Eclipse tutorial: 
> https://eclipse-tutorial.dev.java.net/eclipse-tutorial/part1.html 
>  
> I'm not sure if that is the kind of help you are looking for, but it 
> seems to show how to set the path to JAR files, etc. 
>  
> As long as the ANTLR JAR file is in the classpath, you should be able 
> to build any antlr project (command line shown):
>  
> java antlr.Tool mygrammar.g
> javac *.java
> java Main (or whatever)
>  
> On my Windows machine I installed antlr in the C:\ drive, so I have 
> C:\antlr\275\lib\antlr.jar.  Then just point the classpath to this 
> location.
>  
> Best,
>  
>  - e
>
>
>  
> On 11/8/05, *Edward O'Flynn* <esof1 at student.cs.ucc.ie 
> <mailto:esof1 at student.cs.ucc.ie>> wrote:
>
>     Hi
>     I want to install antlr on eclipse(3.1) but i am having problems,
>     I have tried automatic updates but the site is down and I am
>     getting a
>     network problem,
>     I have downloaded antlr, how do I go about installing it manually, ie.
>     where should i put the jar file,
>     is there any other configuration that needs to be done, and
>     finally how
>     do i create an antlr project then,
>     would greatly appreciate any help
>     thanks
>     ed.
>
>     >
>     >
>     >
>
>
Hi
I know how to add the jar to my class path but how do I go about setting 
up antlr as an external tool, i got the following instructions on a 
website but they are confusing

Run-External Tools-Configure
Press New
As the Name: "Antlr Compiler"
1.As the Tool Location: "C:\jdk1.4.0\bin\javaw.exe" (you may need to 
adjust the path)
2.As the Tool Arguments: "-classpath C:\antlr-2.7.2\antlr.jar antlr.Tool 
${resource_name}"
/
3.These arguments:

    * set the classpath
    * specify antlr.Tool as the main class
    * specify ${resource_name} as the file for antlr.Tool to process
      "${resource_name}" will be the name of a selected file.
      You can set this using the "Browse Variables" button.

/4.As the Working Directory: "${container_loc}"
/You can set this by selecting "Selected resource's container location" 
under the "Browse Options" button.
/Verify that "Block until tool terminates" and "Show execution log on 
console" are both checked.
Press OK.

Question 1, should the external tool be run as an ant build file or as a 
program
Qusetion2, Once this has been established, under the main tab there are 
3 fields,
Location, Working Directory, and arguements,
What exactly should be put in here? and what are the variables specified 
above ie. ${resource_name}

cheers
ed.


More information about the antlr-interest mailing list