[antlr-interest] I get a note when i compile my grammer
atif azad
atif.azad at hotmail.com
Wed Nov 14 15:35:43 PST 2007
Dear All
When I compile my grammer and then use the command
Javac *.java to compile the java classes I get the following message
javac *.java
Note: Sparc2Parser.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Then I run with Xlink option to get the following details
javac -Xlint *.java
Sparc2Parser.java:49: warning: [unchecked] unchecked call to put(K,V) as a
member of the raw type java.util.HashMap
super.put(attrName, value);
^
Sparc2Parser.java:53: warning: [unchecked] unchecked call to put(K,V) as a
member of the raw type java.util.HashMap
super.put(attrName, new Integer(value));
^
Sparc2Parser.java:47: warning: [serial] serializable class
Sparc2Parser.STAttrMap has no definition of serialVersionUID
public static class STAttrMap extends HashMap {
^
Sparc2Parser.java:77: warning: [unchecked] unchecked call to push(E) as a
member of the raw type java.util.Stack
program_stack.push(new program_scope());
I think this is my portion of the grammer which causes this
grammar Sparc2;
options {
output=template;
}
@header {
import org.antlr.stringtemplate.*;
}
program
scope {
List globals;
List functions;
}
@init {
$program::globals = new ArrayList();
$program::functions = new ArrayList();
}
: instructions+
-> program(globals={$program::globals},functions={$program::functions})
;
Can any body please help in this regard how to remove this.
Kind Regards
Azad , Atif
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
More information about the antlr-interest
mailing list