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 <[email protected]>
>To: [email protected]
>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
>


      
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to