Saturday, May 17, 2014

INSTALLATION OF ANTLR TO ECLIPSE



  1.  Java should already be installed and classpath setting should be alread made.
  2. You should have a any version of Eclipse.
  3. To install Antlr, first step is to obtain a jar file.  From link given below you can downlaod it. (Figure 1) http://www.java2s.com/Code/Jar/a/Downloadantlr33completejar.htm


    Figure 1
  4.  After downloading the jar file, you should locate it to anywhere you want. For instance, you should create a antlr-3.3 directory under Local Disk C. (Figure 2,  3)



    Figure 2



    Figure 3

  5. Run Eclipse and go Help -> Install New Software. (Figure 4)



    Figure 4
  6. Click Add button on right corner of the screen. You should add repository for needed tools to complete antlr installattion. Name can be Indigo Market or any name you want. Location have to be link given below.  (Figure 5)
    http://download.eclipse.org/releases/indigo



    Figure 5
  7. After adding repository you should install zest, gef and dynamic language toolkit respevtively. In each instalation you should restart eclipse. (Figure 6, 7, 8)




    Figure 6


    Figure 7

    Figure 8

  8.       Then you should install Antlr tool from link given below. (Figure 9)


    Figure 9

  9. Go Window -> Preferences. (Figure 10)

    Figure 10

  10.  Find Builder under ANTLR in the list located on left side on the Preferences Window. To add antlr jar click Add button. (Figure 11)

    Figure 11

  11. Click Directory button. Select antlr jar file which we have already downloaded and located in antlr-3.3 directory under Local Disk (C:). Then Click Ok button. You should see Figure 13. Then click OK button again. (Figure 12, 13)




    Figure 12



    Figure 13

  12.  Then Go Code Generator menu under ANTLR-Builder. Select “Project relative folder” . Write antlr-generated as output folder name. Then select Append java package to output folder under Java part. Click Apply button. (Figure 14)


    Figure 14

  13.  Installation is completed.

REFERENCES


[1] http://vimeo.com/8001326
[2] http://www.antlr3.org/download/
[3] http://stackoverflow.com/questions/8343488/antlr-ide-in-eclipse-doesnt-work
[4] http://antlreclipse.sourceforge.net/


No comments:

Post a Comment