[antlr-interest] unchecked calls warnings compiling the lexer

Matt Benson gudnabrsam at yahoo.com
Tue Sep 28 12:46:02 PDT 2004


In theory, couldn't "anyone" write a Java 1.5 code
emitter and plug it in, with a little work?

-Matt

--- Terence Parr <parrt at cs.usfca.edu> wrote:

> 
> On Sep 28, 2004, at 11:59 AM, Lucio Biondi wrote:
> 
> > Hi,
> >
> > antlr generates in myLexer.java :
> >
> > literals = new Hashtable();
> > literals.put(new ANTLRHashString("min", this), new
> Integer(13));
> > literals.put(new ANTLRHashString("max", this), new
> Integer(13));
> > literals.put(new ANTLRHashString("sum", this), new
> Integer(13));
> > .....
> >
> > but javac (1.5) complaints with warnings :
> >
> > [unchecked] unchecked call to put(K,V) as a member
> of the raw type 
> > java.util.Hashtable
> >     literals.put(new ANTLRHashString("min", this),
> new Integer(13));
> >
> > I've found no solution googling this forum and the
> net.
> >
> > I need java 1.5 for my project so how can I wrap
> around this problem
> > given that antlr seems to me still not ready to
> produce java code with 
> > generics ?
> 
> Yep, that is a 1.5 backward incompatibility.
> 
> > Sorry, I'm not an antlr guru, so probably I miss
> something.
> 
> No, you're right.  1.5 issue.  Nothing can be done
> though until whole 
> world goes 1.5. :(
> 
> Ter
> 
> >
> > Thanks in advance.
> >
> > Lucio
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> --
> CS Professor & Grad Director, University of San
> Francisco
> Creator, ANTLR Parser Generator,
> http://www.antlr.org
> Cofounder, http://www.jguru.com
> Cofounder, http://www.knowspam.net enjoy email
> again!
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
>     antlr-interest-unsubscribe at yahoogroups.com
> 
>  
> 
> 



		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list