Example usage for org.eclipse.jdt.internal.compiler.ast OperatorIds NOT_EQUAL

List of usage examples for org.eclipse.jdt.internal.compiler.ast OperatorIds NOT_EQUAL

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.ast OperatorIds NOT_EQUAL.

Prototype

int NOT_EQUAL

To view the source code for org.eclipse.jdt.internal.compiler.ast OperatorIds NOT_EQUAL.

Click Source Link

Usage

From source file:com.android.tools.lint.psi.EcjPsiBuilder.java

License:Apache License

/** Look up the PSI element type for the given ECJ operator */
@NonNull//from w  w w .  ja v  a2 s .c o  m
private IElementType ecjToPsiToken(int operator) {
    switch (operator) {
    case OperatorIds.PLUS_PLUS:
        return JavaTokenType.PLUSPLUS;
    case OperatorIds.MINUS_MINUS:
        return JavaTokenType.MINUSMINUS;
    case OperatorIds.TWIDDLE:
        return JavaTokenType.TILDE;
    case OperatorIds.NOT:
        return JavaTokenType.EXCL;
    case OperatorIds.PLUS:
        return JavaTokenType.PLUS;
    case OperatorIds.MINUS:
        return JavaTokenType.MINUS;
    case OperatorIds.OR_OR:
        return JavaTokenType.OROR;
    case OperatorIds.AND_AND:
        return JavaTokenType.ANDAND;
    case OperatorIds.OR:
        return JavaTokenType.OR;
    case OperatorIds.XOR:
        return JavaTokenType.XOR;
    case OperatorIds.AND:
        return JavaTokenType.AND;
    case OperatorIds.EQUAL_EQUAL:
        return JavaTokenType.EQEQ;
    case OperatorIds.NOT_EQUAL:
        return JavaTokenType.NE;
    case OperatorIds.GREATER:
        return JavaTokenType.GT;
    case OperatorIds.GREATER_EQUAL:
        return JavaTokenType.GE;
    case OperatorIds.LESS:
        return JavaTokenType.LT;
    case OperatorIds.LESS_EQUAL:
        return JavaTokenType.LE;
    case OperatorIds.LEFT_SHIFT:
        return JavaTokenType.LTLT;
    case OperatorIds.RIGHT_SHIFT:
        return JavaTokenType.GTGT;
    case OperatorIds.UNSIGNED_RIGHT_SHIFT:
        return JavaTokenType.GTGTGT;
    case OperatorIds.MULTIPLY:
        return JavaTokenType.ASTERISK;
    case OperatorIds.DIVIDE:
        return JavaTokenType.DIV;
    case OperatorIds.REMAINDER:
        return JavaTokenType.PERC;
    case OperatorIds.EQUAL:
        return JavaTokenType.EQ;
    default:
        return JavaTokenType.IDENTIFIER;
    }
}

From source file:lombok.eclipse.handlers.HandleCleanup.java

License:Open Source License

public void handle(AnnotationValues<Cleanup> annotation, Annotation ast, EclipseNode annotationNode) {
    handleFlagUsage(annotationNode, ConfigurationKeys.CLEANUP_FLAG_USAGE, "@Cleanup");

    String cleanupName = annotation.getInstance().value();
    if (cleanupName.length() == 0) {
        annotationNode.addError("cleanupName cannot be the empty string.");
        return;//w  w  w  . j  av  a  2  s  .  co m
    }

    if (annotationNode.up().getKind() != Kind.LOCAL) {
        annotationNode.addError("@Cleanup is legal only on local variable declarations.");
        return;
    }

    LocalDeclaration decl = (LocalDeclaration) annotationNode.up().get();

    if (decl.initialization == null) {
        annotationNode.addError("@Cleanup variable declarations need to be initialized.");
        return;
    }

    EclipseNode ancestor = annotationNode.up().directUp();
    ASTNode blockNode = ancestor.get();

    final boolean isSwitch;
    final Statement[] statements;
    if (blockNode instanceof AbstractMethodDeclaration) {
        isSwitch = false;
        statements = ((AbstractMethodDeclaration) blockNode).statements;
    } else if (blockNode instanceof Block) {
        isSwitch = false;
        statements = ((Block) blockNode).statements;
    } else if (blockNode instanceof SwitchStatement) {
        isSwitch = true;
        statements = ((SwitchStatement) blockNode).statements;
    } else {
        annotationNode.addError("@Cleanup is legal only on a local variable declaration inside a block.");
        return;
    }

    if (statements == null) {
        annotationNode.addError("LOMBOK BUG: Parent block does not contain any statements.");
        return;
    }

    int start = 0;
    for (; start < statements.length; start++) {
        if (statements[start] == decl)
            break;
    }

    if (start == statements.length) {
        annotationNode.addError("LOMBOK BUG: Can't find this local variable declaration inside its parent.");
        return;
    }

    start++; //We start with try{} *AFTER* the var declaration.

    int end;
    if (isSwitch) {
        end = start + 1;
        for (; end < statements.length; end++) {
            if (statements[end] instanceof CaseStatement) {
                break;
            }
        }
    } else
        end = statements.length;

    //At this point:
    //  start-1 = Local Declaration marked with @Cleanup
    //  start = first instruction that needs to be wrapped into a try block
    //  end = last instruction of the scope -OR- last instruction before the next case label in switch statements.
    //  hence:
    //  [start, end) = statements for the try block.

    Statement[] tryBlock = new Statement[end - start];
    System.arraycopy(statements, start, tryBlock, 0, end - start);
    //Remove the stuff we just dumped into the tryBlock, and then leave room for the try node.
    int newStatementsLength = statements.length - (end - start); //Remove room for every statement moved into try block...
    newStatementsLength += 1; //But add room for the TryStatement node itself.
    Statement[] newStatements = new Statement[newStatementsLength];
    System.arraycopy(statements, 0, newStatements, 0, start); //copy all statements before the try block verbatim.
    System.arraycopy(statements, end, newStatements, start + 1, statements.length - end); //For switch statements.

    doAssignmentCheck(annotationNode, tryBlock, decl.name);

    TryStatement tryStatement = new TryStatement();
    setGeneratedBy(tryStatement, ast);
    tryStatement.tryBlock = new Block(0);
    tryStatement.tryBlock.statements = tryBlock;
    setGeneratedBy(tryStatement.tryBlock, ast);

    // Positions for in-method generated nodes are special
    int ss = decl.declarationSourceEnd + 1;
    int se = ss;
    if (tryBlock.length > 0) {
        se = tryBlock[tryBlock.length - 1].sourceEnd + 1; //+1 for the closing semicolon. Yes, there could be spaces. Bummer.
        tryStatement.sourceStart = ss;
        tryStatement.sourceEnd = se;
        tryStatement.tryBlock.sourceStart = ss;
        tryStatement.tryBlock.sourceEnd = se;
    }

    newStatements[start] = tryStatement;

    Statement[] finallyBlock = new Statement[1];
    MessageSend unsafeClose = new MessageSend();
    setGeneratedBy(unsafeClose, ast);
    unsafeClose.sourceStart = ast.sourceStart;
    unsafeClose.sourceEnd = ast.sourceEnd;
    SingleNameReference receiver = new SingleNameReference(decl.name, 0);
    setGeneratedBy(receiver, ast);
    unsafeClose.receiver = receiver;
    long nameSourcePosition = (long) ast.sourceStart << 32 | ast.sourceEnd;
    if (ast.memberValuePairs() != null)
        for (MemberValuePair pair : ast.memberValuePairs()) {
            if (pair.name != null && new String(pair.name).equals("value")) {
                nameSourcePosition = (long) pair.value.sourceStart << 32 | pair.value.sourceEnd;
                break;
            }
        }
    unsafeClose.nameSourcePosition = nameSourcePosition;
    unsafeClose.selector = cleanupName.toCharArray();

    int pS = ast.sourceStart, pE = ast.sourceEnd;
    long p = (long) pS << 32 | pE;

    SingleNameReference varName = new SingleNameReference(decl.name, p);
    setGeneratedBy(varName, ast);
    NullLiteral nullLiteral = new NullLiteral(pS, pE);
    setGeneratedBy(nullLiteral, ast);

    MessageSend preventNullAnalysis = preventNullAnalysis(ast, varName);

    EqualExpression equalExpression = new EqualExpression(preventNullAnalysis, nullLiteral,
            OperatorIds.NOT_EQUAL);
    equalExpression.sourceStart = pS;
    equalExpression.sourceEnd = pE;
    setGeneratedBy(equalExpression, ast);

    Block closeBlock = new Block(0);
    closeBlock.statements = new Statement[1];
    closeBlock.statements[0] = unsafeClose;
    setGeneratedBy(closeBlock, ast);
    IfStatement ifStatement = new IfStatement(equalExpression, closeBlock, 0, 0);
    setGeneratedBy(ifStatement, ast);

    finallyBlock[0] = ifStatement;
    tryStatement.finallyBlock = new Block(0);

    // Positions for in-method generated nodes are special
    if (!isSwitch) {
        tryStatement.finallyBlock.sourceStart = blockNode.sourceEnd;
        tryStatement.finallyBlock.sourceEnd = blockNode.sourceEnd;
    }
    setGeneratedBy(tryStatement.finallyBlock, ast);
    tryStatement.finallyBlock.statements = finallyBlock;

    tryStatement.catchArguments = null;
    tryStatement.catchBlocks = null;

    if (blockNode instanceof AbstractMethodDeclaration) {
        ((AbstractMethodDeclaration) blockNode).statements = newStatements;
    } else if (blockNode instanceof Block) {
        ((Block) blockNode).statements = newStatements;
    } else if (blockNode instanceof SwitchStatement) {
        ((SwitchStatement) blockNode).statements = newStatements;
    }

    ancestor.rebuild();
}

From source file:lombok.eclipse.handlers.HandleEqualsAndHashCode.java

License:Open Source License

public MethodDeclaration createEquals(EclipseNode type, Collection<EclipseNode> fields, boolean callSuper,
        ASTNode source, FieldAccess fieldAccess, boolean needsCanEqual, List<Annotation> onParam) {
    int pS = source.sourceStart;
    int pE = source.sourceEnd;
    long p = (long) pS << 32 | pE;
    TypeDeclaration typeDecl = (TypeDeclaration) type.get();

    MethodDeclaration method = new MethodDeclaration(
            ((CompilationUnitDeclaration) type.top().get()).compilationResult);
    setGeneratedBy(method, source);//w ww.  j  ava  2 s  .  c  o m
    method.modifiers = toEclipseModifier(AccessLevel.PUBLIC);
    method.returnType = TypeReference.baseTypeReference(TypeIds.T_boolean, 0);
    method.returnType.sourceStart = pS;
    method.returnType.sourceEnd = pE;
    setGeneratedBy(method.returnType, source);
    method.annotations = new Annotation[] { makeMarkerAnnotation(TypeConstants.JAVA_LANG_OVERRIDE, source) };
    method.selector = "equals".toCharArray();
    method.thrownExceptions = null;
    method.typeParameters = null;
    method.bits |= Eclipse.ECLIPSE_DO_NOT_TOUCH_FLAG;
    method.bodyStart = method.declarationSourceStart = method.sourceStart = source.sourceStart;
    method.bodyEnd = method.declarationSourceEnd = method.sourceEnd = source.sourceEnd;
    TypeReference objectRef = new QualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT,
            new long[] { p, p, p });
    setGeneratedBy(objectRef, source);
    method.arguments = new Argument[] { new Argument(new char[] { 'o' }, 0, objectRef, Modifier.FINAL) };
    method.arguments[0].sourceStart = pS;
    method.arguments[0].sourceEnd = pE;
    if (!onParam.isEmpty())
        method.arguments[0].annotations = onParam.toArray(new Annotation[0]);
    setGeneratedBy(method.arguments[0], source);

    List<Statement> statements = new ArrayList<Statement>();

    /* if (o == this) return true; */ {
        SingleNameReference oRef = new SingleNameReference(new char[] { 'o' }, p);
        setGeneratedBy(oRef, source);
        ThisReference thisRef = new ThisReference(pS, pE);
        setGeneratedBy(thisRef, source);
        EqualExpression otherEqualsThis = new EqualExpression(oRef, thisRef, OperatorIds.EQUAL_EQUAL);
        setGeneratedBy(otherEqualsThis, source);

        TrueLiteral trueLiteral = new TrueLiteral(pS, pE);
        setGeneratedBy(trueLiteral, source);
        ReturnStatement returnTrue = new ReturnStatement(trueLiteral, pS, pE);
        setGeneratedBy(returnTrue, source);
        IfStatement ifOtherEqualsThis = new IfStatement(otherEqualsThis, returnTrue, pS, pE);
        setGeneratedBy(ifOtherEqualsThis, source);
        statements.add(ifOtherEqualsThis);
    }

    /* if (!(o instanceof Outer.Inner.MyType) return false; */ {
        SingleNameReference oRef = new SingleNameReference(new char[] { 'o' }, p);
        setGeneratedBy(oRef, source);

        TypeReference typeReference = createTypeReference(type, p);
        setGeneratedBy(typeReference, source);

        InstanceOfExpression instanceOf = new InstanceOfExpression(oRef, typeReference);
        instanceOf.sourceStart = pS;
        instanceOf.sourceEnd = pE;
        setGeneratedBy(instanceOf, source);

        Expression notInstanceOf = new UnaryExpression(instanceOf, OperatorIds.NOT);
        setGeneratedBy(notInstanceOf, source);

        FalseLiteral falseLiteral = new FalseLiteral(pS, pE);
        setGeneratedBy(falseLiteral, source);

        ReturnStatement returnFalse = new ReturnStatement(falseLiteral, pS, pE);
        setGeneratedBy(returnFalse, source);

        IfStatement ifNotInstanceOf = new IfStatement(notInstanceOf, returnFalse, pS, pE);
        setGeneratedBy(ifNotInstanceOf, source);
        statements.add(ifNotInstanceOf);
    }

    char[] otherName = "other".toCharArray();

    /* MyType<?> other = (MyType<?>) o; */ {
        if (!fields.isEmpty() || needsCanEqual) {
            LocalDeclaration other = new LocalDeclaration(otherName, pS, pE);
            other.modifiers |= ClassFileConstants.AccFinal;
            setGeneratedBy(other, source);
            char[] typeName = typeDecl.name;
            TypeReference targetType;
            if (typeDecl.typeParameters == null || typeDecl.typeParameters.length == 0) {
                targetType = new SingleTypeReference(typeName, p);
                setGeneratedBy(targetType, source);
                other.type = new SingleTypeReference(typeName, p);
                setGeneratedBy(other.type, source);
            } else {
                TypeReference[] typeArgs = new TypeReference[typeDecl.typeParameters.length];
                for (int i = 0; i < typeArgs.length; i++) {
                    typeArgs[i] = new Wildcard(Wildcard.UNBOUND);
                    typeArgs[i].sourceStart = pS;
                    typeArgs[i].sourceEnd = pE;
                    setGeneratedBy(typeArgs[i], source);
                }
                targetType = new ParameterizedSingleTypeReference(typeName, typeArgs, 0, p);
                setGeneratedBy(targetType, source);
                other.type = new ParameterizedSingleTypeReference(typeName, copyTypes(typeArgs, source), 0, p);
                setGeneratedBy(other.type, source);
            }
            NameReference oRef = new SingleNameReference(new char[] { 'o' }, p);
            setGeneratedBy(oRef, source);
            other.initialization = makeCastExpression(oRef, targetType, source);
            statements.add(other);
        }
    }

    /* if (!other.canEqual((java.lang.Object) this)) return false; */ {
        if (needsCanEqual) {
            MessageSend otherCanEqual = new MessageSend();
            otherCanEqual.sourceStart = pS;
            otherCanEqual.sourceEnd = pE;
            setGeneratedBy(otherCanEqual, source);
            otherCanEqual.receiver = new SingleNameReference(otherName, p);
            setGeneratedBy(otherCanEqual.receiver, source);
            otherCanEqual.selector = "canEqual".toCharArray();

            ThisReference thisReference = new ThisReference(pS, pE);
            setGeneratedBy(thisReference, source);
            CastExpression castThisRef = makeCastExpression(thisReference,
                    generateQualifiedTypeRef(source, TypeConstants.JAVA_LANG_OBJECT), source);
            castThisRef.sourceStart = pS;
            castThisRef.sourceEnd = pE;

            otherCanEqual.arguments = new Expression[] { castThisRef };

            Expression notOtherCanEqual = new UnaryExpression(otherCanEqual, OperatorIds.NOT);
            setGeneratedBy(notOtherCanEqual, source);

            FalseLiteral falseLiteral = new FalseLiteral(pS, pE);
            setGeneratedBy(falseLiteral, source);

            ReturnStatement returnFalse = new ReturnStatement(falseLiteral, pS, pE);
            setGeneratedBy(returnFalse, source);

            IfStatement ifNotCanEqual = new IfStatement(notOtherCanEqual, returnFalse, pS, pE);
            setGeneratedBy(ifNotCanEqual, source);

            statements.add(ifNotCanEqual);
        }
    }

    /* if (!super.equals(o)) return false; */
    if (callSuper) {
        MessageSend callToSuper = new MessageSend();
        callToSuper.sourceStart = pS;
        callToSuper.sourceEnd = pE;
        setGeneratedBy(callToSuper, source);
        callToSuper.receiver = new SuperReference(pS, pE);
        setGeneratedBy(callToSuper.receiver, source);
        callToSuper.selector = "equals".toCharArray();
        SingleNameReference oRef = new SingleNameReference(new char[] { 'o' }, p);
        setGeneratedBy(oRef, source);
        callToSuper.arguments = new Expression[] { oRef };
        Expression superNotEqual = new UnaryExpression(callToSuper, OperatorIds.NOT);
        setGeneratedBy(superNotEqual, source);
        FalseLiteral falseLiteral = new FalseLiteral(pS, pE);
        setGeneratedBy(falseLiteral, source);
        ReturnStatement returnFalse = new ReturnStatement(falseLiteral, pS, pE);
        setGeneratedBy(returnFalse, source);
        IfStatement ifSuperEquals = new IfStatement(superNotEqual, returnFalse, pS, pE);
        setGeneratedBy(ifSuperEquals, source);
        statements.add(ifSuperEquals);
    }

    for (EclipseNode field : fields) {
        TypeReference fType = getFieldType(field, fieldAccess);
        char[] token = fType.getLastToken();
        Expression thisFieldAccessor = createFieldAccessor(field, fieldAccess, source);
        Expression otherFieldAccessor = createFieldAccessor(field, fieldAccess, source, otherName);

        if (fType.dimensions() == 0 && token != null) {
            if (Arrays.equals(TypeConstants.FLOAT, token)) {
                statements.add(generateCompareFloatOrDouble(thisFieldAccessor, otherFieldAccessor,
                        "Float".toCharArray(), source));
            } else if (Arrays.equals(TypeConstants.DOUBLE, token)) {
                statements.add(generateCompareFloatOrDouble(thisFieldAccessor, otherFieldAccessor,
                        "Double".toCharArray(), source));
            } else if (BUILT_IN_TYPES.contains(new String(token))) {
                EqualExpression fieldsNotEqual = new EqualExpression(thisFieldAccessor, otherFieldAccessor,
                        OperatorIds.NOT_EQUAL);
                setGeneratedBy(fieldsNotEqual, source);
                FalseLiteral falseLiteral = new FalseLiteral(pS, pE);
                setGeneratedBy(falseLiteral, source);
                ReturnStatement returnStatement = new ReturnStatement(falseLiteral, pS, pE);
                setGeneratedBy(returnStatement, source);
                IfStatement ifStatement = new IfStatement(fieldsNotEqual, returnStatement, pS, pE);
                setGeneratedBy(ifStatement, source);
                statements.add(ifStatement);
            } else /* objects */ {
                /* final java.lang.Object this$fieldName = this.fieldName; */
                /* final java.lang.Object other$fieldName = other.fieldName; */
                /* if (this$fieldName == null ? other$fieldName != null : !this$fieldName.equals(other$fieldName)) return false;; */
                char[] thisDollarFieldName = ("this$" + field.getName()).toCharArray();
                char[] otherDollarFieldName = ("other$" + field.getName()).toCharArray();

                statements.add(createLocalDeclaration(source, thisDollarFieldName,
                        generateQualifiedTypeRef(source, TypeConstants.JAVA_LANG_OBJECT), thisFieldAccessor));
                statements.add(createLocalDeclaration(source, otherDollarFieldName,
                        generateQualifiedTypeRef(source, TypeConstants.JAVA_LANG_OBJECT), otherFieldAccessor));

                SingleNameReference this1 = new SingleNameReference(thisDollarFieldName, p);
                setGeneratedBy(this1, source);
                SingleNameReference this2 = new SingleNameReference(thisDollarFieldName, p);
                setGeneratedBy(this2, source);
                SingleNameReference other1 = new SingleNameReference(otherDollarFieldName, p);
                setGeneratedBy(other1, source);
                SingleNameReference other2 = new SingleNameReference(otherDollarFieldName, p);
                setGeneratedBy(other2, source);

                NullLiteral nullLiteral = new NullLiteral(pS, pE);
                setGeneratedBy(nullLiteral, source);
                EqualExpression fieldIsNull = new EqualExpression(this1, nullLiteral, OperatorIds.EQUAL_EQUAL);
                nullLiteral = new NullLiteral(pS, pE);
                setGeneratedBy(nullLiteral, source);
                EqualExpression otherFieldIsntNull = new EqualExpression(other1, nullLiteral,
                        OperatorIds.NOT_EQUAL);
                MessageSend equalsCall = new MessageSend();
                equalsCall.sourceStart = pS;
                equalsCall.sourceEnd = pE;
                setGeneratedBy(equalsCall, source);
                equalsCall.receiver = this2;
                equalsCall.selector = "equals".toCharArray();
                equalsCall.arguments = new Expression[] { other2 };
                UnaryExpression fieldsNotEqual = new UnaryExpression(equalsCall, OperatorIds.NOT);
                fieldsNotEqual.sourceStart = pS;
                fieldsNotEqual.sourceEnd = pE;
                setGeneratedBy(fieldsNotEqual, source);
                ConditionalExpression fullEquals = new ConditionalExpression(fieldIsNull, otherFieldIsntNull,
                        fieldsNotEqual);
                fullEquals.sourceStart = pS;
                fullEquals.sourceEnd = pE;
                setGeneratedBy(fullEquals, source);
                FalseLiteral falseLiteral = new FalseLiteral(pS, pE);
                setGeneratedBy(falseLiteral, source);
                ReturnStatement returnStatement = new ReturnStatement(falseLiteral, pS, pE);
                setGeneratedBy(returnStatement, source);
                IfStatement ifStatement = new IfStatement(fullEquals, returnStatement, pS, pE);
                setGeneratedBy(ifStatement, source);
                statements.add(ifStatement);
            }
        } else if (fType.dimensions() > 0 && token != null) {
            MessageSend arraysEqualCall = new MessageSend();
            arraysEqualCall.sourceStart = pS;
            arraysEqualCall.sourceEnd = pE;
            setGeneratedBy(arraysEqualCall, source);
            arraysEqualCall.receiver = generateQualifiedNameRef(source, TypeConstants.JAVA, TypeConstants.UTIL,
                    "Arrays".toCharArray());
            if (fType.dimensions() > 1 || !BUILT_IN_TYPES.contains(new String(token))) {
                arraysEqualCall.selector = "deepEquals".toCharArray();
            } else {
                arraysEqualCall.selector = "equals".toCharArray();
            }
            arraysEqualCall.arguments = new Expression[] { thisFieldAccessor, otherFieldAccessor };
            UnaryExpression arraysNotEqual = new UnaryExpression(arraysEqualCall, OperatorIds.NOT);
            arraysNotEqual.sourceStart = pS;
            arraysNotEqual.sourceEnd = pE;
            setGeneratedBy(arraysNotEqual, source);
            FalseLiteral falseLiteral = new FalseLiteral(pS, pE);
            setGeneratedBy(falseLiteral, source);
            ReturnStatement returnStatement = new ReturnStatement(falseLiteral, pS, pE);
            setGeneratedBy(returnStatement, source);
            IfStatement ifStatement = new IfStatement(arraysNotEqual, returnStatement, pS, pE);
            setGeneratedBy(ifStatement, source);
            statements.add(ifStatement);
        }
    }

    /* return true; */ {
        TrueLiteral trueLiteral = new TrueLiteral(pS, pE);
        setGeneratedBy(trueLiteral, source);
        ReturnStatement returnStatement = new ReturnStatement(trueLiteral, pS, pE);
        setGeneratedBy(returnStatement, source);
        statements.add(returnStatement);
    }
    method.statements = statements.toArray(new Statement[statements.size()]);
    return method;
}

From source file:lombok.eclipse.handlers.HandleEqualsAndHashCode.java

License:Open Source License

public IfStatement generateCompareFloatOrDouble(Expression thisRef, Expression otherRef, char[] floatOrDouble,
        ASTNode source) {/*from w ww .j  a va  2  s.  c o  m*/
    int pS = source.sourceStart, pE = source.sourceEnd;
    /* if (Float.compare(fieldName, other.fieldName) != 0) return false */
    MessageSend floatCompare = new MessageSend();
    floatCompare.sourceStart = pS;
    floatCompare.sourceEnd = pE;
    setGeneratedBy(floatCompare, source);
    floatCompare.receiver = generateQualifiedNameRef(source, TypeConstants.JAVA, TypeConstants.LANG,
            floatOrDouble);
    floatCompare.selector = "compare".toCharArray();
    floatCompare.arguments = new Expression[] { thisRef, otherRef };
    IntLiteral int0 = makeIntLiteral("0".toCharArray(), source);
    EqualExpression ifFloatCompareIsNot0 = new EqualExpression(floatCompare, int0, OperatorIds.NOT_EQUAL);
    ifFloatCompareIsNot0.sourceStart = pS;
    ifFloatCompareIsNot0.sourceEnd = pE;
    setGeneratedBy(ifFloatCompareIsNot0, source);
    FalseLiteral falseLiteral = new FalseLiteral(pS, pE);
    setGeneratedBy(falseLiteral, source);
    ReturnStatement returnFalse = new ReturnStatement(falseLiteral, pS, pE);
    setGeneratedBy(returnFalse, source);
    IfStatement ifStatement = new IfStatement(ifFloatCompareIsNot0, returnFalse, pS, pE);
    setGeneratedBy(ifStatement, source);
    return ifStatement;
}

From source file:lombok.eclipse.handlers.singulars.EclipseJavaUtilSingularizer.java

License:Open Source License

protected List<Statement> createJavaUtilSimpleCreationAndFillStatements(SingularData data,
        EclipseNode builderType, boolean mapMode, boolean defineVar, boolean addInitialCapacityArg,
        boolean nullGuard, String targetType) {
    char[] varName = mapMode ? (new String(data.getPluralName()) + "$key").toCharArray() : data.getPluralName();

    Statement createStat;/*from w  ww .  j  a va2s.  com*/
    {
        // pluralName = new java.util.TargetType(initialCap);
        Expression[] constructorArgs = null;
        if (addInitialCapacityArg) {
            // this.varName.size() < MAX_POWER_OF_2 ? 1 + this.varName.size() + (this.varName.size() - 3) / 3 : Integer.MAX_VALUE;
            // lessThanCutOff = this.varName.size() < MAX_POWER_OF_2
            Expression lessThanCutoff = new BinaryExpression(getSize(builderType, varName, nullGuard),
                    makeIntLiteral("0x40000000".toCharArray(), null), OperatorIds.LESS);
            FieldReference integerMaxValue = new FieldReference("MAX_VALUE".toCharArray(), 0L);
            integerMaxValue.receiver = new QualifiedNameReference(TypeConstants.JAVA_LANG_INTEGER, NULL_POSS, 0,
                    0);
            Expression sizeFormulaLeft = new BinaryExpression(makeIntLiteral(new char[] { '1' }, null),
                    getSize(builderType, varName, nullGuard), OperatorIds.PLUS);
            Expression sizeFormulaRightLeft = new BinaryExpression(getSize(builderType, varName, nullGuard),
                    makeIntLiteral(new char[] { '3' }, null), OperatorIds.MINUS);
            Expression sizeFormulaRight = new BinaryExpression(sizeFormulaRightLeft,
                    makeIntLiteral(new char[] { '3' }, null), OperatorIds.DIVIDE);
            Expression sizeFormula = new BinaryExpression(sizeFormulaLeft, sizeFormulaRight, OperatorIds.PLUS);
            Expression cond = new ConditionalExpression(lessThanCutoff, sizeFormula, integerMaxValue);
            constructorArgs = new Expression[] { cond };
        }

        TypeReference targetTypeRef = new QualifiedTypeReference(
                new char[][] { TypeConstants.JAVA, TypeConstants.UTIL, targetType.toCharArray() }, NULL_POSS);
        targetTypeRef = addTypeArgs(mapMode ? 2 : 1, false, builderType, targetTypeRef, data.getTypeArgs());
        AllocationExpression constructorCall = new AllocationExpression();
        constructorCall.type = targetTypeRef;
        constructorCall.arguments = constructorArgs;

        if (defineVar) {
            TypeReference localShadowerType = new QualifiedTypeReference(fromQualifiedName(data.getTargetFqn()),
                    NULL_POSS);
            localShadowerType = addTypeArgs(mapMode ? 2 : 1, false, builderType, localShadowerType,
                    data.getTypeArgs());
            LocalDeclaration localShadowerDecl = new LocalDeclaration(data.getPluralName(), 0, 0);
            localShadowerDecl.type = localShadowerType;
            localShadowerDecl.initialization = constructorCall;
            createStat = localShadowerDecl;
        } else {
            createStat = new Assignment(new SingleNameReference(data.getPluralName(), 0L), constructorCall, 0);
        }
    }

    Statement fillStat;
    {
        if (mapMode) {
            // for (int $i = 0; $i < this.pluralname$key.size(); i++) pluralname.put(this.pluralname$key.get($i), this.pluralname$value.get($i));
            char[] iVar = new char[] { '$', 'i' };
            MessageSend pluralnameDotPut = new MessageSend();
            pluralnameDotPut.selector = new char[] { 'p', 'u', 't' };
            pluralnameDotPut.receiver = new SingleNameReference(data.getPluralName(), 0L);
            FieldReference thisDotKey = new FieldReference(varName, 0L);
            thisDotKey.receiver = new ThisReference(0, 0);
            FieldReference thisDotValue = new FieldReference(
                    (new String(data.getPluralName()) + "$value").toCharArray(), 0L);
            thisDotValue.receiver = new ThisReference(0, 0);
            MessageSend keyArg = new MessageSend();
            keyArg.receiver = thisDotKey;
            keyArg.arguments = new Expression[] { new SingleNameReference(iVar, 0L) };
            keyArg.selector = new char[] { 'g', 'e', 't' };
            MessageSend valueArg = new MessageSend();
            valueArg.receiver = thisDotValue;
            valueArg.arguments = new Expression[] { new SingleNameReference(iVar, 0L) };
            valueArg.selector = new char[] { 'g', 'e', 't' };
            pluralnameDotPut.arguments = new Expression[] { keyArg, valueArg };

            LocalDeclaration forInit = new LocalDeclaration(iVar, 0, 0);
            forInit.type = TypeReference.baseTypeReference(TypeIds.T_int, 0);
            forInit.initialization = makeIntLiteral(new char[] { '0' }, null);
            Expression checkExpr = new BinaryExpression(new SingleNameReference(iVar, 0L),
                    getSize(builderType, varName, nullGuard), OperatorIds.LESS);
            Expression incrementExpr = new PostfixExpression(new SingleNameReference(iVar, 0L), IntLiteral.One,
                    OperatorIds.PLUS, 0);
            fillStat = new ForStatement(new Statement[] { forInit }, checkExpr,
                    new Statement[] { incrementExpr }, pluralnameDotPut, true, 0, 0);
        } else {
            // pluralname.addAll(this.pluralname);
            MessageSend pluralnameDotAddAll = new MessageSend();
            pluralnameDotAddAll.selector = new char[] { 'a', 'd', 'd', 'A', 'l', 'l' };
            pluralnameDotAddAll.receiver = new SingleNameReference(data.getPluralName(), 0L);
            FieldReference thisDotPluralname = new FieldReference(varName, 0L);
            thisDotPluralname.receiver = new ThisReference(0, 0);
            pluralnameDotAddAll.arguments = new Expression[] { thisDotPluralname };
            fillStat = pluralnameDotAddAll;
        }

        if (nullGuard) {
            FieldReference thisDotField = new FieldReference(varName, 0L);
            thisDotField.receiver = new ThisReference(0, 0);
            Expression cond = new EqualExpression(thisDotField, new NullLiteral(0, 0), OperatorIds.NOT_EQUAL);
            fillStat = new IfStatement(cond, fillStat, 0, 0);
        }
    }

    Statement unmodifiableStat;
    {
        // pluralname = Collections.unmodifiableInterfaceType(pluralname);
        Expression arg = new SingleNameReference(data.getPluralName(), 0L);
        MessageSend invoke = new MessageSend();
        invoke.arguments = new Expression[] { arg };
        invoke.selector = ("unmodifiable" + data.getTargetSimpleType()).toCharArray();
        invoke.receiver = new QualifiedNameReference(JAVA_UTIL_COLLECTIONS, NULL_POSS, 0, 0);
        unmodifiableStat = new Assignment(new SingleNameReference(data.getPluralName(), 0L), invoke, 0);
    }

    return Arrays.asList(createStat, fillStat, unmodifiableStat);
}

From source file:org.eclipse.jdt.core.dom.ASTConverter.java

License:Open Source License

public Expression convert(org.eclipse.jdt.internal.compiler.ast.EqualExpression expression) {
    InfixExpression infixExpression = new InfixExpression(this.ast);
    if (this.resolveBindings) {
        recordNodes(infixExpression, expression);
    }/*from w w  w. j a  v  a 2s . c  om*/
    Expression leftExpression = convert(expression.left);
    infixExpression.setLeftOperand(leftExpression);
    infixExpression.setRightOperand(convert(expression.right));
    int startPosition = leftExpression.getStartPosition();
    infixExpression.setSourceRange(startPosition, expression.sourceEnd - startPosition + 1);
    switch ((expression.bits
            & org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorMASK) >> org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorSHIFT) {
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.EQUAL_EQUAL:
        infixExpression.setOperator(InfixExpression.Operator.EQUALS);
        break;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.NOT_EQUAL:
        infixExpression.setOperator(InfixExpression.Operator.NOT_EQUALS);
    }
    return infixExpression;

}

From source file:org.eclipse.jdt.core.dom.ASTConverter.java

License:Open Source License

protected InfixExpression.Operator getOperatorFor(int operatorID) {
    switch (operatorID) {
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.EQUAL_EQUAL:
        return InfixExpression.Operator.EQUALS;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.LESS_EQUAL:
        return InfixExpression.Operator.LESS_EQUALS;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.GREATER_EQUAL:
        return InfixExpression.Operator.GREATER_EQUALS;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.NOT_EQUAL:
        return InfixExpression.Operator.NOT_EQUALS;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.LEFT_SHIFT:
        return InfixExpression.Operator.LEFT_SHIFT;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.RIGHT_SHIFT:
        return InfixExpression.Operator.RIGHT_SHIFT_SIGNED;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.UNSIGNED_RIGHT_SHIFT:
        return InfixExpression.Operator.RIGHT_SHIFT_UNSIGNED;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.OR_OR:
        return InfixExpression.Operator.CONDITIONAL_OR;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.AND_AND:
        return InfixExpression.Operator.CONDITIONAL_AND;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.PLUS:
        return InfixExpression.Operator.PLUS;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.MINUS:
        return InfixExpression.Operator.MINUS;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.REMAINDER:
        return InfixExpression.Operator.REMAINDER;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.XOR:
        return InfixExpression.Operator.XOR;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.AND:
        return InfixExpression.Operator.AND;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.MULTIPLY:
        return InfixExpression.Operator.TIMES;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.OR:
        return InfixExpression.Operator.OR;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.DIVIDE:
        return InfixExpression.Operator.DIVIDE;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.GREATER:
        return InfixExpression.Operator.GREATER;
    case org.eclipse.jdt.internal.compiler.ast.OperatorIds.LESS:
        return InfixExpression.Operator.LESS;
    }/*  www  .j a  va2  s .c o m*/
    return null;
}

From source file:org.eclipse.jdt.internal.compiler.parser.Parser.java

License:Open Source License

protected void consumeRule(int act) {
    switch (act) {
    case 30:// w  w w  .j  av a 2s  .  c o  m
        if (DEBUG) {
            System.out.println("Type ::= PrimitiveType"); //$NON-NLS-1$
        }
        consumePrimitiveType();
        break;

    case 44:
        if (DEBUG) {
            System.out.println("ReferenceType ::= ClassOrInterfaceType"); //$NON-NLS-1$
        }
        consumeReferenceType();
        break;

    case 48:
        if (DEBUG) {
            System.out.println("ClassOrInterface ::= Name"); //$NON-NLS-1$
        }
        consumeClassOrInterfaceName();
        break;

    case 49:
        if (DEBUG) {
            System.out.println("ClassOrInterface ::= GenericType DOT Name"); //$NON-NLS-1$
        }
        consumeClassOrInterface();
        break;

    case 50:
        if (DEBUG) {
            System.out.println("GenericType ::= ClassOrInterface TypeArguments"); //$NON-NLS-1$
        }
        consumeGenericType();
        break;

    case 51:
        if (DEBUG) {
            System.out.println("GenericType ::= ClassOrInterface LESS GREATER"); //$NON-NLS-1$
        }
        consumeGenericTypeWithDiamond();
        break;

    case 52:
        if (DEBUG) {
            System.out.println("ArrayTypeWithTypeArgumentsName ::= GenericType DOT Name"); //$NON-NLS-1$
        }
        consumeArrayTypeWithTypeArgumentsName();
        break;

    case 53:
        if (DEBUG) {
            System.out.println("ArrayType ::= PrimitiveType Dims"); //$NON-NLS-1$
        }
        consumePrimitiveArrayType();
        break;

    case 54:
        if (DEBUG) {
            System.out.println("ArrayType ::= Name Dims"); //$NON-NLS-1$
        }
        consumeNameArrayType();
        break;

    case 55:
        if (DEBUG) {
            System.out.println("ArrayType ::= ArrayTypeWithTypeArgumentsName Dims"); //$NON-NLS-1$
        }
        consumeGenericTypeNameArrayType();
        break;

    case 56:
        if (DEBUG) {
            System.out.println("ArrayType ::= GenericType Dims"); //$NON-NLS-1$
        }
        consumeGenericTypeArrayType();
        break;

    case 61:
        if (DEBUG) {
            System.out.println("QualifiedName ::= Name DOT SimpleName"); //$NON-NLS-1$
        }
        consumeQualifiedName();
        break;

    case 62:
        if (DEBUG) {
            System.out.println("CompilationUnit ::= EnterCompilationUnit..."); //$NON-NLS-1$
        }
        consumeCompilationUnit();
        break;

    case 63:
        if (DEBUG) {
            System.out.println("InternalCompilationUnit ::= PackageDeclaration"); //$NON-NLS-1$
        }
        consumeInternalCompilationUnit();
        break;

    case 64:
        if (DEBUG) {
            System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); //$NON-NLS-1$
        }
        consumeInternalCompilationUnit();
        break;

    case 65:
        if (DEBUG) {
            System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); //$NON-NLS-1$
        }
        consumeInternalCompilationUnitWithTypes();
        break;

    case 66:
        if (DEBUG) {
            System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); //$NON-NLS-1$
        }
        consumeInternalCompilationUnitWithTypes();
        break;

    case 67:
        if (DEBUG) {
            System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); //$NON-NLS-1$
        }
        consumeInternalCompilationUnit();
        break;

    case 68:
        if (DEBUG) {
            System.out.println("InternalCompilationUnit ::= TypeDeclarations"); //$NON-NLS-1$
        }
        consumeInternalCompilationUnitWithTypes();
        break;

    case 69:
        if (DEBUG) {
            System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); //$NON-NLS-1$
        }
        consumeInternalCompilationUnitWithTypes();
        break;

    case 70:
        if (DEBUG) {
            System.out.println("InternalCompilationUnit ::="); //$NON-NLS-1$
        }
        consumeEmptyInternalCompilationUnit();
        break;

    case 71:
        if (DEBUG) {
            System.out.println("ReduceImports ::="); //$NON-NLS-1$
        }
        consumeReduceImports();
        break;

    case 72:
        if (DEBUG) {
            System.out.println("EnterCompilationUnit ::="); //$NON-NLS-1$
        }
        consumeEnterCompilationUnit();
        break;

    case 88:
        if (DEBUG) {
            System.out.println("CatchHeader ::= catch LPAREN CatchFormalParameter RPAREN"); //$NON-NLS-1$
        }
        consumeCatchHeader();
        break;

    case 90:
        if (DEBUG) {
            System.out.println("ImportDeclarations ::= ImportDeclarations..."); //$NON-NLS-1$
        }
        consumeImportDeclarations();
        break;

    case 92:
        if (DEBUG) {
            System.out.println("TypeDeclarations ::= TypeDeclarations TypeDeclaration"); //$NON-NLS-1$
        }
        consumeTypeDeclarations();
        break;

    case 93:
        if (DEBUG) {
            System.out.println("PackageDeclaration ::= PackageDeclarationName SEMICOLON"); //$NON-NLS-1$
        }
        consumePackageDeclaration();
        break;

    case 94:
        if (DEBUG) {
            System.out.println("PackageDeclarationName ::= Modifiers package..."); //$NON-NLS-1$
        }
        consumePackageDeclarationNameWithModifiers();
        break;

    case 95:
        if (DEBUG) {
            System.out.println("PackageDeclarationName ::= PackageComment package Name"); //$NON-NLS-1$
        }
        consumePackageDeclarationName();
        break;

    case 96:
        if (DEBUG) {
            System.out.println("PackageComment ::="); //$NON-NLS-1$
        }
        consumePackageComment();
        break;

    case 101:
        if (DEBUG) {
            System.out.println("SingleTypeImportDeclaration ::=..."); //$NON-NLS-1$
        }
        consumeImportDeclaration();
        break;

    case 102:
        if (DEBUG) {
            System.out.println("SingleTypeImportDeclarationName ::= import Name"); //$NON-NLS-1$
        }
        consumeSingleTypeImportDeclarationName();
        break;

    case 103:
        if (DEBUG) {
            System.out.println("TypeImportOnDemandDeclaration ::=..."); //$NON-NLS-1$
        }
        consumeImportDeclaration();
        break;

    case 104:
        if (DEBUG) {
            System.out.println("TypeImportOnDemandDeclarationName ::= import Name DOT..."); //$NON-NLS-1$
        }
        consumeTypeImportOnDemandDeclarationName();
        break;

    case 107:
        if (DEBUG) {
            System.out.println("TypeDeclaration ::= SEMICOLON"); //$NON-NLS-1$
        }
        consumeEmptyTypeDeclaration();
        break;

    case 111:
        if (DEBUG) {
            System.out.println("Modifiers ::= Modifiers Modifier"); //$NON-NLS-1$
        }
        consumeModifiers2();
        break;

    case 123:
        if (DEBUG) {
            System.out.println("Modifier ::= Annotation"); //$NON-NLS-1$
        }
        consumeAnnotationAsModifier();
        break;

    case 124:
        if (DEBUG) {
            System.out.println("ClassDeclaration ::= ClassHeader ClassBody"); //$NON-NLS-1$
        }
        consumeClassDeclaration();
        break;

    case 125:
        if (DEBUG) {
            System.out.println("ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt..."); //$NON-NLS-1$
        }
        consumeClassHeader();
        break;

    case 126:
        if (DEBUG) {
            System.out.println("ClassHeaderName ::= ClassHeaderName1 TypeParameters"); //$NON-NLS-1$
        }
        consumeTypeHeaderNameWithTypeParameters();
        break;

    case 128:
        if (DEBUG) {
            System.out.println("ClassHeaderName1 ::= Modifiersopt class Identifier"); //$NON-NLS-1$
        }
        consumeClassHeaderName1();
        break;

    case 129:
        if (DEBUG) {
            System.out.println("ClassHeaderExtends ::= extends ClassType"); //$NON-NLS-1$
        }
        consumeClassHeaderExtends();
        break;

    case 130:
        if (DEBUG) {
            System.out.println("ClassHeaderImplements ::= implements InterfaceTypeList"); //$NON-NLS-1$
        }
        consumeClassHeaderImplements();
        break;

    case 132:
        if (DEBUG) {
            System.out.println("InterfaceTypeList ::= InterfaceTypeList COMMA..."); //$NON-NLS-1$
        }
        consumeInterfaceTypeList();
        break;

    case 133:
        if (DEBUG) {
            System.out.println("InterfaceType ::= ClassOrInterfaceType"); //$NON-NLS-1$
        }
        consumeInterfaceType();
        break;

    case 136:
        if (DEBUG) {
            System.out.println("ClassBodyDeclarations ::= ClassBodyDeclarations..."); //$NON-NLS-1$
        }
        consumeClassBodyDeclarations();
        break;

    case 140:
        if (DEBUG) {
            System.out.println("ClassBodyDeclaration ::= Diet NestedMethod..."); //$NON-NLS-1$
        }
        consumeClassBodyDeclaration();
        break;

    case 141:
        if (DEBUG) {
            System.out.println("Diet ::="); //$NON-NLS-1$
        }
        consumeDiet();
        break;

    case 142:
        if (DEBUG) {
            System.out.println("Initializer ::= Diet NestedMethod CreateInitializer..."); //$NON-NLS-1$
        }
        consumeClassBodyDeclaration();
        break;

    case 143:
        if (DEBUG) {
            System.out.println("CreateInitializer ::="); //$NON-NLS-1$
        }
        consumeCreateInitializer();
        break;

    case 150:
        if (DEBUG) {
            System.out.println("ClassMemberDeclaration ::= SEMICOLON"); //$NON-NLS-1$
        }
        consumeEmptyTypeDeclaration();
        break;

    case 153:
        if (DEBUG) {
            System.out.println("FieldDeclaration ::= Modifiersopt Type..."); //$NON-NLS-1$
        }
        consumeFieldDeclaration();
        break;

    case 155:
        if (DEBUG) {
            System.out.println("VariableDeclarators ::= VariableDeclarators COMMA..."); //$NON-NLS-1$
        }
        consumeVariableDeclarators();
        break;

    case 158:
        if (DEBUG) {
            System.out.println("EnterVariable ::="); //$NON-NLS-1$
        }
        consumeEnterVariable();
        break;

    case 159:
        if (DEBUG) {
            System.out.println("ExitVariableWithInitialization ::="); //$NON-NLS-1$
        }
        consumeExitVariableWithInitialization();
        break;

    case 160:
        if (DEBUG) {
            System.out.println("ExitVariableWithoutInitialization ::="); //$NON-NLS-1$
        }
        consumeExitVariableWithoutInitialization();
        break;

    case 161:
        if (DEBUG) {
            System.out.println("ForceNoDiet ::="); //$NON-NLS-1$
        }
        consumeForceNoDiet();
        break;

    case 162:
        if (DEBUG) {
            System.out.println("RestoreDiet ::="); //$NON-NLS-1$
        }
        consumeRestoreDiet();
        break;

    case 167:
        if (DEBUG) {
            System.out.println("MethodDeclaration ::= MethodHeader MethodBody"); //$NON-NLS-1$
        }
        // set to true to consume a method with a body
        consumeMethodDeclaration(true);
        break;

    case 168:
        if (DEBUG) {
            System.out.println("AbstractMethodDeclaration ::= MethodHeader SEMICOLON"); //$NON-NLS-1$
        }
        // set to false to consume a method without body
        consumeMethodDeclaration(false);
        break;

    case 169:
        if (DEBUG) {
            System.out.println("MethodHeader ::= MethodHeaderName FormalParameterListopt"); //$NON-NLS-1$
        }
        consumeMethodHeader();
        break;

    case 170:
        if (DEBUG) {
            System.out.println("MethodHeaderName ::= Modifiersopt TypeParameters Type..."); //$NON-NLS-1$
        }
        consumeMethodHeaderNameWithTypeParameters(false);
        break;

    case 171:
        if (DEBUG) {
            System.out.println("MethodHeaderName ::= Modifiersopt Type Identifier LPAREN"); //$NON-NLS-1$
        }
        consumeMethodHeaderName(false);
        break;

    case 172:
        if (DEBUG) {
            System.out.println("MethodHeaderRightParen ::= RPAREN"); //$NON-NLS-1$
        }
        consumeMethodHeaderRightParen();
        break;

    case 173:
        if (DEBUG) {
            System.out.println("MethodHeaderExtendedDims ::= Dimsopt"); //$NON-NLS-1$
        }
        consumeMethodHeaderExtendedDims();
        break;

    case 174:
        if (DEBUG) {
            System.out.println("MethodHeaderThrowsClause ::= throws ClassTypeList"); //$NON-NLS-1$
        }
        consumeMethodHeaderThrowsClause();
        break;

    case 175:
        if (DEBUG) {
            System.out.println("ConstructorHeader ::= ConstructorHeaderName..."); //$NON-NLS-1$
        }
        consumeConstructorHeader();
        break;

    case 176:
        if (DEBUG) {
            System.out.println("ConstructorHeaderName ::= Modifiersopt TypeParameters..."); //$NON-NLS-1$
        }
        consumeConstructorHeaderNameWithTypeParameters();
        break;

    case 177:
        if (DEBUG) {
            System.out.println("ConstructorHeaderName ::= Modifiersopt Identifier LPAREN"); //$NON-NLS-1$
        }
        consumeConstructorHeaderName();
        break;

    case 179:
        if (DEBUG) {
            System.out.println("FormalParameterList ::= FormalParameterList COMMA..."); //$NON-NLS-1$
        }
        consumeFormalParameterList();
        break;

    case 180:
        if (DEBUG) {
            System.out.println("FormalParameter ::= Modifiersopt Type..."); //$NON-NLS-1$
        }
        consumeFormalParameter(false);
        break;

    case 181:
        if (DEBUG) {
            System.out.println("FormalParameter ::= Modifiersopt Type ELLIPSIS..."); //$NON-NLS-1$
        }
        consumeFormalParameter(true);
        break;

    case 182:
        if (DEBUG) {
            System.out.println("CatchFormalParameter ::= Modifiersopt CatchType..."); //$NON-NLS-1$
        }
        consumeCatchFormalParameter();
        break;

    case 183:
        if (DEBUG) {
            System.out.println("CatchType ::= UnionType"); //$NON-NLS-1$
        }
        consumeCatchType();
        break;

    case 184:
        if (DEBUG) {
            System.out.println("UnionType ::= Type"); //$NON-NLS-1$
        }
        consumeUnionTypeAsClassType();
        break;

    case 185:
        if (DEBUG) {
            System.out.println("UnionType ::= UnionType OR Type"); //$NON-NLS-1$
        }
        consumeUnionType();
        break;

    case 187:
        if (DEBUG) {
            System.out.println("ClassTypeList ::= ClassTypeList COMMA ClassTypeElt"); //$NON-NLS-1$
        }
        consumeClassTypeList();
        break;

    case 188:
        if (DEBUG) {
            System.out.println("ClassTypeElt ::= ClassType"); //$NON-NLS-1$
        }
        consumeClassTypeElt();
        break;

    case 189:
        if (DEBUG) {
            System.out.println("MethodBody ::= NestedMethod LBRACE BlockStatementsopt..."); //$NON-NLS-1$
        }
        consumeMethodBody();
        break;

    case 190:
        if (DEBUG) {
            System.out.println("NestedMethod ::="); //$NON-NLS-1$
        }
        consumeNestedMethod();
        break;

    case 191:
        if (DEBUG) {
            System.out.println("StaticInitializer ::= StaticOnly Block"); //$NON-NLS-1$
        }
        consumeStaticInitializer();
        break;

    case 192:
        if (DEBUG) {
            System.out.println("StaticOnly ::= static"); //$NON-NLS-1$
        }
        consumeStaticOnly();
        break;

    case 193:
        if (DEBUG) {
            System.out.println("ConstructorDeclaration ::= ConstructorHeader MethodBody"); //$NON-NLS-1$
        }
        consumeConstructorDeclaration();
        break;

    case 194:
        if (DEBUG) {
            System.out.println("ConstructorDeclaration ::= ConstructorHeader SEMICOLON"); //$NON-NLS-1$
        }
        consumeInvalidConstructorDeclaration();
        break;

    case 195:
        if (DEBUG) {
            System.out.println("ExplicitConstructorInvocation ::= this LPAREN..."); //$NON-NLS-1$
        }
        consumeExplicitConstructorInvocation(0, THIS_CALL);
        break;

    case 196:
        if (DEBUG) {
            System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments this"); //$NON-NLS-1$
        }
        consumeExplicitConstructorInvocationWithTypeArguments(0, THIS_CALL);
        break;

    case 197:
        if (DEBUG) {
            System.out.println("ExplicitConstructorInvocation ::= super LPAREN..."); //$NON-NLS-1$
        }
        consumeExplicitConstructorInvocation(0, SUPER_CALL);
        break;

    case 198:
        if (DEBUG) {
            System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments..."); //$NON-NLS-1$
        }
        consumeExplicitConstructorInvocationWithTypeArguments(0, SUPER_CALL);
        break;

    case 199:
        if (DEBUG) {
            System.out.println("ExplicitConstructorInvocation ::= Primary DOT super..."); //$NON-NLS-1$
        }
        consumeExplicitConstructorInvocation(1, SUPER_CALL);
        break;

    case 200:
        if (DEBUG) {
            System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); //$NON-NLS-1$
        }
        consumeExplicitConstructorInvocationWithTypeArguments(1, SUPER_CALL);
        break;

    case 201:
        if (DEBUG) {
            System.out.println("ExplicitConstructorInvocation ::= Name DOT super LPAREN"); //$NON-NLS-1$
        }
        consumeExplicitConstructorInvocation(2, SUPER_CALL);
        break;

    case 202:
        if (DEBUG) {
            System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); //$NON-NLS-1$
        }
        consumeExplicitConstructorInvocationWithTypeArguments(2, SUPER_CALL);
        break;

    case 203:
        if (DEBUG) {
            System.out.println("ExplicitConstructorInvocation ::= Primary DOT this..."); //$NON-NLS-1$
        }
        consumeExplicitConstructorInvocation(1, THIS_CALL);
        break;

    case 204:
        if (DEBUG) {
            System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); //$NON-NLS-1$
        }
        consumeExplicitConstructorInvocationWithTypeArguments(1, THIS_CALL);
        break;

    case 205:
        if (DEBUG) {
            System.out.println("ExplicitConstructorInvocation ::= Name DOT this LPAREN"); //$NON-NLS-1$
        }
        consumeExplicitConstructorInvocation(2, THIS_CALL);
        break;

    case 206:
        if (DEBUG) {
            System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); //$NON-NLS-1$
        }
        consumeExplicitConstructorInvocationWithTypeArguments(2, THIS_CALL);
        break;

    case 207:
        if (DEBUG) {
            System.out.println("InterfaceDeclaration ::= InterfaceHeader InterfaceBody"); //$NON-NLS-1$
        }
        consumeInterfaceDeclaration();
        break;

    case 208:
        if (DEBUG) {
            System.out.println("InterfaceHeader ::= InterfaceHeaderName..."); //$NON-NLS-1$
        }
        consumeInterfaceHeader();
        break;

    case 209:
        if (DEBUG) {
            System.out.println("InterfaceHeaderName ::= InterfaceHeaderName1..."); //$NON-NLS-1$
        }
        consumeTypeHeaderNameWithTypeParameters();
        break;

    case 211:
        if (DEBUG) {
            System.out.println("InterfaceHeaderName1 ::= Modifiersopt interface..."); //$NON-NLS-1$
        }
        consumeInterfaceHeaderName1();
        break;

    case 212:
        if (DEBUG) {
            System.out.println("InterfaceHeaderExtends ::= extends InterfaceTypeList"); //$NON-NLS-1$
        }
        consumeInterfaceHeaderExtends();
        break;

    case 215:
        if (DEBUG) {
            System.out.println("InterfaceMemberDeclarations ::=..."); //$NON-NLS-1$
        }
        consumeInterfaceMemberDeclarations();
        break;

    case 216:
        if (DEBUG) {
            System.out.println("InterfaceMemberDeclaration ::= SEMICOLON"); //$NON-NLS-1$
        }
        consumeEmptyTypeDeclaration();
        break;

    case 218:
        if (DEBUG) {
            System.out.println("InterfaceMemberDeclaration ::= MethodHeader MethodBody"); //$NON-NLS-1$
        }
        consumeInvalidMethodDeclaration();
        break;

    case 219:
        if (DEBUG) {
            System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); //$NON-NLS-1$
        }
        consumeInvalidConstructorDeclaration(true);
        break;

    case 220:
        if (DEBUG) {
            System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); //$NON-NLS-1$
        }
        consumeInvalidConstructorDeclaration(false);
        break;

    case 231:
        if (DEBUG) {
            System.out.println("PushLeftBrace ::="); //$NON-NLS-1$
        }
        consumePushLeftBrace();
        break;

    case 232:
        if (DEBUG) {
            System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace ,opt RBRACE"); //$NON-NLS-1$
        }
        consumeEmptyArrayInitializer();
        break;

    case 233:
        if (DEBUG) {
            System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); //$NON-NLS-1$
        }
        consumeArrayInitializer();
        break;

    case 234:
        if (DEBUG) {
            System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); //$NON-NLS-1$
        }
        consumeArrayInitializer();
        break;

    case 236:
        if (DEBUG) {
            System.out.println("VariableInitializers ::= VariableInitializers COMMA..."); //$NON-NLS-1$
        }
        consumeVariableInitializers();
        break;

    case 237:
        if (DEBUG) {
            System.out.println("Block ::= OpenBlock LBRACE BlockStatementsopt RBRACE"); //$NON-NLS-1$
        }
        consumeBlock();
        break;

    case 238:
        if (DEBUG) {
            System.out.println("OpenBlock ::="); //$NON-NLS-1$
        }
        consumeOpenBlock();
        break;

    case 240:
        if (DEBUG) {
            System.out.println("BlockStatements ::= BlockStatements BlockStatement"); //$NON-NLS-1$
        }
        consumeBlockStatements();
        break;

    case 244:
        if (DEBUG) {
            System.out.println("BlockStatement ::= InterfaceDeclaration"); //$NON-NLS-1$
        }
        consumeInvalidInterfaceDeclaration();
        break;

    case 245:
        if (DEBUG) {
            System.out.println("BlockStatement ::= AnnotationTypeDeclaration"); //$NON-NLS-1$
        }
        consumeInvalidAnnotationTypeDeclaration();
        break;

    case 246:
        if (DEBUG) {
            System.out.println("BlockStatement ::= EnumDeclaration"); //$NON-NLS-1$
        }
        consumeInvalidEnumDeclaration();
        break;

    case 247:
        if (DEBUG) {
            System.out.println("LocalVariableDeclarationStatement ::=..."); //$NON-NLS-1$
        }
        consumeLocalVariableDeclarationStatement();
        break;

    case 248:
        if (DEBUG) {
            System.out.println("LocalVariableDeclaration ::= Type PushModifiers..."); //$NON-NLS-1$
        }
        consumeLocalVariableDeclaration();
        break;

    case 249:
        if (DEBUG) {
            System.out.println("LocalVariableDeclaration ::= Modifiers Type..."); //$NON-NLS-1$
        }
        consumeLocalVariableDeclaration();
        break;

    case 250:
        if (DEBUG) {
            System.out.println("PushModifiers ::="); //$NON-NLS-1$
        }
        consumePushModifiers();
        break;

    case 251:
        if (DEBUG) {
            System.out.println("PushModifiersForHeader ::="); //$NON-NLS-1$
        }
        consumePushModifiersForHeader();
        break;

    case 252:
        if (DEBUG) {
            System.out.println("PushRealModifiers ::="); //$NON-NLS-1$
        }
        consumePushRealModifiers();
        break;

    case 279:
        if (DEBUG) {
            System.out.println("EmptyStatement ::= SEMICOLON"); //$NON-NLS-1$
        }
        consumeEmptyStatement();
        break;

    case 280:
        if (DEBUG) {
            System.out.println("LabeledStatement ::= Label COLON Statement"); //$NON-NLS-1$
        }
        consumeStatementLabel();
        break;

    case 281:
        if (DEBUG) {
            System.out.println("LabeledStatementNoShortIf ::= Label COLON..."); //$NON-NLS-1$
        }
        consumeStatementLabel();
        break;

    case 282:
        if (DEBUG) {
            System.out.println("Label ::= Identifier"); //$NON-NLS-1$
        }
        consumeLabel();
        break;

    case 283:
        if (DEBUG) {
            System.out.println("ExpressionStatement ::= StatementExpression SEMICOLON"); //$NON-NLS-1$
        }
        consumeExpressionStatement();
        break;

    case 292:
        if (DEBUG) {
            System.out.println("IfThenStatement ::= if LPAREN Expression RPAREN..."); //$NON-NLS-1$
        }
        consumeStatementIfNoElse();
        break;

    case 293:
        if (DEBUG) {
            System.out.println("IfThenElseStatement ::= if LPAREN Expression RPAREN..."); //$NON-NLS-1$
        }
        consumeStatementIfWithElse();
        break;

    case 294:
        if (DEBUG) {
            System.out.println("IfThenElseStatementNoShortIf ::= if LPAREN Expression..."); //$NON-NLS-1$
        }
        consumeStatementIfWithElse();
        break;

    case 295:
        if (DEBUG) {
            System.out.println("SwitchStatement ::= switch LPAREN Expression RPAREN..."); //$NON-NLS-1$
        }
        consumeStatementSwitch();
        break;

    case 296:
        if (DEBUG) {
            System.out.println("SwitchBlock ::= LBRACE RBRACE"); //$NON-NLS-1$
        }
        consumeEmptySwitchBlock();
        break;

    case 299:
        if (DEBUG) {
            System.out.println("SwitchBlock ::= LBRACE SwitchBlockStatements..."); //$NON-NLS-1$
        }
        consumeSwitchBlock();
        break;

    case 301:
        if (DEBUG) {
            System.out.println("SwitchBlockStatements ::= SwitchBlockStatements..."); //$NON-NLS-1$
        }
        consumeSwitchBlockStatements();
        break;

    case 302:
        if (DEBUG) {
            System.out.println("SwitchBlockStatement ::= SwitchLabels BlockStatements"); //$NON-NLS-1$
        }
        consumeSwitchBlockStatement();
        break;

    case 304:
        if (DEBUG) {
            System.out.println("SwitchLabels ::= SwitchLabels SwitchLabel"); //$NON-NLS-1$
        }
        consumeSwitchLabels();
        break;

    case 305:
        if (DEBUG) {
            System.out.println("SwitchLabel ::= case ConstantExpression COLON"); //$NON-NLS-1$
        }
        consumeCaseLabel();
        break;

    case 306:
        if (DEBUG) {
            System.out.println("SwitchLabel ::= default COLON"); //$NON-NLS-1$
        }
        consumeDefaultLabel();
        break;

    case 307:
        if (DEBUG) {
            System.out.println("WhileStatement ::= while LPAREN Expression RPAREN..."); //$NON-NLS-1$
        }
        consumeStatementWhile();
        break;

    case 308:
        if (DEBUG) {
            System.out.println("WhileStatementNoShortIf ::= while LPAREN Expression..."); //$NON-NLS-1$
        }
        consumeStatementWhile();
        break;

    case 309:
        if (DEBUG) {
            System.out.println("DoStatement ::= do Statement while LPAREN Expression..."); //$NON-NLS-1$
        }
        consumeStatementDo();
        break;

    case 310:
        if (DEBUG) {
            System.out.println("ForStatement ::= for LPAREN ForInitopt SEMICOLON..."); //$NON-NLS-1$
        }
        consumeStatementFor();
        break;

    case 311:
        if (DEBUG) {
            System.out.println("ForStatementNoShortIf ::= for LPAREN ForInitopt..."); //$NON-NLS-1$
        }
        consumeStatementFor();
        break;

    case 312:
        if (DEBUG) {
            System.out.println("ForInit ::= StatementExpressionList"); //$NON-NLS-1$
        }
        consumeForInit();
        break;

    case 316:
        if (DEBUG) {
            System.out.println("StatementExpressionList ::= StatementExpressionList..."); //$NON-NLS-1$
        }
        consumeStatementExpressionList();
        break;

    case 317:
        if (DEBUG) {
            System.out.println("AssertStatement ::= assert Expression SEMICOLON"); //$NON-NLS-1$
        }
        consumeSimpleAssertStatement();
        break;

    case 318:
        if (DEBUG) {
            System.out.println("AssertStatement ::= assert Expression COLON Expression"); //$NON-NLS-1$
        }
        consumeAssertStatement();
        break;

    case 319:
        if (DEBUG) {
            System.out.println("BreakStatement ::= break SEMICOLON"); //$NON-NLS-1$
        }
        consumeStatementBreak();
        break;

    case 320:
        if (DEBUG) {
            System.out.println("BreakStatement ::= break Identifier SEMICOLON"); //$NON-NLS-1$
        }
        consumeStatementBreakWithLabel();
        break;

    case 321:
        if (DEBUG) {
            System.out.println("ContinueStatement ::= continue SEMICOLON"); //$NON-NLS-1$
        }
        consumeStatementContinue();
        break;

    case 322:
        if (DEBUG) {
            System.out.println("ContinueStatement ::= continue Identifier SEMICOLON"); //$NON-NLS-1$
        }
        consumeStatementContinueWithLabel();
        break;

    case 323:
        if (DEBUG) {
            System.out.println("ReturnStatement ::= return Expressionopt SEMICOLON"); //$NON-NLS-1$
        }
        consumeStatementReturn();
        break;

    case 324:
        if (DEBUG) {
            System.out.println("ThrowStatement ::= throw Expression SEMICOLON"); //$NON-NLS-1$
        }
        consumeStatementThrow();
        break;

    case 325:
        if (DEBUG) {
            System.out.println("SynchronizedStatement ::= OnlySynchronized LPAREN..."); //$NON-NLS-1$
        }
        consumeStatementSynchronized();
        break;

    case 326:
        if (DEBUG) {
            System.out.println("OnlySynchronized ::= synchronized"); //$NON-NLS-1$
        }
        consumeOnlySynchronized();
        break;

    case 327:
        if (DEBUG) {
            System.out.println("TryStatement ::= try TryBlock Catches"); //$NON-NLS-1$
        }
        consumeStatementTry(false, false);
        break;

    case 328:
        if (DEBUG) {
            System.out.println("TryStatement ::= try TryBlock Catchesopt Finally"); //$NON-NLS-1$
        }
        consumeStatementTry(true, false);
        break;

    case 329:
        if (DEBUG) {
            System.out.println("TryStatementWithResources ::= try ResourceSpecification"); //$NON-NLS-1$
        }
        consumeStatementTry(false, true);
        break;

    case 330:
        if (DEBUG) {
            System.out.println("TryStatementWithResources ::= try ResourceSpecification"); //$NON-NLS-1$
        }
        consumeStatementTry(true, true);
        break;

    case 331:
        if (DEBUG) {
            System.out.println("ResourceSpecification ::= LPAREN Resources ;opt RPAREN"); //$NON-NLS-1$
        }
        consumeResourceSpecification();
        break;

    case 332:
        if (DEBUG) {
            System.out.println(";opt ::="); //$NON-NLS-1$
        }
        consumeResourceOptionalTrailingSemiColon(false);
        break;

    case 333:
        if (DEBUG) {
            System.out.println(";opt ::= SEMICOLON"); //$NON-NLS-1$
        }
        consumeResourceOptionalTrailingSemiColon(true);
        break;

    case 334:
        if (DEBUG) {
            System.out.println("Resources ::= Resource"); //$NON-NLS-1$
        }
        consumeSingleResource();
        break;

    case 335:
        if (DEBUG) {
            System.out.println("Resources ::= Resources TrailingSemiColon Resource"); //$NON-NLS-1$
        }
        consumeMultipleResources();
        break;

    case 336:
        if (DEBUG) {
            System.out.println("TrailingSemiColon ::= SEMICOLON"); //$NON-NLS-1$
        }
        consumeResourceOptionalTrailingSemiColon(true);
        break;

    case 337:
        if (DEBUG) {
            System.out.println("Resource ::= Type PushModifiers VariableDeclaratorId..."); //$NON-NLS-1$
        }
        consumeResourceAsLocalVariableDeclaration();
        break;

    case 338:
        if (DEBUG) {
            System.out.println("Resource ::= Modifiers Type PushRealModifiers..."); //$NON-NLS-1$
        }
        consumeResourceAsLocalVariableDeclaration();
        break;

    case 340:
        if (DEBUG) {
            System.out.println("ExitTryBlock ::="); //$NON-NLS-1$
        }
        consumeExitTryBlock();
        break;

    case 342:
        if (DEBUG) {
            System.out.println("Catches ::= Catches CatchClause"); //$NON-NLS-1$
        }
        consumeCatches();
        break;

    case 343:
        if (DEBUG) {
            System.out.println("CatchClause ::= catch LPAREN CatchFormalParameter RPAREN"); //$NON-NLS-1$
        }
        consumeStatementCatch();
        break;

    case 345:
        if (DEBUG) {
            System.out.println("PushLPAREN ::= LPAREN"); //$NON-NLS-1$
        }
        consumeLeftParen();
        break;

    case 346:
        if (DEBUG) {
            System.out.println("PushRPAREN ::= RPAREN"); //$NON-NLS-1$
        }
        consumeRightParen();
        break;

    case 351:
        if (DEBUG) {
            System.out.println("PrimaryNoNewArray ::= this"); //$NON-NLS-1$
        }
        consumePrimaryNoNewArrayThis();
        break;

    case 352:
        if (DEBUG) {
            System.out.println("PrimaryNoNewArray ::= PushLPAREN Expression_NotName..."); //$NON-NLS-1$
        }
        consumePrimaryNoNewArray();
        break;

    case 353:
        if (DEBUG) {
            System.out.println("PrimaryNoNewArray ::= PushLPAREN Name PushRPAREN"); //$NON-NLS-1$
        }
        consumePrimaryNoNewArrayWithName();
        break;

    case 356:
        if (DEBUG) {
            System.out.println("PrimaryNoNewArray ::= Name DOT this"); //$NON-NLS-1$
        }
        consumePrimaryNoNewArrayNameThis();
        break;

    case 357:
        if (DEBUG) {
            System.out.println("PrimaryNoNewArray ::= Name DOT super"); //$NON-NLS-1$
        }
        consumePrimaryNoNewArrayNameSuper();
        break;

    case 358:
        if (DEBUG) {
            System.out.println("PrimaryNoNewArray ::= Name DOT class"); //$NON-NLS-1$
        }
        consumePrimaryNoNewArrayName();
        break;

    case 359:
        if (DEBUG) {
            System.out.println("PrimaryNoNewArray ::= Name Dims DOT class"); //$NON-NLS-1$
        }
        consumePrimaryNoNewArrayArrayType();
        break;

    case 360:
        if (DEBUG) {
            System.out.println("PrimaryNoNewArray ::= PrimitiveType Dims DOT class"); //$NON-NLS-1$
        }
        consumePrimaryNoNewArrayPrimitiveArrayType();
        break;

    case 361:
        if (DEBUG) {
            System.out.println("PrimaryNoNewArray ::= PrimitiveType DOT class"); //$NON-NLS-1$
        }
        consumePrimaryNoNewArrayPrimitiveType();
        break;

    case 364:
        if (DEBUG) {
            System.out.println("AllocationHeader ::= new ClassType LPAREN..."); //$NON-NLS-1$
        }
        consumeAllocationHeader();
        break;

    case 365:
        if (DEBUG) {
            System.out.println("ClassInstanceCreationExpression ::= new..."); //$NON-NLS-1$
        }
        consumeClassInstanceCreationExpressionWithTypeArguments();
        break;

    case 366:
        if (DEBUG) {
            System.out.println("ClassInstanceCreationExpression ::= new ClassType LPAREN"); //$NON-NLS-1$
        }
        consumeClassInstanceCreationExpression();
        break;

    case 367:
        if (DEBUG) {
            System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); //$NON-NLS-1$
        }
        consumeClassInstanceCreationExpressionQualifiedWithTypeArguments();
        break;

    case 368:
        if (DEBUG) {
            System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); //$NON-NLS-1$
        }
        consumeClassInstanceCreationExpressionQualified();
        break;

    case 369:
        if (DEBUG) {
            System.out.println("ClassInstanceCreationExpression ::=..."); //$NON-NLS-1$
        }
        consumeClassInstanceCreationExpressionQualified();
        break;

    case 370:
        if (DEBUG) {
            System.out.println("ClassInstanceCreationExpression ::=..."); //$NON-NLS-1$
        }
        consumeClassInstanceCreationExpressionQualifiedWithTypeArguments();
        break;

    case 371:
        if (DEBUG) {
            System.out.println("ClassInstanceCreationExpressionName ::= Name DOT"); //$NON-NLS-1$
        }
        consumeClassInstanceCreationExpressionName();
        break;

    case 372:
        if (DEBUG) {
            System.out.println("UnqualifiedClassBodyopt ::="); //$NON-NLS-1$
        }
        consumeClassBodyopt();
        break;

    case 374:
        if (DEBUG) {
            System.out.println("UnqualifiedEnterAnonymousClassBody ::="); //$NON-NLS-1$
        }
        consumeEnterAnonymousClassBody(false);
        break;

    case 375:
        if (DEBUG) {
            System.out.println("QualifiedClassBodyopt ::="); //$NON-NLS-1$
        }
        consumeClassBodyopt();
        break;

    case 377:
        if (DEBUG) {
            System.out.println("QualifiedEnterAnonymousClassBody ::="); //$NON-NLS-1$
        }
        consumeEnterAnonymousClassBody(true);
        break;

    case 379:
        if (DEBUG) {
            System.out.println("ArgumentList ::= ArgumentList COMMA Expression"); //$NON-NLS-1$
        }
        consumeArgumentList();
        break;

    case 380:
        if (DEBUG) {
            System.out.println("ArrayCreationHeader ::= new PrimitiveType..."); //$NON-NLS-1$
        }
        consumeArrayCreationHeader();
        break;

    case 381:
        if (DEBUG) {
            System.out.println("ArrayCreationHeader ::= new ClassOrInterfaceType..."); //$NON-NLS-1$
        }
        consumeArrayCreationHeader();
        break;

    case 382:
        if (DEBUG) {
            System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); //$NON-NLS-1$
        }
        consumeArrayCreationExpressionWithoutInitializer();
        break;

    case 383:
        if (DEBUG) {
            System.out.println("ArrayCreationWithArrayInitializer ::= new PrimitiveType"); //$NON-NLS-1$
        }
        consumeArrayCreationExpressionWithInitializer();
        break;

    case 384:
        if (DEBUG) {
            System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); //$NON-NLS-1$
        }
        consumeArrayCreationExpressionWithoutInitializer();
        break;

    case 385:
        if (DEBUG) {
            System.out.println("ArrayCreationWithArrayInitializer ::= new..."); //$NON-NLS-1$
        }
        consumeArrayCreationExpressionWithInitializer();
        break;

    case 387:
        if (DEBUG) {
            System.out.println("DimWithOrWithOutExprs ::= DimWithOrWithOutExprs..."); //$NON-NLS-1$
        }
        consumeDimWithOrWithOutExprs();
        break;

    case 389:
        if (DEBUG) {
            System.out.println("DimWithOrWithOutExpr ::= LBRACKET RBRACKET"); //$NON-NLS-1$
        }
        consumeDimWithOrWithOutExpr();
        break;

    case 390:
        if (DEBUG) {
            System.out.println("Dims ::= DimsLoop"); //$NON-NLS-1$
        }
        consumeDims();
        break;

    case 393:
        if (DEBUG) {
            System.out.println("OneDimLoop ::= LBRACKET RBRACKET"); //$NON-NLS-1$
        }
        consumeOneDimLoop();
        break;

    case 394:
        if (DEBUG) {
            System.out.println("FieldAccess ::= Primary DOT Identifier"); //$NON-NLS-1$
        }
        consumeFieldAccess(false);
        break;

    case 395:
        if (DEBUG) {
            System.out.println("FieldAccess ::= super DOT Identifier"); //$NON-NLS-1$
        }
        consumeFieldAccess(true);
        break;

    case 396:
        if (DEBUG) {
            System.out.println("MethodInvocation ::= Name LPAREN ArgumentListopt RPAREN"); //$NON-NLS-1$
        }
        consumeMethodInvocationName();
        break;

    case 397:
        if (DEBUG) {
            System.out.println("MethodInvocation ::= Name DOT OnlyTypeArguments..."); //$NON-NLS-1$
        }
        consumeMethodInvocationNameWithTypeArguments();
        break;

    case 398:
        if (DEBUG) {
            System.out.println("MethodInvocation ::= Primary DOT OnlyTypeArguments..."); //$NON-NLS-1$
        }
        consumeMethodInvocationPrimaryWithTypeArguments();
        break;

    case 399:
        if (DEBUG) {
            System.out.println("MethodInvocation ::= Primary DOT Identifier LPAREN..."); //$NON-NLS-1$
        }
        consumeMethodInvocationPrimary();
        break;

    case 400:
        if (DEBUG) {
            System.out.println("MethodInvocation ::= super DOT OnlyTypeArguments..."); //$NON-NLS-1$
        }
        consumeMethodInvocationSuperWithTypeArguments();
        break;

    case 401:
        if (DEBUG) {
            System.out.println("MethodInvocation ::= super DOT Identifier LPAREN..."); //$NON-NLS-1$
        }
        consumeMethodInvocationSuper();
        break;

    case 402:
        if (DEBUG) {
            System.out.println("ArrayAccess ::= Name LBRACKET Expression RBRACKET"); //$NON-NLS-1$
        }
        consumeArrayAccess(true);
        break;

    case 403:
        if (DEBUG) {
            System.out.println("ArrayAccess ::= PrimaryNoNewArray LBRACKET Expression..."); //$NON-NLS-1$
        }
        consumeArrayAccess(false);
        break;

    case 404:
        if (DEBUG) {
            System.out.println("ArrayAccess ::= ArrayCreationWithArrayInitializer..."); //$NON-NLS-1$
        }
        consumeArrayAccess(false);
        break;

    case 406:
        if (DEBUG) {
            System.out.println("PostfixExpression ::= Name"); //$NON-NLS-1$
        }
        consumePostfixExpression();
        break;

    case 409:
        if (DEBUG) {
            System.out.println("PostIncrementExpression ::= PostfixExpression PLUS_PLUS"); //$NON-NLS-1$
        }
        consumeUnaryExpression(OperatorIds.PLUS, true);
        break;

    case 410:
        if (DEBUG) {
            System.out.println("PostDecrementExpression ::= PostfixExpression..."); //$NON-NLS-1$
        }
        consumeUnaryExpression(OperatorIds.MINUS, true);
        break;

    case 411:
        if (DEBUG) {
            System.out.println("PushPosition ::="); //$NON-NLS-1$
        }
        consumePushPosition();
        break;

    case 414:
        if (DEBUG) {
            System.out.println("UnaryExpression ::= PLUS PushPosition UnaryExpression"); //$NON-NLS-1$
        }
        consumeUnaryExpression(OperatorIds.PLUS);
        break;

    case 415:
        if (DEBUG) {
            System.out.println("UnaryExpression ::= MINUS PushPosition UnaryExpression"); //$NON-NLS-1$
        }
        consumeUnaryExpression(OperatorIds.MINUS);
        break;

    case 417:
        if (DEBUG) {
            System.out.println("PreIncrementExpression ::= PLUS_PLUS PushPosition..."); //$NON-NLS-1$
        }
        consumeUnaryExpression(OperatorIds.PLUS, false);
        break;

    case 418:
        if (DEBUG) {
            System.out.println("PreDecrementExpression ::= MINUS_MINUS PushPosition..."); //$NON-NLS-1$
        }
        consumeUnaryExpression(OperatorIds.MINUS, false);
        break;

    case 420:
        if (DEBUG) {
            System.out.println("UnaryExpressionNotPlusMinus ::= TWIDDLE PushPosition..."); //$NON-NLS-1$
        }
        consumeUnaryExpression(OperatorIds.TWIDDLE);
        break;

    case 421:
        if (DEBUG) {
            System.out.println("UnaryExpressionNotPlusMinus ::= NOT PushPosition..."); //$NON-NLS-1$
        }
        consumeUnaryExpression(OperatorIds.NOT);
        break;

    case 423:
        if (DEBUG) {
            System.out.println("CastExpression ::= PushLPAREN PrimitiveType Dimsopt..."); //$NON-NLS-1$
        }
        consumeCastExpressionWithPrimitiveType();
        break;

    case 424:
        if (DEBUG) {
            System.out.println("CastExpression ::= PushLPAREN Name..."); //$NON-NLS-1$
        }
        consumeCastExpressionWithGenericsArray();
        break;

    case 425:
        if (DEBUG) {
            System.out.println("CastExpression ::= PushLPAREN Name..."); //$NON-NLS-1$
        }
        consumeCastExpressionWithQualifiedGenericsArray();
        break;

    case 426:
        if (DEBUG) {
            System.out.println("CastExpression ::= PushLPAREN Name PushRPAREN..."); //$NON-NLS-1$
        }
        consumeCastExpressionLL1();
        break;

    case 427:
        if (DEBUG) {
            System.out.println("CastExpression ::= PushLPAREN Name Dims PushRPAREN..."); //$NON-NLS-1$
        }
        consumeCastExpressionWithNameArray();
        break;

    case 428:
        if (DEBUG) {
            System.out.println("OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments"); //$NON-NLS-1$
        }
        consumeOnlyTypeArgumentsForCastExpression();
        break;

    case 429:
        if (DEBUG) {
            System.out.println("InsideCastExpression ::="); //$NON-NLS-1$
        }
        consumeInsideCastExpression();
        break;

    case 430:
        if (DEBUG) {
            System.out.println("InsideCastExpressionLL1 ::="); //$NON-NLS-1$
        }
        consumeInsideCastExpressionLL1();
        break;

    case 431:
        if (DEBUG) {
            System.out.println("InsideCastExpressionWithQualifiedGenerics ::="); //$NON-NLS-1$
        }
        consumeInsideCastExpressionWithQualifiedGenerics();
        break;

    case 433:
        if (DEBUG) {
            System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.MULTIPLY);
        break;

    case 434:
        if (DEBUG) {
            System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.DIVIDE);
        break;

    case 435:
        if (DEBUG) {
            System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.REMAINDER);
        break;

    case 437:
        if (DEBUG) {
            System.out.println("AdditiveExpression ::= AdditiveExpression PLUS..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.PLUS);
        break;

    case 438:
        if (DEBUG) {
            System.out.println("AdditiveExpression ::= AdditiveExpression MINUS..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.MINUS);
        break;

    case 440:
        if (DEBUG) {
            System.out.println("ShiftExpression ::= ShiftExpression LEFT_SHIFT..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.LEFT_SHIFT);
        break;

    case 441:
        if (DEBUG) {
            System.out.println("ShiftExpression ::= ShiftExpression RIGHT_SHIFT..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.RIGHT_SHIFT);
        break;

    case 442:
        if (DEBUG) {
            System.out.println("ShiftExpression ::= ShiftExpression UNSIGNED_RIGHT_SHIFT"); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT);
        break;

    case 444:
        if (DEBUG) {
            System.out.println("RelationalExpression ::= RelationalExpression LESS..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.LESS);
        break;

    case 445:
        if (DEBUG) {
            System.out.println("RelationalExpression ::= RelationalExpression GREATER..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.GREATER);
        break;

    case 446:
        if (DEBUG) {
            System.out.println("RelationalExpression ::= RelationalExpression LESS_EQUAL"); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.LESS_EQUAL);
        break;

    case 447:
        if (DEBUG) {
            System.out.println("RelationalExpression ::= RelationalExpression..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.GREATER_EQUAL);
        break;

    case 449:
        if (DEBUG) {
            System.out.println("InstanceofExpression ::= InstanceofExpression instanceof"); //$NON-NLS-1$
        }
        consumeInstanceOfExpression();
        break;

    case 451:
        if (DEBUG) {
            System.out.println("EqualityExpression ::= EqualityExpression EQUAL_EQUAL..."); //$NON-NLS-1$
        }
        consumeEqualityExpression(OperatorIds.EQUAL_EQUAL);
        break;

    case 452:
        if (DEBUG) {
            System.out.println("EqualityExpression ::= EqualityExpression NOT_EQUAL..."); //$NON-NLS-1$
        }
        consumeEqualityExpression(OperatorIds.NOT_EQUAL);
        break;

    case 454:
        if (DEBUG) {
            System.out.println("AndExpression ::= AndExpression AND EqualityExpression"); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.AND);
        break;

    case 456:
        if (DEBUG) {
            System.out.println("ExclusiveOrExpression ::= ExclusiveOrExpression XOR..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.XOR);
        break;

    case 458:
        if (DEBUG) {
            System.out.println("InclusiveOrExpression ::= InclusiveOrExpression OR..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.OR);
        break;

    case 460:
        if (DEBUG) {
            System.out.println("ConditionalAndExpression ::= ConditionalAndExpression..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.AND_AND);
        break;

    case 462:
        if (DEBUG) {
            System.out.println("ConditionalOrExpression ::= ConditionalOrExpression..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.OR_OR);
        break;

    case 464:
        if (DEBUG) {
            System.out.println("ConditionalExpression ::= ConditionalOrExpression..."); //$NON-NLS-1$
        }
        consumeConditionalExpression(OperatorIds.QUESTIONCOLON);
        break;

    case 467:
        if (DEBUG) {
            System.out.println("Assignment ::= PostfixExpression AssignmentOperator..."); //$NON-NLS-1$
        }
        consumeAssignment();
        break;

    case 469:
        if (DEBUG) {
            System.out.println("Assignment ::= InvalidArrayInitializerAssignement"); //$NON-NLS-1$
        }
        ignoreExpressionAssignment();
        break;

    case 470:
        if (DEBUG) {
            System.out.println("AssignmentOperator ::= EQUAL"); //$NON-NLS-1$
        }
        consumeAssignmentOperator(EQUAL);
        break;

    case 471:
        if (DEBUG) {
            System.out.println("AssignmentOperator ::= MULTIPLY_EQUAL"); //$NON-NLS-1$
        }
        consumeAssignmentOperator(MULTIPLY);
        break;

    case 472:
        if (DEBUG) {
            System.out.println("AssignmentOperator ::= DIVIDE_EQUAL"); //$NON-NLS-1$
        }
        consumeAssignmentOperator(DIVIDE);
        break;

    case 473:
        if (DEBUG) {
            System.out.println("AssignmentOperator ::= REMAINDER_EQUAL"); //$NON-NLS-1$
        }
        consumeAssignmentOperator(REMAINDER);
        break;

    case 474:
        if (DEBUG) {
            System.out.println("AssignmentOperator ::= PLUS_EQUAL"); //$NON-NLS-1$
        }
        consumeAssignmentOperator(PLUS);
        break;

    case 475:
        if (DEBUG) {
            System.out.println("AssignmentOperator ::= MINUS_EQUAL"); //$NON-NLS-1$
        }
        consumeAssignmentOperator(MINUS);
        break;

    case 476:
        if (DEBUG) {
            System.out.println("AssignmentOperator ::= LEFT_SHIFT_EQUAL"); //$NON-NLS-1$
        }
        consumeAssignmentOperator(LEFT_SHIFT);
        break;

    case 477:
        if (DEBUG) {
            System.out.println("AssignmentOperator ::= RIGHT_SHIFT_EQUAL"); //$NON-NLS-1$
        }
        consumeAssignmentOperator(RIGHT_SHIFT);
        break;

    case 478:
        if (DEBUG) {
            System.out.println("AssignmentOperator ::= UNSIGNED_RIGHT_SHIFT_EQUAL"); //$NON-NLS-1$
        }
        consumeAssignmentOperator(UNSIGNED_RIGHT_SHIFT);
        break;

    case 479:
        if (DEBUG) {
            System.out.println("AssignmentOperator ::= AND_EQUAL"); //$NON-NLS-1$
        }
        consumeAssignmentOperator(AND);
        break;

    case 480:
        if (DEBUG) {
            System.out.println("AssignmentOperator ::= XOR_EQUAL"); //$NON-NLS-1$
        }
        consumeAssignmentOperator(XOR);
        break;

    case 481:
        if (DEBUG) {
            System.out.println("AssignmentOperator ::= OR_EQUAL"); //$NON-NLS-1$
        }
        consumeAssignmentOperator(OR);
        break;

    case 485:
        if (DEBUG) {
            System.out.println("Expressionopt ::="); //$NON-NLS-1$
        }
        consumeEmptyExpression();
        break;

    case 490:
        if (DEBUG) {
            System.out.println("ClassBodyDeclarationsopt ::="); //$NON-NLS-1$
        }
        consumeEmptyClassBodyDeclarationsopt();
        break;

    case 491:
        if (DEBUG) {
            System.out.println("ClassBodyDeclarationsopt ::= NestedType..."); //$NON-NLS-1$
        }
        consumeClassBodyDeclarationsopt();
        break;

    case 492:
        if (DEBUG) {
            System.out.println("Modifiersopt ::="); //$NON-NLS-1$
        }
        consumeDefaultModifiers();
        break;

    case 493:
        if (DEBUG) {
            System.out.println("Modifiersopt ::= Modifiers"); //$NON-NLS-1$
        }
        consumeModifiers();
        break;

    case 494:
        if (DEBUG) {
            System.out.println("BlockStatementsopt ::="); //$NON-NLS-1$
        }
        consumeEmptyBlockStatementsopt();
        break;

    case 496:
        if (DEBUG) {
            System.out.println("Dimsopt ::="); //$NON-NLS-1$
        }
        consumeEmptyDimsopt();
        break;

    case 498:
        if (DEBUG) {
            System.out.println("ArgumentListopt ::="); //$NON-NLS-1$
        }
        consumeEmptyArgumentListopt();
        break;

    case 502:
        if (DEBUG) {
            System.out.println("FormalParameterListopt ::="); //$NON-NLS-1$
        }
        consumeFormalParameterListopt();
        break;

    case 506:
        if (DEBUG) {
            System.out.println("InterfaceMemberDeclarationsopt ::="); //$NON-NLS-1$
        }
        consumeEmptyInterfaceMemberDeclarationsopt();
        break;

    case 507:
        if (DEBUG) {
            System.out.println("InterfaceMemberDeclarationsopt ::= NestedType..."); //$NON-NLS-1$
        }
        consumeInterfaceMemberDeclarationsopt();
        break;

    case 508:
        if (DEBUG) {
            System.out.println("NestedType ::="); //$NON-NLS-1$
        }
        consumeNestedType();
        break;

    case 509:
        if (DEBUG) {
            System.out.println("ForInitopt ::="); //$NON-NLS-1$
        }
        consumeEmptyForInitopt();
        break;

    case 511:
        if (DEBUG) {
            System.out.println("ForUpdateopt ::="); //$NON-NLS-1$
        }
        consumeEmptyForUpdateopt();
        break;

    case 515:
        if (DEBUG) {
            System.out.println("Catchesopt ::="); //$NON-NLS-1$
        }
        consumeEmptyCatchesopt();
        break;

    case 517:
        if (DEBUG) {
            System.out.println("EnumDeclaration ::= EnumHeader EnumBody"); //$NON-NLS-1$
        }
        consumeEnumDeclaration();
        break;

    case 518:
        if (DEBUG) {
            System.out.println("EnumHeader ::= EnumHeaderName ClassHeaderImplementsopt"); //$NON-NLS-1$
        }
        consumeEnumHeader();
        break;

    case 519:
        if (DEBUG) {
            System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier"); //$NON-NLS-1$
        }
        consumeEnumHeaderName();
        break;

    case 520:
        if (DEBUG) {
            System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier..."); //$NON-NLS-1$
        }
        consumeEnumHeaderNameWithTypeParameters();
        break;

    case 521:
        if (DEBUG) {
            System.out.println("EnumBody ::= LBRACE EnumBodyDeclarationsopt RBRACE"); //$NON-NLS-1$
        }
        consumeEnumBodyNoConstants();
        break;

    case 522:
        if (DEBUG) {
            System.out.println("EnumBody ::= LBRACE COMMA EnumBodyDeclarationsopt..."); //$NON-NLS-1$
        }
        consumeEnumBodyNoConstants();
        break;

    case 523:
        if (DEBUG) {
            System.out.println("EnumBody ::= LBRACE EnumConstants COMMA..."); //$NON-NLS-1$
        }
        consumeEnumBodyWithConstants();
        break;

    case 524:
        if (DEBUG) {
            System.out.println("EnumBody ::= LBRACE EnumConstants..."); //$NON-NLS-1$
        }
        consumeEnumBodyWithConstants();
        break;

    case 526:
        if (DEBUG) {
            System.out.println("EnumConstants ::= EnumConstants COMMA EnumConstant"); //$NON-NLS-1$
        }
        consumeEnumConstants();
        break;

    case 527:
        if (DEBUG) {
            System.out.println("EnumConstantHeaderName ::= Modifiersopt Identifier"); //$NON-NLS-1$
        }
        consumeEnumConstantHeaderName();
        break;

    case 528:
        if (DEBUG) {
            System.out.println("EnumConstantHeader ::= EnumConstantHeaderName..."); //$NON-NLS-1$
        }
        consumeEnumConstantHeader();
        break;

    case 529:
        if (DEBUG) {
            System.out.println("EnumConstant ::= EnumConstantHeader ForceNoDiet..."); //$NON-NLS-1$
        }
        consumeEnumConstantWithClassBody();
        break;

    case 530:
        if (DEBUG) {
            System.out.println("EnumConstant ::= EnumConstantHeader"); //$NON-NLS-1$
        }
        consumeEnumConstantNoClassBody();
        break;

    case 531:
        if (DEBUG) {
            System.out.println("Arguments ::= LPAREN ArgumentListopt RPAREN"); //$NON-NLS-1$
        }
        consumeArguments();
        break;

    case 532:
        if (DEBUG) {
            System.out.println("Argumentsopt ::="); //$NON-NLS-1$
        }
        consumeEmptyArguments();
        break;

    case 534:
        if (DEBUG) {
            System.out.println("EnumDeclarations ::= SEMICOLON ClassBodyDeclarationsopt"); //$NON-NLS-1$
        }
        consumeEnumDeclarations();
        break;

    case 535:
        if (DEBUG) {
            System.out.println("EnumBodyDeclarationsopt ::="); //$NON-NLS-1$
        }
        consumeEmptyEnumDeclarations();
        break;

    case 537:
        if (DEBUG) {
            System.out.println("EnhancedForStatement ::= EnhancedForStatementHeader..."); //$NON-NLS-1$
        }
        consumeEnhancedForStatement();
        break;

    case 538:
        if (DEBUG) {
            System.out.println("EnhancedForStatementNoShortIf ::=..."); //$NON-NLS-1$
        }
        consumeEnhancedForStatement();
        break;

    case 539:
        if (DEBUG) {
            System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Type..."); //$NON-NLS-1$
        }
        consumeEnhancedForStatementHeaderInit(false);
        break;

    case 540:
        if (DEBUG) {
            System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Modifiers"); //$NON-NLS-1$
        }
        consumeEnhancedForStatementHeaderInit(true);
        break;

    case 541:
        if (DEBUG) {
            System.out.println("EnhancedForStatementHeader ::=..."); //$NON-NLS-1$
        }
        consumeEnhancedForStatementHeader();
        break;

    case 542:
        if (DEBUG) {
            System.out.println("SingleStaticImportDeclaration ::=..."); //$NON-NLS-1$
        }
        consumeImportDeclaration();
        break;

    case 543:
        if (DEBUG) {
            System.out.println("SingleStaticImportDeclarationName ::= import static Name"); //$NON-NLS-1$
        }
        consumeSingleStaticImportDeclarationName();
        break;

    case 544:
        if (DEBUG) {
            System.out.println("StaticImportOnDemandDeclaration ::=..."); //$NON-NLS-1$
        }
        consumeImportDeclaration();
        break;

    case 545:
        if (DEBUG) {
            System.out.println("StaticImportOnDemandDeclarationName ::= import static..."); //$NON-NLS-1$
        }
        consumeStaticImportOnDemandDeclarationName();
        break;

    case 546:
        if (DEBUG) {
            System.out.println("TypeArguments ::= LESS TypeArgumentList1"); //$NON-NLS-1$
        }
        consumeTypeArguments();
        break;

    case 547:
        if (DEBUG) {
            System.out.println("OnlyTypeArguments ::= LESS TypeArgumentList1"); //$NON-NLS-1$
        }
        consumeOnlyTypeArguments();
        break;

    case 549:
        if (DEBUG) {
            System.out.println("TypeArgumentList1 ::= TypeArgumentList COMMA..."); //$NON-NLS-1$
        }
        consumeTypeArgumentList1();
        break;

    case 551:
        if (DEBUG) {
            System.out.println("TypeArgumentList ::= TypeArgumentList COMMA TypeArgument"); //$NON-NLS-1$
        }
        consumeTypeArgumentList();
        break;

    case 552:
        if (DEBUG) {
            System.out.println("TypeArgument ::= ReferenceType"); //$NON-NLS-1$
        }
        consumeTypeArgument();
        break;

    case 556:
        if (DEBUG) {
            System.out.println("ReferenceType1 ::= ReferenceType GREATER"); //$NON-NLS-1$
        }
        consumeReferenceType1();
        break;

    case 557:
        if (DEBUG) {
            System.out.println("ReferenceType1 ::= ClassOrInterface LESS..."); //$NON-NLS-1$
        }
        consumeTypeArgumentReferenceType1();
        break;

    case 559:
        if (DEBUG) {
            System.out.println("TypeArgumentList2 ::= TypeArgumentList COMMA..."); //$NON-NLS-1$
        }
        consumeTypeArgumentList2();
        break;

    case 562:
        if (DEBUG) {
            System.out.println("ReferenceType2 ::= ReferenceType RIGHT_SHIFT"); //$NON-NLS-1$
        }
        consumeReferenceType2();
        break;

    case 563:
        if (DEBUG) {
            System.out.println("ReferenceType2 ::= ClassOrInterface LESS..."); //$NON-NLS-1$
        }
        consumeTypeArgumentReferenceType2();
        break;

    case 565:
        if (DEBUG) {
            System.out.println("TypeArgumentList3 ::= TypeArgumentList COMMA..."); //$NON-NLS-1$
        }
        consumeTypeArgumentList3();
        break;

    case 568:
        if (DEBUG) {
            System.out.println("ReferenceType3 ::= ReferenceType UNSIGNED_RIGHT_SHIFT"); //$NON-NLS-1$
        }
        consumeReferenceType3();
        break;

    case 569:
        if (DEBUG) {
            System.out.println("Wildcard ::= QUESTION"); //$NON-NLS-1$
        }
        consumeWildcard();
        break;

    case 570:
        if (DEBUG) {
            System.out.println("Wildcard ::= QUESTION WildcardBounds"); //$NON-NLS-1$
        }
        consumeWildcardWithBounds();
        break;

    case 571:
        if (DEBUG) {
            System.out.println("WildcardBounds ::= extends ReferenceType"); //$NON-NLS-1$
        }
        consumeWildcardBoundsExtends();
        break;

    case 572:
        if (DEBUG) {
            System.out.println("WildcardBounds ::= super ReferenceType"); //$NON-NLS-1$
        }
        consumeWildcardBoundsSuper();
        break;

    case 573:
        if (DEBUG) {
            System.out.println("Wildcard1 ::= QUESTION GREATER"); //$NON-NLS-1$
        }
        consumeWildcard1();
        break;

    case 574:
        if (DEBUG) {
            System.out.println("Wildcard1 ::= QUESTION WildcardBounds1"); //$NON-NLS-1$
        }
        consumeWildcard1WithBounds();
        break;

    case 575:
        if (DEBUG) {
            System.out.println("WildcardBounds1 ::= extends ReferenceType1"); //$NON-NLS-1$
        }
        consumeWildcardBounds1Extends();
        break;

    case 576:
        if (DEBUG) {
            System.out.println("WildcardBounds1 ::= super ReferenceType1"); //$NON-NLS-1$
        }
        consumeWildcardBounds1Super();
        break;

    case 577:
        if (DEBUG) {
            System.out.println("Wildcard2 ::= QUESTION RIGHT_SHIFT"); //$NON-NLS-1$
        }
        consumeWildcard2();
        break;

    case 578:
        if (DEBUG) {
            System.out.println("Wildcard2 ::= QUESTION WildcardBounds2"); //$NON-NLS-1$
        }
        consumeWildcard2WithBounds();
        break;

    case 579:
        if (DEBUG) {
            System.out.println("WildcardBounds2 ::= extends ReferenceType2"); //$NON-NLS-1$
        }
        consumeWildcardBounds2Extends();
        break;

    case 580:
        if (DEBUG) {
            System.out.println("WildcardBounds2 ::= super ReferenceType2"); //$NON-NLS-1$
        }
        consumeWildcardBounds2Super();
        break;

    case 581:
        if (DEBUG) {
            System.out.println("Wildcard3 ::= QUESTION UNSIGNED_RIGHT_SHIFT"); //$NON-NLS-1$
        }
        consumeWildcard3();
        break;

    case 582:
        if (DEBUG) {
            System.out.println("Wildcard3 ::= QUESTION WildcardBounds3"); //$NON-NLS-1$
        }
        consumeWildcard3WithBounds();
        break;

    case 583:
        if (DEBUG) {
            System.out.println("WildcardBounds3 ::= extends ReferenceType3"); //$NON-NLS-1$
        }
        consumeWildcardBounds3Extends();
        break;

    case 584:
        if (DEBUG) {
            System.out.println("WildcardBounds3 ::= super ReferenceType3"); //$NON-NLS-1$
        }
        consumeWildcardBounds3Super();
        break;

    case 585:
        if (DEBUG) {
            System.out.println("TypeParameterHeader ::= Identifier"); //$NON-NLS-1$
        }
        consumeTypeParameterHeader();
        break;

    case 586:
        if (DEBUG) {
            System.out.println("TypeParameters ::= LESS TypeParameterList1"); //$NON-NLS-1$
        }
        consumeTypeParameters();
        break;

    case 588:
        if (DEBUG) {
            System.out.println("TypeParameterList ::= TypeParameterList COMMA..."); //$NON-NLS-1$
        }
        consumeTypeParameterList();
        break;

    case 590:
        if (DEBUG) {
            System.out.println("TypeParameter ::= TypeParameterHeader extends..."); //$NON-NLS-1$
        }
        consumeTypeParameterWithExtends();
        break;

    case 591:
        if (DEBUG) {
            System.out.println("TypeParameter ::= TypeParameterHeader extends..."); //$NON-NLS-1$
        }
        consumeTypeParameterWithExtendsAndBounds();
        break;

    case 593:
        if (DEBUG) {
            System.out.println("AdditionalBoundList ::= AdditionalBoundList..."); //$NON-NLS-1$
        }
        consumeAdditionalBoundList();
        break;

    case 594:
        if (DEBUG) {
            System.out.println("AdditionalBound ::= AND ReferenceType"); //$NON-NLS-1$
        }
        consumeAdditionalBound();
        break;

    case 596:
        if (DEBUG) {
            System.out.println("TypeParameterList1 ::= TypeParameterList COMMA..."); //$NON-NLS-1$
        }
        consumeTypeParameterList1();
        break;

    case 597:
        if (DEBUG) {
            System.out.println("TypeParameter1 ::= TypeParameterHeader GREATER"); //$NON-NLS-1$
        }
        consumeTypeParameter1();
        break;

    case 598:
        if (DEBUG) {
            System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); //$NON-NLS-1$
        }
        consumeTypeParameter1WithExtends();
        break;

    case 599:
        if (DEBUG) {
            System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); //$NON-NLS-1$
        }
        consumeTypeParameter1WithExtendsAndBounds();
        break;

    case 601:
        if (DEBUG) {
            System.out.println("AdditionalBoundList1 ::= AdditionalBoundList..."); //$NON-NLS-1$
        }
        consumeAdditionalBoundList1();
        break;

    case 602:
        if (DEBUG) {
            System.out.println("AdditionalBound1 ::= AND ReferenceType1"); //$NON-NLS-1$
        }
        consumeAdditionalBound1();
        break;

    case 608:
        if (DEBUG) {
            System.out.println("UnaryExpression_NotName ::= PLUS PushPosition..."); //$NON-NLS-1$
        }
        consumeUnaryExpression(OperatorIds.PLUS);
        break;

    case 609:
        if (DEBUG) {
            System.out.println("UnaryExpression_NotName ::= MINUS PushPosition..."); //$NON-NLS-1$
        }
        consumeUnaryExpression(OperatorIds.MINUS);
        break;

    case 612:
        if (DEBUG) {
            System.out.println("UnaryExpressionNotPlusMinus_NotName ::= TWIDDLE..."); //$NON-NLS-1$
        }
        consumeUnaryExpression(OperatorIds.TWIDDLE);
        break;

    case 613:
        if (DEBUG) {
            System.out.println("UnaryExpressionNotPlusMinus_NotName ::= NOT PushPosition"); //$NON-NLS-1$
        }
        consumeUnaryExpression(OperatorIds.NOT);
        break;

    case 616:
        if (DEBUG) {
            System.out.println("MultiplicativeExpression_NotName ::=..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.MULTIPLY);
        break;

    case 617:
        if (DEBUG) {
            System.out.println("MultiplicativeExpression_NotName ::= Name MULTIPLY..."); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.MULTIPLY);
        break;

    case 618:
        if (DEBUG) {
            System.out.println("MultiplicativeExpression_NotName ::=..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.DIVIDE);
        break;

    case 619:
        if (DEBUG) {
            System.out.println("MultiplicativeExpression_NotName ::= Name DIVIDE..."); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.DIVIDE);
        break;

    case 620:
        if (DEBUG) {
            System.out.println("MultiplicativeExpression_NotName ::=..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.REMAINDER);
        break;

    case 621:
        if (DEBUG) {
            System.out.println("MultiplicativeExpression_NotName ::= Name REMAINDER..."); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.REMAINDER);
        break;

    case 623:
        if (DEBUG) {
            System.out.println("AdditiveExpression_NotName ::=..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.PLUS);
        break;

    case 624:
        if (DEBUG) {
            System.out.println("AdditiveExpression_NotName ::= Name PLUS..."); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.PLUS);
        break;

    case 625:
        if (DEBUG) {
            System.out.println("AdditiveExpression_NotName ::=..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.MINUS);
        break;

    case 626:
        if (DEBUG) {
            System.out.println("AdditiveExpression_NotName ::= Name MINUS..."); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.MINUS);
        break;

    case 628:
        if (DEBUG) {
            System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.LEFT_SHIFT);
        break;

    case 629:
        if (DEBUG) {
            System.out.println("ShiftExpression_NotName ::= Name LEFT_SHIFT..."); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.LEFT_SHIFT);
        break;

    case 630:
        if (DEBUG) {
            System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.RIGHT_SHIFT);
        break;

    case 631:
        if (DEBUG) {
            System.out.println("ShiftExpression_NotName ::= Name RIGHT_SHIFT..."); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.RIGHT_SHIFT);
        break;

    case 632:
        if (DEBUG) {
            System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT);
        break;

    case 633:
        if (DEBUG) {
            System.out.println("ShiftExpression_NotName ::= Name UNSIGNED_RIGHT_SHIFT..."); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.UNSIGNED_RIGHT_SHIFT);
        break;

    case 635:
        if (DEBUG) {
            System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.LESS);
        break;

    case 636:
        if (DEBUG) {
            System.out.println("RelationalExpression_NotName ::= Name LESS..."); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.LESS);
        break;

    case 637:
        if (DEBUG) {
            System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.GREATER);
        break;

    case 638:
        if (DEBUG) {
            System.out.println("RelationalExpression_NotName ::= Name GREATER..."); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.GREATER);
        break;

    case 639:
        if (DEBUG) {
            System.out.println("RelationalExpression_NotName ::=..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.LESS_EQUAL);
        break;

    case 640:
        if (DEBUG) {
            System.out.println("RelationalExpression_NotName ::= Name LESS_EQUAL..."); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.LESS_EQUAL);
        break;

    case 641:
        if (DEBUG) {
            System.out.println("RelationalExpression_NotName ::=..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.GREATER_EQUAL);
        break;

    case 642:
        if (DEBUG) {
            System.out.println("RelationalExpression_NotName ::= Name GREATER_EQUAL..."); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.GREATER_EQUAL);
        break;

    case 644:
        if (DEBUG) {
            System.out.println("InstanceofExpression_NotName ::= Name instanceof..."); //$NON-NLS-1$
        }
        consumeInstanceOfExpressionWithName();
        break;

    case 645:
        if (DEBUG) {
            System.out.println("InstanceofExpression_NotName ::=..."); //$NON-NLS-1$
        }
        consumeInstanceOfExpression();
        break;

    case 647:
        if (DEBUG) {
            System.out.println("EqualityExpression_NotName ::=..."); //$NON-NLS-1$
        }
        consumeEqualityExpression(OperatorIds.EQUAL_EQUAL);
        break;

    case 648:
        if (DEBUG) {
            System.out.println("EqualityExpression_NotName ::= Name EQUAL_EQUAL..."); //$NON-NLS-1$
        }
        consumeEqualityExpressionWithName(OperatorIds.EQUAL_EQUAL);
        break;

    case 649:
        if (DEBUG) {
            System.out.println("EqualityExpression_NotName ::=..."); //$NON-NLS-1$
        }
        consumeEqualityExpression(OperatorIds.NOT_EQUAL);
        break;

    case 650:
        if (DEBUG) {
            System.out.println("EqualityExpression_NotName ::= Name NOT_EQUAL..."); //$NON-NLS-1$
        }
        consumeEqualityExpressionWithName(OperatorIds.NOT_EQUAL);
        break;

    case 652:
        if (DEBUG) {
            System.out.println("AndExpression_NotName ::= AndExpression_NotName AND..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.AND);
        break;

    case 653:
        if (DEBUG) {
            System.out.println("AndExpression_NotName ::= Name AND EqualityExpression"); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.AND);
        break;

    case 655:
        if (DEBUG) {
            System.out.println("ExclusiveOrExpression_NotName ::=..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.XOR);
        break;

    case 656:
        if (DEBUG) {
            System.out.println("ExclusiveOrExpression_NotName ::= Name XOR AndExpression"); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.XOR);
        break;

    case 658:
        if (DEBUG) {
            System.out.println("InclusiveOrExpression_NotName ::=..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.OR);
        break;

    case 659:
        if (DEBUG) {
            System.out.println("InclusiveOrExpression_NotName ::= Name OR..."); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.OR);
        break;

    case 661:
        if (DEBUG) {
            System.out.println("ConditionalAndExpression_NotName ::=..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.AND_AND);
        break;

    case 662:
        if (DEBUG) {
            System.out.println("ConditionalAndExpression_NotName ::= Name AND_AND..."); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.AND_AND);
        break;

    case 664:
        if (DEBUG) {
            System.out.println("ConditionalOrExpression_NotName ::=..."); //$NON-NLS-1$
        }
        consumeBinaryExpression(OperatorIds.OR_OR);
        break;

    case 665:
        if (DEBUG) {
            System.out.println("ConditionalOrExpression_NotName ::= Name OR_OR..."); //$NON-NLS-1$
        }
        consumeBinaryExpressionWithName(OperatorIds.OR_OR);
        break;

    case 667:
        if (DEBUG) {
            System.out.println("ConditionalExpression_NotName ::=..."); //$NON-NLS-1$
        }
        consumeConditionalExpression(OperatorIds.QUESTIONCOLON);
        break;

    case 668:
        if (DEBUG) {
            System.out.println("ConditionalExpression_NotName ::= Name QUESTION..."); //$NON-NLS-1$
        }
        consumeConditionalExpressionWithName(OperatorIds.QUESTIONCOLON);
        break;

    case 672:
        if (DEBUG) {
            System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); //$NON-NLS-1$
        }
        consumeAnnotationTypeDeclarationHeaderName();
        break;

    case 673:
        if (DEBUG) {
            System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); //$NON-NLS-1$
        }
        consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters();
        break;

    case 674:
        if (DEBUG) {
            System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); //$NON-NLS-1$
        }
        consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters();
        break;

    case 675:
        if (DEBUG) {
            System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); //$NON-NLS-1$
        }
        consumeAnnotationTypeDeclarationHeaderName();
        break;

    case 676:
        if (DEBUG) {
            System.out.println("AnnotationTypeDeclarationHeader ::=..."); //$NON-NLS-1$
        }
        consumeAnnotationTypeDeclarationHeader();
        break;

    case 677:
        if (DEBUG) {
            System.out.println("AnnotationTypeDeclaration ::=..."); //$NON-NLS-1$
        }
        consumeAnnotationTypeDeclaration();
        break;

    case 679:
        if (DEBUG) {
            System.out.println("AnnotationTypeMemberDeclarationsopt ::="); //$NON-NLS-1$
        }
        consumeEmptyAnnotationTypeMemberDeclarationsopt();
        break;

    case 680:
        if (DEBUG) {
            System.out.println("AnnotationTypeMemberDeclarationsopt ::= NestedType..."); //$NON-NLS-1$
        }
        consumeAnnotationTypeMemberDeclarationsopt();
        break;

    case 682:
        if (DEBUG) {
            System.out.println("AnnotationTypeMemberDeclarations ::=..."); //$NON-NLS-1$
        }
        consumeAnnotationTypeMemberDeclarations();
        break;

    case 683:
        if (DEBUG) {
            System.out.println("AnnotationMethodHeaderName ::= Modifiersopt..."); //$NON-NLS-1$
        }
        consumeMethodHeaderNameWithTypeParameters(true);
        break;

    case 684:
        if (DEBUG) {
            System.out.println("AnnotationMethodHeaderName ::= Modifiersopt Type..."); //$NON-NLS-1$
        }
        consumeMethodHeaderName(true);
        break;

    case 685:
        if (DEBUG) {
            System.out.println("AnnotationMethodHeaderDefaultValueopt ::="); //$NON-NLS-1$
        }
        consumeEmptyMethodHeaderDefaultValue();
        break;

    case 686:
        if (DEBUG) {
            System.out.println("AnnotationMethodHeaderDefaultValueopt ::= DefaultValue"); //$NON-NLS-1$
        }
        consumeMethodHeaderDefaultValue();
        break;

    case 687:
        if (DEBUG) {
            System.out.println("AnnotationMethodHeader ::= AnnotationMethodHeaderName..."); //$NON-NLS-1$
        }
        consumeMethodHeader();
        break;

    case 688:
        if (DEBUG) {
            System.out.println("AnnotationTypeMemberDeclaration ::=..."); //$NON-NLS-1$
        }
        consumeAnnotationTypeMemberDeclaration();
        break;

    case 696:
        if (DEBUG) {
            System.out.println("AnnotationName ::= AT Name"); //$NON-NLS-1$
        }
        consumeAnnotationName();
        break;

    case 697:
        if (DEBUG) {
            System.out.println("NormalAnnotation ::= AnnotationName LPAREN..."); //$NON-NLS-1$
        }
        consumeNormalAnnotation();
        break;

    case 698:
        if (DEBUG) {
            System.out.println("MemberValuePairsopt ::="); //$NON-NLS-1$
        }
        consumeEmptyMemberValuePairsopt();
        break;

    case 701:
        if (DEBUG) {
            System.out.println("MemberValuePairs ::= MemberValuePairs COMMA..."); //$NON-NLS-1$
        }
        consumeMemberValuePairs();
        break;

    case 702:
        if (DEBUG) {
            System.out.println("MemberValuePair ::= SimpleName EQUAL EnterMemberValue..."); //$NON-NLS-1$
        }
        consumeMemberValuePair();
        break;

    case 703:
        if (DEBUG) {
            System.out.println("EnterMemberValue ::="); //$NON-NLS-1$
        }
        consumeEnterMemberValue();
        break;

    case 704:
        if (DEBUG) {
            System.out.println("ExitMemberValue ::="); //$NON-NLS-1$
        }
        consumeExitMemberValue();
        break;

    case 706:
        if (DEBUG) {
            System.out.println("MemberValue ::= Name"); //$NON-NLS-1$
        }
        consumeMemberValueAsName();
        break;

    case 709:
        if (DEBUG) {
            System.out.println("MemberValueArrayInitializer ::=..."); //$NON-NLS-1$
        }
        consumeMemberValueArrayInitializer();
        break;

    case 710:
        if (DEBUG) {
            System.out.println("MemberValueArrayInitializer ::=..."); //$NON-NLS-1$
        }
        consumeMemberValueArrayInitializer();
        break;

    case 711:
        if (DEBUG) {
            System.out.println("MemberValueArrayInitializer ::=..."); //$NON-NLS-1$
        }
        consumeEmptyMemberValueArrayInitializer();
        break;

    case 712:
        if (DEBUG) {
            System.out.println("MemberValueArrayInitializer ::=..."); //$NON-NLS-1$
        }
        consumeEmptyMemberValueArrayInitializer();
        break;

    case 713:
        if (DEBUG) {
            System.out.println("EnterMemberValueArrayInitializer ::="); //$NON-NLS-1$
        }
        consumeEnterMemberValueArrayInitializer();
        break;

    case 715:
        if (DEBUG) {
            System.out.println("MemberValues ::= MemberValues COMMA MemberValue"); //$NON-NLS-1$
        }
        consumeMemberValues();
        break;

    case 716:
        if (DEBUG) {
            System.out.println("MarkerAnnotation ::= AnnotationName"); //$NON-NLS-1$
        }
        consumeMarkerAnnotation();
        break;

    case 717:
        if (DEBUG) {
            System.out.println("SingleMemberAnnotationMemberValue ::= MemberValue"); //$NON-NLS-1$
        }
        consumeSingleMemberAnnotationMemberValue();
        break;

    case 718:
        if (DEBUG) {
            System.out.println("SingleMemberAnnotation ::= AnnotationName LPAREN..."); //$NON-NLS-1$
        }
        consumeSingleMemberAnnotation();
        break;

    case 719:
        if (DEBUG) {
            System.out.println("RecoveryMethodHeaderName ::= Modifiersopt TypeParameters"); //$NON-NLS-1$
        }
        consumeRecoveryMethodHeaderNameWithTypeParameters();
        break;

    case 720:
        if (DEBUG) {
            System.out.println("RecoveryMethodHeaderName ::= Modifiersopt Type..."); //$NON-NLS-1$
        }
        consumeRecoveryMethodHeaderName();
        break;

    case 721:
        if (DEBUG) {
            System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); //$NON-NLS-1$
        }
        consumeMethodHeader();
        break;

    case 722:
        if (DEBUG) {
            System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); //$NON-NLS-1$
        }
        consumeMethodHeader();
        break;

    }
}

From source file:org.eclipse.objectteams.otdt.internal.core.compiler.lifting.Lifting.java

License:Open Source License

/**
 * If a base class is an externalized role, lifting must check, whether the base object
 * actually belongs to the team given in the externalized role's team anchor.
 * (assuming: class R playedBy teamAnchor.BaseRole)
 *///from w  w w  .  j a  va 2s . c o  m
private Statement maybeCreateTeamMemberCheck(ReferenceBinding baseClass) {
    // if (((<__OT__BaseRole>)base).getTeam() != <teamAnchor>)
    //     throw new LiftingVetoException(this, base);
    if (!(baseClass instanceof RoleTypeBinding))
        return this._gen.emptyStatement();
    RoleTypeBinding baseRole = (RoleTypeBinding) baseClass;
    if (!baseRole.hasExplicitAnchor())
        return this._gen.emptyStatement();
    NameReference anchorRef;
    ITeamAnchor[] bestNamePath = baseRole._teamAnchor.getBestNamePath();
    if (bestNamePath.length == 1) {
        anchorRef = this._gen.singleNameReference(baseRole._teamAnchor.internalName());
    } else {
        char[][] names = new char[bestNamePath.length][];
        for (int i = 0; i < names.length; i++)
            names[i] = bestNamePath[i].internalName();
        anchorRef = this._gen.qualifiedNameReference(names);
    }
    return this._gen.ifStatement(
            new EqualExpression(this._gen.messageSend(this._gen.baseNameReference(BASE), _OT_GETTEAM, null),
                    anchorRef, OperatorIds.NOT_EQUAL),
            this._gen.block(new Statement[] { this._gen.throwStatement(this._gen.allocation(
                    this._gen.qualifiedTypeReference(ORG_OBJECTTEAMS_LIFTING_VETO),
                    new Expression[] { this._gen.thisReference(), this._gen.singleNameReference(BASE) })) }));
}

From source file:org.eclipse.objectteams.otdt.internal.core.compiler.statemachine.transformer.ReflectionGenerator.java

License:Open Source License

private static Statement createRemoveIfFound(AstGenerator gen, WeavingScheme weavingScheme) {
    /*/*from www .  j  a v a2s. c o  m*/
     * For the end of unregisterRole(Object) create:
     *       if (first_cache != null && found_base != null) { // ensure no null problems against either variable
     *          first_cache.remove(_OT$base_arg);
     *          ((IBoundBase)found_base)._OT$removeRole(_OT$role_arg);
     *      }
     */
    return gen.ifStatement(new AND_AND_Expression(
            new EqualExpression(gen.singleNameReference(FIRST_CACHE), gen.nullLiteral(), OperatorIds.NOT_EQUAL),
            new EqualExpression(gen.singleNameReference(FOUND_BASE), gen.nullLiteral(), OperatorIds.NOT_EQUAL),
            OperatorIds.AND_AND),
            gen.block(new Statement[] {
                    gen.messageSend(gen.singleNameReference(FIRST_CACHE), REMOVE,
                            new Expression[] { gen.singleNameReference(FOUND_BASE) }),
                    // OTDYN: Slightly different methods depending on the weaving strategy:
                    weavingScheme == WeavingScheme.OTDRE
                            ? gen.messageSend(
                                    gen.castExpression(
                                            gen.singleNameReference(FOUND_BASE), gen.qualifiedTypeReference(
                                                    ORG_OBJECTTEAMS_IBOUNDBASE2),
                                            CastExpression.RAW),
                                    ADD_REMOVE_ROLE,
                                    new Expression[] { gen.singleNameReference(_OT_ROLE_ARG),
                                            gen.booleanLiteral(false) }) // isAdding=false
                            : gen.messageSend(gen.castExpression(gen.singleNameReference(FOUND_BASE),
                                    gen.qualifiedTypeReference(ORG_OBJECTTEAMS_IBOUNDBASE), CastExpression.RAW),
                                    REMOVE_ROLE,
                                    new Expression[] { gen.singleNameReference(_OT_ROLE_ARG) }) }));
}