Results 1 to 4 of 4
  1. #1
    1wretch is offline Member
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    0

    Default running ANTLR from Eclipse???

    Has anyone tried to run the ANTLR generated code for a grammar from Eclipse?

    I try to create a Java project from the ANTLR output folder but when I run it I get:

    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
    ANTLRFileStream cannot be resolved to a type
    CommonTokenStream cannot be resolved to a type
    CommonTokenStream cannot be resolved to a type
    The method prog() from the type RichExprParser refers to the missing type RecognitionException
    RecognitionException cannot be resolved to a type

    at __Test__.main(__Test__.java:11)

    Did I install the ANTLR plugin completely, or do I need to specify additional ANTLR libraries somehow?
    In my installed software tab for Eclipse I see:

    org.antlr.ui 4.1.1 org.antlr.ui.feature.group
    This feature is an user interface for the ANTLR
    framework for constructing recognizers,
    compilers, and translators ...(URL removed)...
    It consists of five plugins, two hold the ANTLR binaries
    and documentation, the others contain a compiler and
    an editor for ANTLR grammar files, and the ANTLR XML Support plugin.

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    Add those libraries to the project you created where you want to use them in.

  3. #3
    1wretch is offline Member
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    0

    Default How do I add the libraries?

    I am very new to Eclipse so I don't know my way around it yet. I tried:

    project properties
    Java Build Path
    Libraries tab
    Add Library

    It asks what library type to add, but none of the types (JRE, JUnit, Plugin, User) list the ANTLR plugin?

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    The documentation for the plugin should explain how to use it.

Similar Threads

  1. how to run web server w/out running at eclipse?
    By anthrax in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 07-13-2009, 09:06 AM
  2. Equinox problems running on Eclipse 3.4
    By jguerra in forum Eclipse
    Replies: 0
    Last Post: 09-05-2008, 02:34 PM
  3. [SOLVED] Error while running eclipse
    By kimskams80 in forum Eclipse
    Replies: 3
    Last Post: 07-02-2008, 11:31 AM
  4. Running Tomcat in Linux from Eclipse.
    By Felissa in forum Eclipse
    Replies: 1
    Last Post: 06-05-2007, 05:47 AM
  5. ANTLR 3.0 final release May 17, 2007
    By derrickD in forum Java Software
    Replies: 0
    Last Post: 05-18-2007, 06:32 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •