[antlr-interest] Running ANTLR generated code from Eclipse?

Loring Craymer lgcraymer at yahoo.com
Fri Oct 23 19:18:21 PDT 2009


You might want to read the eclipse documentation.  Anyway, from the package explorer, right click on your project and select "Properties" at the bottom of the menu.  Now select "Java Build Path" and add the antlr runtime as an external jar (under the libraries tab).

--Loring


>
>From: Rich Parker <drichird at hotmail.com>
>To: antlr-interest at antlr.org
>Sent: Fri, October 23, 2009 6:08:01 PM
>Subject: [antlr-interest] Running ANTLR generated code from Eclipse?
>
> >
>Has anyone tried to run the ANTLR generated code (__Test__, ExprLexer, ExprParser) for a grammar from 
>the Eclipse IDE?
>
>In 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
>


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20091023/4990985b/attachment.html 


More information about the antlr-interest mailing list