Removed unnecessary casts, suppressWarnings, added type arguments
@@ -26,7 +26,6 @@ import java.util.List;
*/
public class ParseGenCPP extends ParseGen {
- @SuppressWarnings("unchecked")
public void start() throws MetaParseException {
Token t = null;
@@ -91,7 +90,7 @@ public void start() throws MetaParseException {
"public " + superClass});
switchToMainFile();
if (cu_to_insertion_point_2.size() != 0) {
- printTokenSetup((Token)(cu_to_insertion_point_2.get(0)));
+ printTokenSetup((cu_to_insertion_point_2.get(0)));
for (Iterator<?> it = cu_to_insertion_point_2.iterator(); it.hasNext();) {
t = (Token)it.next();
printToken(t);
@@ -148,7 +147,7 @@ public void start() throws MetaParseException {
for (int i = 0; i < tokenMaskSize; i++) {
if (maskVals.size() > 0) {
genCodeLine(" unsigned int jj_la1_" + i + "[] = {");
- for (Iterator it = maskVals.iterator(); it.hasNext();) {
+ for (Iterator<?> it = maskVals.iterator(); it.hasNext();) {
int[] tokenMask = (int[])(it.next());
genCode("0x" + Integer.toHexString(tokenMask[i]) + ",");
}
@@ -689,7 +688,7 @@ public void start() throws MetaParseException {
}
if (cu_from_insertion_point_2.size() != 0) {
- printTokenSetup((Token)(cu_from_insertion_point_2.get(0))); ccol = 1;
+ printTokenSetup((cu_from_insertion_point_2.get(0))); this.ccol = 1;
for (Iterator<?> it = cu_from_insertion_point_2.iterator(); it.hasNext();) {
t = (Token)it.next();
printToken(t);
