[antlr-interest] (newbie problem)java netBean 5.5 error messages for parser

ali azimi aliaazimi at yahoo.com
Tue Jul 10 20:43:04 PDT 2007


 
  Hello,
   
  I have produced a parser and a lexer using my grammar. When I implement them with test class in java netBean 5.5, many error messages (100 errors) appear which are of two kinds as followings. However, when I investigate the packages org.antlr.runtime and org.antlr.runtime.tree, the classes TreeAdaptor and CommonTree exist in org.antlr.runtime.tree not in org.antlr.runtime. So why is the program producing the error messages?
   
  C:\MyProjects\Final Project\src\fialprojectsim\FinalProjectSimParser.java:52: reference to TreeAdaptor is ambiguous, both class org.antlr.runtime.tree.TreeAdaptor in org.antlr.runtime.tree and class org.antlr.runtime.TreeAdaptor in org.antlr.runtime match
   
  
  C:\MyProjects\Final Project\src\fialprojectsim\FinalProjectSimParser.java:69: reference to CommonTree is ambiguous, both class org.antlr.runtime.tree.CommonTree in org.antlr.runtime.tree and class org.antlr.runtime.CommonTree in org.antlr.runtime match
  
   
  The followings are the imports in the class parser.
   
  import org.antlr.runtime.*;
  import java.util.Stack;
  import java.util.List;
  import java.util.ArrayList;
  import java.util.Map;
  import java.util.HashMap;
  import org.antlr.runtime.tree.*;
   
  Thank you very much.
   
  Best wishes,
   
  Al

       
---------------------------------
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070710/b17c72c5/attachment.html 


More information about the antlr-interest mailing list