diff --git a/org.eclipse.jdt.core.compiler.batch/grammar/java.g b/org.eclipse.jdt.core.compiler.batch/grammar/java.g index 13476148fe9..9d80bb5e0d3 100644 --- a/org.eclipse.jdt.core.compiler.batch/grammar/java.g +++ b/org.eclipse.jdt.core.compiler.batch/grammar/java.g @@ -114,7 +114,7 @@ $Terminals ElidedSemicolonAndRightBrace AT308 AT308DOTDOTDOT - BeginCaseExpr + CaseArrow RestrictedIdentifierYield RestrictedIdentifierrecord RestrictedIdentifiersealed @@ -226,9 +226,6 @@ Goal ::= '(' ParenthesizedCastNameAndBounds Goal ::= '<' ReferenceExpressionTypeArgumentsAndTrunk -- JSR 308 Reconnaissance mission. Goal ::= '@' TypeAnnotations --- JSR 354 Reconnaissance mission. -Goal ::= '->' YieldStatement -Goal ::= '->' SwitchLabelCaseLhs -- JEP 409 Sealed types Reconnaissance mission. Goal ::= RestrictedIdentifiersealed Modifiersopt Goal ::= RestrictedIdentifierpermits PermittedTypes @@ -1491,16 +1488,16 @@ IfThenElseStatementNoShortIf ::= 'if' '(' Expression ')' PostExpressionInIf Stat /:$readableName IfStatement:/ SwitchStatement ::= 'switch' '(' Expression ')' PostExpressionInSwitchStatement OpenBlock SwitchBlock -/.$putCase consumeStatementSwitch() ; $break ./ +/.$putCase consumeSwitchStatementOrExpression(true) ; $break ./ /:$readableName SwitchStatement:/ SwitchBlock ::= '{' '}' -/.$putCase consumeEmptySwitchBlock() ; $break ./ +/.$putCase consumeSwitchBlock(false) ; $break ./ -SwitchBlock ::= '{' SwitchBlockStatements '}' -SwitchBlock ::= '{' SwitchLabels '}' +SwitchBlock -> '{' SwitchBlockStatements '}' +SwitchBlock -> '{' SwitchLabels '}' SwitchBlock ::= '{' SwitchBlockStatements SwitchLabels '}' -/.$putCase consumeSwitchBlock() ; $break ./ +/.$putCase consumeSwitchBlock(true) ; $break ./ /:$readableName SwitchBlock:/ SwitchBlockStatements -> SwitchBlockStatement @@ -1508,20 +1505,24 @@ SwitchBlockStatements ::= SwitchBlockStatements SwitchBlockStatement /.$putCase consumeSwitchBlockStatements() ; $break ./ /:$readableName SwitchBlockStatements:/ -SwitchBlockStatement -> SwitchLabeledRule +SwitchBlockStatement -> SwitchRule SwitchBlockStatement ::= SwitchLabels BlockStatements /.$putCase consumeSwitchBlockStatement() ; $break ./ /:$readableName SwitchBlockStatement:/ -SwitchLabels -> SwitchLabel -SwitchLabels ::= SwitchLabels SwitchLabel -/.$putCase consumeSwitchLabels() ; $break ./ -/:$readableName SwitchLabels:/ +SwitchLabels ::= SwitchLabel ':' +/.$putCase consumeSwitchLabels(false, false) ; $break ./ +SwitchLabels ::= SwitchLabels SwitchLabel ':' +/.$putCase consumeSwitchLabels(true, false) ; $break ./ +/:$readableName SwitchLabel:/ + +PostCaseArrow ::= $empty +/.$putCase consumeSwitchLabels(false, true) ; $break ./ -SwitchLabel ::= SwitchLabelCaseLhs ':' -/. $putCase consumeCaseLabel(); $break ./ +SwitchLabel -> SwitchLabelCaseLhs +/:$readableName SwitchLabel:/ -SwitchLabel ::= 'default' ':' +SwitchLabel ::= 'default' /. $putCase consumeDefaultLabel(); $break ./ /:$readableName SwitchLabel:/ @@ -1531,34 +1532,20 @@ UnaryExpressionNotPlusMinus -> SwitchExpression UnaryExpressionNotPlusMinus_NotName -> SwitchExpression SwitchExpression ::= 'switch' '(' Expression ')' PostExpressionInSwitchExpression OpenBlock SwitchBlock -/.$putCase consumeSwitchExpression() ; $break ./ +/.$putCase consumeSwitchStatementOrExpression(false) ; $break ./ /:$readableName SwitchExpression:/ -SwitchLabeledRule ::= SwitchLabeledExpression -SwitchLabeledRule ::= SwitchLabeledBlock -SwitchLabeledRule ::= SwitchLabeledThrowStatement -/. $putCase consumeSwitchLabeledRule(); $break ./ -/:$readableName SwitchLabeledRule:/ - -SwitchLabeledExpression ::= SwitchLabelExpr Expression ';' -/. $putCase consumeSwitchLabeledExpression(); $break ./ -/:$readableName SwitchLabeledExpression:/ +SwitchRule ::= SwitchLabel CaseArrow PostCaseArrow Expression ';' +/. $putCase consumeSwitchRule(SwitchRuleKind.EXPRESSION); $break ./ +/:$readableName SwitchRule:/ -SwitchLabeledBlock ::= SwitchLabelExpr Block -/. $putCase consumeSwitchLabeledBlock(); $break ./ -/:$readableName SwitchLabeledBlock:/ +SwitchRule ::= SwitchLabel CaseArrow PostCaseArrow Block +/. $putCase consumeSwitchRule(SwitchRuleKind.BLOCK); $break ./ +/:$readableName SwitchRule:/ -SwitchLabeledThrowStatement ::= SwitchLabelExpr ThrowExpression ';' -/. $putCase consumeSwitchLabeledThrowStatement(); $break ./ -/:$readableName SwitchLabeledThrowStatement:/ - -SwitchLabelExpr ::= 'default' '->' -/. $putCase consumeDefaultLabelExpr(); $break ./ -/:$readableName SwitchLabelDefaultExpr:/ - -SwitchLabelExpr ::= SwitchLabelCaseLhs BeginCaseExpr '->' -/. $putCase consumeCaseLabelExpr(); $break ./ -/:$readableName SwitchLabelExpr:/ +SwitchRule ::= SwitchLabel CaseArrow PostCaseArrow ThrowStatement +/. $putCase consumeSwitchRule(SwitchRuleKind.THROW); $break ./ +/:$readableName SwitchRule:/ SwitchLabelCaseLhs ::= 'case' CaseLabelElements /. $putCase consumeSwitchLabelCaseLhs(); $break ./ @@ -1669,10 +1656,6 @@ ThrowStatement ::= 'throw' Expression ';' /.$putCase consumeStatementThrow(); $break ./ /:$readableName ThrowStatement:/ -ThrowExpression ::= 'throw' Expression -/.$putCase consumeThrowExpression() ; $break ./ -/:$readableName ThrowExpression:/ - SynchronizedStatement ::= OnlySynchronized '(' Expression ')' Block /.$putCase consumeStatementSynchronized(); $break ./ /:$readableName SynchronizedStatement:/ @@ -3191,4 +3174,3 @@ UNDERSCORE ::= '_' $end -- need a carriage return after the $end - diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java index 7188e517e84..e2d7b8141fe 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java @@ -202,31 +202,30 @@ public ResolvedCase[] resolveCase(BlockScope scope, TypeBinding switchExpression for (Expression e : this.constantExpressions) { count++; if (e instanceof FakeDefaultLiteral) { + switchStatement.containsPatterns = switchStatement.isNonTraditional = true; checkDuplicateDefault(scope, switchStatement, this.constantExpressions.length > 1 ? e : this); - if (count != 2 || nullCaseCount < 1) { + if (count != 2 || nullCaseCount < 1) scope.problemReporter().patternSwitchCaseDefaultOnlyAsSecond(e); - } continue; } if (e instanceof NullLiteral) { - if (switchStatement.nullCase == null) { + switchStatement.containsNull = switchStatement.isNonTraditional = true; + if (switchStatement.nullCase == null) switchStatement.nullCase = this; - } nullCaseCount++; - if (count > 1 && nullCaseCount < 2) { + if (count > 1 && nullCaseCount < 2) scope.problemReporter().patternSwitchNullOnlyOrFirstWithDefault(e); - } } // tag constant name with enum type for privileged access to its members - if (switchExpressionType != null && switchExpressionType.isEnum() && (e instanceof SingleNameReference)) { + if (switchExpressionType != null && switchExpressionType.isEnum() && (e instanceof SingleNameReference)) ((SingleNameReference) e).setActualReceiverType((ReferenceBinding)switchExpressionType); - } else if (e instanceof FakeDefaultLiteral) { - continue; // already processed - } + e.setExpressionContext(ExpressionContext.TESTING_CONTEXT); - if (e instanceof Pattern p) + if (e instanceof Pattern p) { + switchStatement.containsPatterns = switchStatement.isNonTraditional = true; p.setOuterExpressionType(switchExpressionType); + } TypeBinding caseType = e.resolveType(scope); @@ -235,7 +234,6 @@ public ResolvedCase[] resolveCase(BlockScope scope, TypeBinding switchExpression continue; } - if (caseType.isValidBinding()) { if (e instanceof Pattern) { for (Pattern p : ((Pattern) e).getAlternatives()) { diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java index e5b681457f3..1358b240c24 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java @@ -1085,37 +1085,29 @@ boolean isAllowedType(TypeBinding type) { @Override public void resolve(BlockScope upperScope) { try { - boolean isStringSwitch = false; TypeBinding expressionType = this.expression.resolveType(upperScope); CompilerOptions compilerOptions = upperScope.compilerOptions(); if (expressionType != null) { this.expression.computeConversion(upperScope, expressionType, expressionType); checkType: { + if (!expressionType.isValidBinding()) { expressionType = null; // fault-tolerance: ignore type mismatch from constants from hereon break checkType; - } else if (expressionType.isBaseType()) { - if (JavaFeature.PRIMITIVES_IN_PATTERNS.isSupported(compilerOptions)) { + } + + if (expressionType.isBaseType()) { + if (JavaFeature.PRIMITIVES_IN_PATTERNS.isSupported(compilerOptions)) this.isPrimitiveSwitch = true; - } if (this.expression.isConstantValueOfTypeAssignableToType(expressionType, TypeBinding.INT)) break checkType; if (expressionType.isCompatibleWith(TypeBinding.INT)) break checkType; - } else if (expressionType.isEnum()) { - break checkType; - } else if (!this.containsPatterns && !this.containsNull && upperScope.isBoxingCompatibleWith(expressionType, TypeBinding.INT)) { - this.expression.computeConversion(upperScope, TypeBinding.INT, expressionType); - break checkType; - } else if (expressionType.id == TypeIds.T_JavaLangString) { - if (this.containsPatterns || this.containsNull) { - isStringSwitch = !JavaFeature.PATTERN_MATCHING_IN_SWITCH.isSupported(compilerOptions); - this.isNonTraditional = true; - break checkType; - } - isStringSwitch = true; - break checkType; } + + if (expressionType.id == TypeIds.T_JavaLangString || expressionType.isEnum() || upperScope.isBoxingCompatibleWith(expressionType, TypeBinding.INT)) + break checkType; + if (!JavaFeature.PATTERN_MATCHING_IN_SWITCH.isSupported(compilerOptions) || (expressionType.isBaseType() && expressionType.id != T_null && expressionType.id != T_void)) { if (!this.isPrimitiveSwitch) { // when isPrimitiveSwitch is set it is approved above upperScope.problemReporter().incorrectSwitchType(this.expression, expressionType); @@ -1126,16 +1118,10 @@ public void resolve(BlockScope upperScope) { } } } - if (isStringSwitch) { - // the secret variable should be created before iterating over the switch's statements that could - // create more locals. This must be done to prevent overlapping of locals - // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=356002 - this.dispatchStringCopy = new LocalVariableBinding(SecretStringVariableName, upperScope.getJavaLangString(), ClassFileConstants.AccDefault, false); - upperScope.addLocalVariable(this.dispatchStringCopy); - this.dispatchStringCopy.setConstant(Constant.NotAConstant); - this.dispatchStringCopy.useFlag = LocalVariableBinding.USED; - } - addSecretPatternSwitchVariables(upperScope); + + if (expressionType != null) + reserveSecretVariablesSlots(upperScope); + if (this.statements != null) { if (this.scope == null) this.scope = new BlockScope(upperScope); @@ -1258,12 +1244,22 @@ && defaultFound && isExhaustive()) { upperScope.problemReporter().undocumentedEmptyBlock(this.blockStart, this.sourceEnd); } } - // Try it again in case we found any qualified enums. - if (this.dispatchPatternCopy == null) { - addSecretPatternSwitchVariables(upperScope); - } - complainIfNotExhaustiveSwitch(upperScope, expressionType, compilerOptions); + if (expressionType != null) { + if (!expressionType.isBaseType() && upperScope.isBoxingCompatibleWith(expressionType, TypeBinding.INT)) { + if (this.containsPatterns || this.containsNull) { + if (!JavaFeature.PATTERN_MATCHING_IN_SWITCH.isSupported(compilerOptions) || (expressionType.isBaseType() && expressionType.id != T_null && expressionType.id != T_void)) { + if (!this.isPrimitiveSwitch) { // when isPrimitiveSwitch is set it is approved above + upperScope.problemReporter().incorrectSwitchType(this.expression, expressionType); + expressionType = null; // fault-tolerance: ignore type mismatch from constants from hereon + } + } + } else + this.expression.computeConversion(upperScope, TypeBinding.INT, expressionType); + } + releaseUnusedSecretVariables(upperScope); + complainIfNotExhaustiveSwitch(upperScope, expressionType, compilerOptions); + } } finally { if (this.scope != null) this.scope.enclosingCase = null; // no longer inside switch case block @@ -1473,19 +1469,36 @@ private boolean needPatternDispatchCopy() { } return !(eType.isPrimitiveOrBoxedPrimitiveType() || eType.isEnum() || eType.id == TypeIds.T_JavaLangString); // classic selectors } - private void addSecretPatternSwitchVariables(BlockScope upperScope) { + + private void reserveSecretVariablesSlots(BlockScope upperScope) { // may be released later if unused. + + if (this.expression.resolvedType.id == T_JavaLangString) { + this.dispatchStringCopy = new LocalVariableBinding(SecretStringVariableName, upperScope.getJavaLangString(), ClassFileConstants.AccDefault, false); + upperScope.addLocalVariable(this.dispatchStringCopy); + this.dispatchStringCopy.setConstant(Constant.NotAConstant); + } + + this.scope = new BlockScope(upperScope); + + this.dispatchPatternCopy = new LocalVariableBinding(SecretPatternVariableName, this.expression.resolvedType, ClassFileConstants.AccDefault, false); + this.scope.addLocalVariable(this.dispatchPatternCopy); + this.dispatchPatternCopy.setConstant(Constant.NotAConstant); + + this.restartIndexLocal = new LocalVariableBinding(SecretPatternRestartIndexName, TypeBinding.INT, ClassFileConstants.AccDefault, false); + this.scope.addLocalVariable(this.restartIndexLocal); + this.restartIndexLocal.setConstant(Constant.NotAConstant); + } + + private void releaseUnusedSecretVariables(BlockScope upperScope) { + if (this.expression.resolvedType.id == T_JavaLangString && !this.isNonTraditional) + this.dispatchStringCopy.useFlag = LocalVariableBinding.USED; + if (needPatternDispatchCopy()) { - this.scope = new BlockScope(upperScope); - this.dispatchPatternCopy = new LocalVariableBinding(SecretPatternVariableName, this.expression.resolvedType, ClassFileConstants.AccDefault, false); - this.scope.addLocalVariable(this.dispatchPatternCopy); - this.dispatchPatternCopy.setConstant(Constant.NotAConstant); this.dispatchPatternCopy.useFlag = LocalVariableBinding.USED; - this.restartIndexLocal = new LocalVariableBinding(SecretPatternRestartIndexName, TypeBinding.INT, ClassFileConstants.AccDefault, false); - this.scope.addLocalVariable(this.restartIndexLocal); - this.restartIndexLocal.setConstant(Constant.NotAConstant); this.restartIndexLocal.useFlag = LocalVariableBinding.USED; } } + protected void reportMissingEnumConstantCase(BlockScope upperScope, FieldBinding enumConstant) { upperScope.problemReporter().missingEnumConstantCase(this, enumConstant); } diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/Parser.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/Parser.java index d8b236d3972..e7885703b7e 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/Parser.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/Parser.java @@ -151,6 +151,13 @@ protected enum CaseLabelKind { CASE_DEFAULT, CASE_PATTERN } + + protected enum SwitchRuleKind { + EXPRESSION, + BLOCK, + THROW, + } + // resumeOnSyntaxError codes: protected static final int HALT = 0; // halt and throw up hands. protected static final int RESTART = 1; // stacks adjusted, alternate goal from check point. @@ -870,9 +877,6 @@ protected int actFromTokenOrSynthetic(int previousAct) { protected int forStartPosition = 0; protected int nestedType, dimensions, switchNestingLevel; -// /* package */ int caseLevel; -// protected int casePtr; - protected Map caseStartMap = new HashMap<>(); ASTNode [] noAstNodes = new ASTNode[AstStackIncrement]; Expression [] noExpressions = new Expression[ExpressionStackIncrement]; @@ -936,8 +940,6 @@ protected int actFromTokenOrSynthetic(int previousAct) { private boolean reparsingFunctionalExpression = false; private Map recordNestedMethodLevels; -private Map recordPatternSwitches; -private Map recordNullSwitches; public Parser () { // Caveat Emptor: For inheritance purposes and then only in very special needs. Only minimal state is initialized ! @@ -970,8 +972,6 @@ public Parser(ProblemReporter problemReporter, boolean optimizeStringLiterals) { this.variablesCounter = new int[30]; this.recordNestedMethodLevels = new HashMap<>(); - this.recordPatternSwitches = new HashMap<>(); - this.recordNullSwitches = new HashMap<>(); // javadoc support this.javadocParser = createJavadocParser(); @@ -2191,38 +2191,6 @@ protected void consumeBlockStatements() { // BlockStatements ::= BlockStatements BlockStatement concatNodeLists(); } -protected void consumeCaseLabel() { - // SwitchLabel ::= SwitchLabelCaseLhs ':' (where SwitchLabelCaseLhs ::= 'case' CaseLabelElements) - Expression[] labelExpressions = null; - int length = 0; - if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) { - this.expressionPtr -= length; - System.arraycopy( - this.expressionStack, - this.expressionPtr + 1, - labelExpressions = new Expression[length], - 0, - length); - } - CaseStatement caseStatement = new CaseStatement(labelExpressions, this.intStack[this.intPtr--], labelExpressions[length - 1].sourceEnd); - if (labelExpressions.length > 1) { - if (!this.parsingJava14Plus) { - problemReporter().multiConstantCaseLabelsNotSupported(caseStatement); - } - } - // Look for $fall-through$ tag in leading comment for case statement - if (hasLeadingTagComment(FALL_THROUGH_TAG, caseStatement.sourceStart)) { - caseStatement.bits |= ASTNode.DocumentedFallthrough; - } - this.scanner.caseStartPosition = resetCaseStartAndPopPrev(this.switchNestingLevel); - pushOnAstStack(caseStatement); -} -private int resetCaseStartAndPopPrev(int nestingLevel) { - if (nestingLevel >= 0) - this.caseStartMap.put(nestingLevel, -1); - - return this.caseStartMap.containsKey(nestingLevel - 1) ? this.caseStartMap.get(nestingLevel - 1): -1; -} protected void consumeCastExpressionLL1() { //CastExpression ::= '(' Name ')' InsideCastExpressionLL1 UnaryExpressionNotPlusMinus @@ -3157,19 +3125,7 @@ protected void consumeCreateInitializer() { pushOnAstStack(new Initializer(null, 0)); } protected void consumeDefaultLabel() { - // SwitchLabel ::= 'default' ':' - int sourceEnd = this.intStack[this.intPtr--]; - int sourceStart = this.intStack[this.intPtr--]; - - CaseStatement defaultStatement = new CaseStatement(Expression.NO_EXPRESSIONS, sourceStart, sourceEnd); - // Look for $fall-through$ and $CASES-OMITTED$ tags in leading comment for case statement - if (hasLeadingTagComment(FALL_THROUGH_TAG, defaultStatement.sourceStart)) { - defaultStatement.bits |= ASTNode.DocumentedFallthrough; - } - if (hasLeadingTagComment(CASES_OMITTED_TAG, defaultStatement.sourceStart)) { - defaultStatement.bits |= ASTNode.DocumentedCasesOmitted; - } - pushOnAstStack(defaultStatement); + pushOnExpressionStackLengthStack(0); } protected void consumeDefaultModifiers() { checkComment(); // might update modifiers with AccDeprecated @@ -3332,10 +3288,6 @@ protected void consumeEmptyStatement() { pushOnAstStack(new EmptyStatement(this.endPosition + 1, this.endStatementPosition)); } } -protected void consumeEmptySwitchBlock() { - // SwitchBlock ::= '{' '}' - pushOnAstLengthStack(0); -} protected void consumeEmptyTypeDeclaration() { // ClassMemberDeclaration ::= ';' // InterfaceMemberDeclaration ::= ';' @@ -6685,1726 +6637,1717 @@ protected void consumeZeroTypeAnnotations() { // This method is part of an automatic generation : do NOT edit-modify protected void consumeRule(int act) { switch ( act ) { - case 43 : if (DEBUG) { System.out.println("Type ::= PrimitiveType"); } //$NON-NLS-1$ + case 41 : if (DEBUG) { System.out.println("Type ::= PrimitiveType"); } //$NON-NLS-1$ consumePrimitiveType(); break; - case 57 : if (DEBUG) { System.out.println("ReferenceType ::= ClassOrInterfaceType"); } //$NON-NLS-1$ + case 55 : if (DEBUG) { System.out.println("ReferenceType ::= ClassOrInterfaceType"); } //$NON-NLS-1$ consumeReferenceType(); break; - case 61 : if (DEBUG) { System.out.println("ClassOrInterface ::= Name"); } //$NON-NLS-1$ + case 59 : if (DEBUG) { System.out.println("ClassOrInterface ::= Name"); } //$NON-NLS-1$ consumeClassOrInterfaceName(); break; - case 62 : if (DEBUG) { System.out.println("ClassOrInterface ::= GenericType DOT Name"); } //$NON-NLS-1$ + case 60 : if (DEBUG) { System.out.println("ClassOrInterface ::= GenericType DOT Name"); } //$NON-NLS-1$ consumeClassOrInterface(); break; - case 63 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface TypeArguments"); } //$NON-NLS-1$ + case 61 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface TypeArguments"); } //$NON-NLS-1$ consumeGenericType(); break; - case 64 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface LESS GREATER"); } //$NON-NLS-1$ + case 62 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface LESS GREATER"); } //$NON-NLS-1$ consumeGenericTypeWithDiamond(); break; - case 65 : if (DEBUG) { System.out.println("ArrayTypeWithTypeArgumentsName ::= GenericType DOT Name"); } //$NON-NLS-1$ + case 63 : if (DEBUG) { System.out.println("ArrayTypeWithTypeArgumentsName ::= GenericType DOT Name"); } //$NON-NLS-1$ consumeArrayTypeWithTypeArgumentsName(); break; - case 66 : if (DEBUG) { System.out.println("ArrayType ::= PrimitiveType Dims"); } //$NON-NLS-1$ + case 64 : if (DEBUG) { System.out.println("ArrayType ::= PrimitiveType Dims"); } //$NON-NLS-1$ consumePrimitiveArrayType(); break; - case 67 : if (DEBUG) { System.out.println("ArrayType ::= Name Dims"); } //$NON-NLS-1$ + case 65 : if (DEBUG) { System.out.println("ArrayType ::= Name Dims"); } //$NON-NLS-1$ consumeNameArrayType(); break; - case 68 : if (DEBUG) { System.out.println("ArrayType ::= ArrayTypeWithTypeArgumentsName Dims"); } //$NON-NLS-1$ + case 66 : if (DEBUG) { System.out.println("ArrayType ::= ArrayTypeWithTypeArgumentsName Dims"); } //$NON-NLS-1$ consumeGenericTypeNameArrayType(); break; - case 69 : if (DEBUG) { System.out.println("ArrayType ::= GenericType Dims"); } //$NON-NLS-1$ + case 67 : if (DEBUG) { System.out.println("ArrayType ::= GenericType Dims"); } //$NON-NLS-1$ consumeGenericTypeArrayType(); break; - case 71 : if (DEBUG) { System.out.println("Name ::= SimpleName"); } //$NON-NLS-1$ + case 69 : if (DEBUG) { System.out.println("Name ::= SimpleName"); } //$NON-NLS-1$ consumeZeroTypeAnnotations(); break; - case 76 : if (DEBUG) { System.out.println("UnannotatableName ::= UnannotatableName DOT SimpleName"); } //$NON-NLS-1$ + case 74 : if (DEBUG) { System.out.println("UnannotatableName ::= UnannotatableName DOT SimpleName"); } //$NON-NLS-1$ consumeUnannotatableQualifiedName(); break; - case 77 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT SimpleName"); } //$NON-NLS-1$ + case 75 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT SimpleName"); } //$NON-NLS-1$ consumeQualifiedName(false); break; - case 78 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT TypeAnnotations SimpleName"); } //$NON-NLS-1$ + case 76 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT TypeAnnotations SimpleName"); } //$NON-NLS-1$ consumeQualifiedName(true); break; - case 79 : if (DEBUG) { System.out.println("TypeAnnotationsopt ::="); } //$NON-NLS-1$ + case 77 : if (DEBUG) { System.out.println("TypeAnnotationsopt ::="); } //$NON-NLS-1$ consumeZeroTypeAnnotations(); break; - case 83 : if (DEBUG) { System.out.println("TypeAnnotations0 ::= TypeAnnotations0 TypeAnnotation"); } //$NON-NLS-1$ + case 81 : if (DEBUG) { System.out.println("TypeAnnotations0 ::= TypeAnnotations0 TypeAnnotation"); } //$NON-NLS-1$ consumeOneMoreTypeAnnotation(); break; - case 84 : if (DEBUG) { System.out.println("TypeAnnotation ::= NormalTypeAnnotation"); } //$NON-NLS-1$ + case 82 : if (DEBUG) { System.out.println("TypeAnnotation ::= NormalTypeAnnotation"); } //$NON-NLS-1$ consumeTypeAnnotation(); break; - case 85 : if (DEBUG) { System.out.println("TypeAnnotation ::= MarkerTypeAnnotation"); } //$NON-NLS-1$ + case 83 : if (DEBUG) { System.out.println("TypeAnnotation ::= MarkerTypeAnnotation"); } //$NON-NLS-1$ consumeTypeAnnotation(); break; - case 86 : if (DEBUG) { System.out.println("TypeAnnotation ::= SingleMemberTypeAnnotation"); } //$NON-NLS-1$ + case 84 : if (DEBUG) { System.out.println("TypeAnnotation ::= SingleMemberTypeAnnotation"); } //$NON-NLS-1$ consumeTypeAnnotation(); break; - case 87 : if (DEBUG) { System.out.println("TypeAnnotationName ::= AT308 UnannotatableName"); } //$NON-NLS-1$ + case 85 : if (DEBUG) { System.out.println("TypeAnnotationName ::= AT308 UnannotatableName"); } //$NON-NLS-1$ consumeAnnotationName() ; break; - case 88 : if (DEBUG) { System.out.println("NormalTypeAnnotation ::= TypeAnnotationName LPAREN..."); } //$NON-NLS-1$ + case 86 : if (DEBUG) { System.out.println("NormalTypeAnnotation ::= TypeAnnotationName LPAREN..."); } //$NON-NLS-1$ consumeNormalAnnotation(true) ; break; - case 89 : if (DEBUG) { System.out.println("MarkerTypeAnnotation ::= TypeAnnotationName"); } //$NON-NLS-1$ + case 87 : if (DEBUG) { System.out.println("MarkerTypeAnnotation ::= TypeAnnotationName"); } //$NON-NLS-1$ consumeMarkerAnnotation(true) ; break; - case 90 : if (DEBUG) { System.out.println("SingleMemberTypeAnnotation ::= TypeAnnotationName LPAREN"); } //$NON-NLS-1$ + case 88 : if (DEBUG) { System.out.println("SingleMemberTypeAnnotation ::= TypeAnnotationName LPAREN"); } //$NON-NLS-1$ consumeSingleMemberAnnotation(true) ; break; - case 91 : if (DEBUG) { System.out.println("RejectTypeAnnotations ::="); } //$NON-NLS-1$ + case 89 : if (DEBUG) { System.out.println("RejectTypeAnnotations ::="); } //$NON-NLS-1$ consumeNonTypeUseName(); break; - case 92 : if (DEBUG) { System.out.println("PushZeroTypeAnnotations ::="); } //$NON-NLS-1$ + case 90 : if (DEBUG) { System.out.println("PushZeroTypeAnnotations ::="); } //$NON-NLS-1$ consumeZeroTypeAnnotations(); break; - case 93 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= this"); } //$NON-NLS-1$ + case 91 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= this"); } //$NON-NLS-1$ consumeExplicitThisParameter(false); break; - case 94 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= UnannotatableName DOT this"); } //$NON-NLS-1$ + case 92 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= UnannotatableName DOT this"); } //$NON-NLS-1$ consumeExplicitThisParameter(true); break; - case 95 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= VariableDeclaratorId"); } //$NON-NLS-1$ + case 93 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= VariableDeclaratorId"); } //$NON-NLS-1$ consumeVariableDeclaratorIdParameter(); break; - case 96 : if (DEBUG) { System.out.println("CompilationUnit ::= EnterCompilationUnit..."); } //$NON-NLS-1$ + case 94 : if (DEBUG) { System.out.println("CompilationUnit ::= EnterCompilationUnit..."); } //$NON-NLS-1$ consumeCompilationUnit(); break; - case 97 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration"); } //$NON-NLS-1$ + case 95 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration"); } //$NON-NLS-1$ consumeInternalCompilationUnit(); break; - case 98 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$ + case 96 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$ consumeInternalCompilationUnit(); break; - case 99 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$ + case 97 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$ consumeInternalCompilationUnitWithTypes(); break; - case 100 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$ + case 98 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$ consumeInternalCompilationUnitWithTypes(); break; - case 101 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$ + case 99 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$ consumeInternalCompilationUnit(); break; - case 102 : if (DEBUG) { System.out.println("InternalCompilationUnit ::="); } //$NON-NLS-1$ + case 100 : if (DEBUG) { System.out.println("InternalCompilationUnit ::="); } //$NON-NLS-1$ consumeEmptyInternalCompilationUnit(); break; - case 103 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$ + case 101 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$ consumeInternalCompilationUnitWithModuleDeclaration(); break; - case 104 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ModuleDeclaration"); } //$NON-NLS-1$ + case 102 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ModuleDeclaration"); } //$NON-NLS-1$ consumeInternalCompilationUnitWithModuleDeclaration(); break; - case 105 : if (DEBUG) { System.out.println("ModuleDeclaration ::= ModuleHeader ModuleBody"); } //$NON-NLS-1$ + case 103 : if (DEBUG) { System.out.println("ModuleDeclaration ::= ModuleHeader ModuleBody"); } //$NON-NLS-1$ consumeModuleDeclaration(); break; - case 106 : if (DEBUG) { System.out.println("InternalCompilationUnit ::=..."); } //$NON-NLS-1$ + case 104 : if (DEBUG) { System.out.println("InternalCompilationUnit ::=..."); } //$NON-NLS-1$ consumeInternalCompilationUnitWithPotentialImplicitlyDeclaredClass(); break; - case 107 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$ + case 105 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$ consumeInternalCompilationUnitWithPotentialImplicitlyDeclaredClass(); break; - case 108 : if (DEBUG) { System.out.println("ModuleHeader ::= Modifiersopt ModuleModifieropt module"); } //$NON-NLS-1$ + case 106 : if (DEBUG) { System.out.println("ModuleHeader ::= Modifiersopt ModuleModifieropt module"); } //$NON-NLS-1$ consumeModuleHeader(); break; - case 110 : if (DEBUG) { System.out.println("ModuleModifieropt ::= ModuleModifier"); } //$NON-NLS-1$ + case 108 : if (DEBUG) { System.out.println("ModuleModifieropt ::= ModuleModifier"); } //$NON-NLS-1$ consumeModuleModifiers(); break; - case 113 : if (DEBUG) { System.out.println("ModuleStatementsOpt ::="); } //$NON-NLS-1$ + case 111 : if (DEBUG) { System.out.println("ModuleStatementsOpt ::="); } //$NON-NLS-1$ consumeEmptyModuleStatementsOpt(); break; - case 116 : if (DEBUG) { System.out.println("ModuleStatements ::= ModuleStatements ModuleStatement"); } //$NON-NLS-1$ + case 114 : if (DEBUG) { System.out.println("ModuleStatements ::= ModuleStatements ModuleStatement"); } //$NON-NLS-1$ consumeModuleStatements(); break; - case 122 : if (DEBUG) { System.out.println("RequiresStatement ::= SingleRequiresModuleName SEMICOLON"); } //$NON-NLS-1$ + case 120 : if (DEBUG) { System.out.println("RequiresStatement ::= SingleRequiresModuleName SEMICOLON"); } //$NON-NLS-1$ consumeRequiresStatement(); break; - case 123 : if (DEBUG) { System.out.println("SingleRequiresModuleName ::= requires..."); } //$NON-NLS-1$ + case 121 : if (DEBUG) { System.out.println("SingleRequiresModuleName ::= requires..."); } //$NON-NLS-1$ consumeSingleRequiresModuleName(); break; - case 124 : if (DEBUG) { System.out.println("RequiresModifiersopt ::= RequiresModifiers"); } //$NON-NLS-1$ + case 122 : if (DEBUG) { System.out.println("RequiresModifiersopt ::= RequiresModifiers"); } //$NON-NLS-1$ consumeModifiers(); break; - case 125 : if (DEBUG) { System.out.println("RequiresModifiersopt ::="); } //$NON-NLS-1$ + case 123 : if (DEBUG) { System.out.println("RequiresModifiersopt ::="); } //$NON-NLS-1$ consumeDefaultModifiers(); break; - case 127 : if (DEBUG) { System.out.println("RequiresModifiers ::= RequiresModifiers RequiresModifier"); } //$NON-NLS-1$ + case 125 : if (DEBUG) { System.out.println("RequiresModifiers ::= RequiresModifiers RequiresModifier"); } //$NON-NLS-1$ consumeModifiers2(); break; - case 130 : if (DEBUG) { System.out.println("ExportsStatement ::= ExportsHeader TargetModuleListopt"); } //$NON-NLS-1$ + case 128 : if (DEBUG) { System.out.println("ExportsStatement ::= ExportsHeader TargetModuleListopt"); } //$NON-NLS-1$ consumeExportsStatement(); break; - case 131 : if (DEBUG) { System.out.println("ExportsHeader ::= exports SinglePkgName"); } //$NON-NLS-1$ + case 129 : if (DEBUG) { System.out.println("ExportsHeader ::= exports SinglePkgName"); } //$NON-NLS-1$ consumeExportsHeader(); break; - case 133 : if (DEBUG) { System.out.println("TargetModuleListopt ::= to TargetModuleNameList"); } //$NON-NLS-1$ + case 131 : if (DEBUG) { System.out.println("TargetModuleListopt ::= to TargetModuleNameList"); } //$NON-NLS-1$ consumeTargetModuleList(); break; - case 134 : if (DEBUG) { System.out.println("TargetModuleName ::= UnannotatableName"); } //$NON-NLS-1$ + case 132 : if (DEBUG) { System.out.println("TargetModuleName ::= UnannotatableName"); } //$NON-NLS-1$ consumeSingleTargetModuleName(); break; - case 136 : if (DEBUG) { System.out.println("TargetModuleNameList ::= TargetModuleNameList COMMA..."); } //$NON-NLS-1$ + case 134 : if (DEBUG) { System.out.println("TargetModuleNameList ::= TargetModuleNameList COMMA..."); } //$NON-NLS-1$ consumeTargetModuleNameList(); break; - case 137 : if (DEBUG) { System.out.println("SinglePkgName ::= UnannotatableName"); } //$NON-NLS-1$ + case 135 : if (DEBUG) { System.out.println("SinglePkgName ::= UnannotatableName"); } //$NON-NLS-1$ consumeSinglePkgName(); break; - case 138 : if (DEBUG) { System.out.println("OpensStatement ::= OpensHeader TargetModuleListopt..."); } //$NON-NLS-1$ + case 136 : if (DEBUG) { System.out.println("OpensStatement ::= OpensHeader TargetModuleListopt..."); } //$NON-NLS-1$ consumeOpensStatement(); break; - case 139 : if (DEBUG) { System.out.println("OpensHeader ::= opens SinglePkgName"); } //$NON-NLS-1$ + case 137 : if (DEBUG) { System.out.println("OpensHeader ::= opens SinglePkgName"); } //$NON-NLS-1$ consumeOpensHeader(); break; - case 140 : if (DEBUG) { System.out.println("UsesStatement ::= UsesHeader SEMICOLON"); } //$NON-NLS-1$ + case 138 : if (DEBUG) { System.out.println("UsesStatement ::= UsesHeader SEMICOLON"); } //$NON-NLS-1$ consumeUsesStatement(); break; - case 141 : if (DEBUG) { System.out.println("UsesHeader ::= uses Name"); } //$NON-NLS-1$ + case 139 : if (DEBUG) { System.out.println("UsesHeader ::= uses Name"); } //$NON-NLS-1$ consumeUsesHeader(); break; - case 142 : if (DEBUG) { System.out.println("ProvidesStatement ::= ProvidesInterface WithClause..."); } //$NON-NLS-1$ + case 140 : if (DEBUG) { System.out.println("ProvidesStatement ::= ProvidesInterface WithClause..."); } //$NON-NLS-1$ consumeProvidesStatement(); break; - case 143 : if (DEBUG) { System.out.println("ProvidesInterface ::= provides Name"); } //$NON-NLS-1$ + case 141 : if (DEBUG) { System.out.println("ProvidesInterface ::= provides Name"); } //$NON-NLS-1$ consumeProvidesInterface(); break; - case 144 : if (DEBUG) { System.out.println("ServiceImplName ::= Name"); } //$NON-NLS-1$ + case 142 : if (DEBUG) { System.out.println("ServiceImplName ::= Name"); } //$NON-NLS-1$ consumeSingleServiceImplName(); break; - case 146 : if (DEBUG) { System.out.println("ServiceImplNameList ::= ServiceImplNameList COMMA..."); } //$NON-NLS-1$ + case 144 : if (DEBUG) { System.out.println("ServiceImplNameList ::= ServiceImplNameList COMMA..."); } //$NON-NLS-1$ consumeServiceImplNameList(); break; - case 147 : if (DEBUG) { System.out.println("WithClause ::= with ServiceImplNameList"); } //$NON-NLS-1$ + case 145 : if (DEBUG) { System.out.println("WithClause ::= with ServiceImplNameList"); } //$NON-NLS-1$ consumeWithClause(); break; - case 148 : if (DEBUG) { System.out.println("ReduceImports ::="); } //$NON-NLS-1$ + case 146 : if (DEBUG) { System.out.println("ReduceImports ::="); } //$NON-NLS-1$ consumeReduceImports(); break; - case 149 : if (DEBUG) { System.out.println("EnterCompilationUnit ::="); } //$NON-NLS-1$ + case 147 : if (DEBUG) { System.out.println("EnterCompilationUnit ::="); } //$NON-NLS-1$ consumeEnterCompilationUnit(); break; - case 172 : if (DEBUG) { System.out.println("CatchHeader ::= catch LPAREN CatchFormalParameter RPAREN"); } //$NON-NLS-1$ + case 170 : if (DEBUG) { System.out.println("CatchHeader ::= catch LPAREN CatchFormalParameter RPAREN"); } //$NON-NLS-1$ consumeCatchHeader(); break; - case 174 : if (DEBUG) { System.out.println("ImportDeclarations ::= ImportDeclarations..."); } //$NON-NLS-1$ + case 172 : if (DEBUG) { System.out.println("ImportDeclarations ::= ImportDeclarations..."); } //$NON-NLS-1$ consumeImportDeclarations(); break; - case 176 : if (DEBUG) { System.out.println("TypeDeclarations ::= TypeDeclarations TypeDeclaration"); } //$NON-NLS-1$ + case 174 : if (DEBUG) { System.out.println("TypeDeclarations ::= TypeDeclarations TypeDeclaration"); } //$NON-NLS-1$ consumeTypeDeclarations(); break; - case 177 : if (DEBUG) { System.out.println("PackageDeclaration ::= PackageDeclarationName SEMICOLON"); } //$NON-NLS-1$ + case 175 : if (DEBUG) { System.out.println("PackageDeclaration ::= PackageDeclarationName SEMICOLON"); } //$NON-NLS-1$ consumePackageDeclaration(); break; - case 178 : if (DEBUG) { System.out.println("PackageDeclarationName ::= Modifiers package..."); } //$NON-NLS-1$ + case 176 : if (DEBUG) { System.out.println("PackageDeclarationName ::= Modifiers package..."); } //$NON-NLS-1$ consumePackageDeclarationNameWithModifiers(); break; - case 179 : if (DEBUG) { System.out.println("PackageDeclarationName ::= PackageComment package Name"); } //$NON-NLS-1$ + case 177 : if (DEBUG) { System.out.println("PackageDeclarationName ::= PackageComment package Name"); } //$NON-NLS-1$ consumePackageDeclarationName(); break; - case 180 : if (DEBUG) { System.out.println("PackageComment ::="); } //$NON-NLS-1$ + case 178 : if (DEBUG) { System.out.println("PackageComment ::="); } //$NON-NLS-1$ consumePackageComment(); break; - case 185 : if (DEBUG) { System.out.println("SingleTypeImportDeclaration ::=..."); } //$NON-NLS-1$ + case 183 : if (DEBUG) { System.out.println("SingleTypeImportDeclaration ::=..."); } //$NON-NLS-1$ consumeImportDeclaration(); break; - case 186 : if (DEBUG) { System.out.println("SingleTypeImportDeclarationName ::= import Name..."); } //$NON-NLS-1$ + case 184 : if (DEBUG) { System.out.println("SingleTypeImportDeclarationName ::= import Name..."); } //$NON-NLS-1$ consumeSingleTypeImportDeclarationName(); break; - case 187 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclaration ::=..."); } //$NON-NLS-1$ + case 185 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclaration ::=..."); } //$NON-NLS-1$ consumeImportDeclaration(); break; - case 188 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclarationName ::= import Name DOT..."); } //$NON-NLS-1$ + case 186 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclarationName ::= import Name DOT..."); } //$NON-NLS-1$ consumeTypeImportOnDemandDeclarationName(); break; - case 191 : if (DEBUG) { System.out.println("TypeDeclaration ::= SEMICOLON"); } //$NON-NLS-1$ + case 189 : if (DEBUG) { System.out.println("TypeDeclaration ::= SEMICOLON"); } //$NON-NLS-1$ consumeEmptyTypeDeclaration(); break; - case 196 : if (DEBUG) { System.out.println("Modifiers ::= Modifiers Modifier"); } //$NON-NLS-1$ + case 194 : if (DEBUG) { System.out.println("Modifiers ::= Modifiers Modifier"); } //$NON-NLS-1$ consumeModifiers2(); break; - case 210 : if (DEBUG) { System.out.println("Modifier ::= Annotation"); } //$NON-NLS-1$ + case 208 : if (DEBUG) { System.out.println("Modifier ::= Annotation"); } //$NON-NLS-1$ consumeAnnotationAsModifier(); break; - case 211 : if (DEBUG) { System.out.println("ClassDeclaration ::= ClassHeader ClassBody"); } //$NON-NLS-1$ + case 209 : if (DEBUG) { System.out.println("ClassDeclaration ::= ClassHeader ClassBody"); } //$NON-NLS-1$ consumeClassDeclaration(); break; - case 212 : if (DEBUG) { System.out.println("ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt..."); } //$NON-NLS-1$ + case 210 : if (DEBUG) { System.out.println("ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt..."); } //$NON-NLS-1$ consumeClassHeader(); break; - case 213 : if (DEBUG) { System.out.println("ClassHeaderName ::= ClassHeaderName1 TypeParameters"); } //$NON-NLS-1$ + case 211 : if (DEBUG) { System.out.println("ClassHeaderName ::= ClassHeaderName1 TypeParameters"); } //$NON-NLS-1$ consumeTypeHeaderNameWithTypeParameters(); break; - case 215 : if (DEBUG) { System.out.println("ClassHeaderName1 ::= Modifiersopt class Identifier"); } //$NON-NLS-1$ + case 213 : if (DEBUG) { System.out.println("ClassHeaderName1 ::= Modifiersopt class Identifier"); } //$NON-NLS-1$ consumeClassHeaderName1(); break; - case 216 : if (DEBUG) { System.out.println("ClassHeaderExtends ::= extends ClassType"); } //$NON-NLS-1$ + case 214 : if (DEBUG) { System.out.println("ClassHeaderExtends ::= extends ClassType"); } //$NON-NLS-1$ consumeClassHeaderExtends(); break; - case 217 : if (DEBUG) { System.out.println("ClassHeaderImplements ::= implements InterfaceTypeList"); } //$NON-NLS-1$ + case 215 : if (DEBUG) { System.out.println("ClassHeaderImplements ::= implements InterfaceTypeList"); } //$NON-NLS-1$ consumeClassHeaderImplements(); break; - case 219 : if (DEBUG) { System.out.println("InterfaceTypeList ::= InterfaceTypeList COMMA..."); } //$NON-NLS-1$ + case 217 : if (DEBUG) { System.out.println("InterfaceTypeList ::= InterfaceTypeList COMMA..."); } //$NON-NLS-1$ consumeInterfaceTypeList(); break; - case 220 : if (DEBUG) { System.out.println("InterfaceType ::= ClassOrInterfaceType"); } //$NON-NLS-1$ + case 218 : if (DEBUG) { System.out.println("InterfaceType ::= ClassOrInterfaceType"); } //$NON-NLS-1$ consumeInterfaceType(); break; - case 223 : if (DEBUG) { System.out.println("ClassBodyDeclarations ::= ClassBodyDeclarations..."); } //$NON-NLS-1$ + case 221 : if (DEBUG) { System.out.println("ClassBodyDeclarations ::= ClassBodyDeclarations..."); } //$NON-NLS-1$ consumeClassBodyDeclarations(); break; - case 228 : if (DEBUG) { System.out.println("ImplicitlyDeclaredClassBodyDeclarations ::=..."); } //$NON-NLS-1$ + case 226 : if (DEBUG) { System.out.println("ImplicitlyDeclaredClassBodyDeclarations ::=..."); } //$NON-NLS-1$ consumeImplicitlyDeclaredClassBodyDeclarations(); break; - case 229 : if (DEBUG) { System.out.println("ClassBodyDeclaration ::= Diet NestedMethod..."); } //$NON-NLS-1$ + case 227 : if (DEBUG) { System.out.println("ClassBodyDeclaration ::= Diet NestedMethod..."); } //$NON-NLS-1$ consumeClassBodyDeclaration(); break; - case 230 : if (DEBUG) { System.out.println("Diet ::="); } //$NON-NLS-1$ + case 228 : if (DEBUG) { System.out.println("Diet ::="); } //$NON-NLS-1$ consumeDiet(); break; - case 231 : if (DEBUG) { System.out.println("Initializer ::= Diet NestedMethod CreateInitializer..."); } //$NON-NLS-1$ + case 229 : if (DEBUG) { System.out.println("Initializer ::= Diet NestedMethod CreateInitializer..."); } //$NON-NLS-1$ consumeClassBodyDeclaration(); break; - case 232 : if (DEBUG) { System.out.println("CreateInitializer ::="); } //$NON-NLS-1$ + case 230 : if (DEBUG) { System.out.println("CreateInitializer ::="); } //$NON-NLS-1$ consumeCreateInitializer(); break; - case 240 : if (DEBUG) { System.out.println("ClassMemberDeclaration ::= SEMICOLON"); } //$NON-NLS-1$ + case 238 : if (DEBUG) { System.out.println("ClassMemberDeclaration ::= SEMICOLON"); } //$NON-NLS-1$ consumeEmptyTypeDeclaration(); break; - case 243 : if (DEBUG) { System.out.println("FieldDeclaration ::= Modifiersopt Type..."); } //$NON-NLS-1$ + case 241 : if (DEBUG) { System.out.println("FieldDeclaration ::= Modifiersopt Type..."); } //$NON-NLS-1$ consumeFieldDeclaration(); break; - case 245 : if (DEBUG) { System.out.println("VariableDeclarators ::= VariableDeclarators COMMA..."); } //$NON-NLS-1$ + case 243 : if (DEBUG) { System.out.println("VariableDeclarators ::= VariableDeclarators COMMA..."); } //$NON-NLS-1$ consumeVariableDeclarators(); break; - case 248 : if (DEBUG) { System.out.println("EnterVariable ::="); } //$NON-NLS-1$ + case 246 : if (DEBUG) { System.out.println("EnterVariable ::="); } //$NON-NLS-1$ consumeEnterVariable(); break; - case 249 : if (DEBUG) { System.out.println("ExitVariableWithInitialization ::="); } //$NON-NLS-1$ + case 247 : if (DEBUG) { System.out.println("ExitVariableWithInitialization ::="); } //$NON-NLS-1$ consumeExitVariableWithInitialization(); break; - case 250 : if (DEBUG) { System.out.println("ExitVariableWithoutInitialization ::="); } //$NON-NLS-1$ + case 248 : if (DEBUG) { System.out.println("ExitVariableWithoutInitialization ::="); } //$NON-NLS-1$ consumeExitVariableWithoutInitialization(); break; - case 251 : if (DEBUG) { System.out.println("ForceNoDiet ::="); } //$NON-NLS-1$ + case 249 : if (DEBUG) { System.out.println("ForceNoDiet ::="); } //$NON-NLS-1$ consumeForceNoDiet(); break; - case 252 : if (DEBUG) { System.out.println("RestoreDiet ::="); } //$NON-NLS-1$ + case 250 : if (DEBUG) { System.out.println("RestoreDiet ::="); } //$NON-NLS-1$ consumeRestoreDiet(); break; - case 254 : if (DEBUG) { System.out.println("VariableDeclaratorId ::= UNDERSCORE"); } //$NON-NLS-1$ + case 252 : if (DEBUG) { System.out.println("VariableDeclaratorId ::= UNDERSCORE"); } //$NON-NLS-1$ consumeUnnamedVariable(); break; - case 258 : if (DEBUG) { System.out.println("MethodDeclaration ::= MethodHeader MethodBody"); } //$NON-NLS-1$ + case 256 : if (DEBUG) { System.out.println("MethodDeclaration ::= MethodHeader MethodBody"); } //$NON-NLS-1$ // set to true to consume a method with a body consumeMethodDeclaration(true, false); break; - case 259 : if (DEBUG) { System.out.println("MethodDeclaration ::= DefaultMethodHeader MethodBody"); } //$NON-NLS-1$ + case 257 : if (DEBUG) { System.out.println("MethodDeclaration ::= DefaultMethodHeader MethodBody"); } //$NON-NLS-1$ // set to true to consume a method with a body consumeMethodDeclaration(true, true); break; - case 260 : if (DEBUG) { System.out.println("AbstractMethodDeclaration ::= MethodHeader SEMICOLON"); } //$NON-NLS-1$ + case 258 : if (DEBUG) { System.out.println("AbstractMethodDeclaration ::= MethodHeader SEMICOLON"); } //$NON-NLS-1$ // set to false to consume a method without body consumeMethodDeclaration(false, false); break; - case 261 : if (DEBUG) { System.out.println("MethodHeader ::= MethodHeaderName FormalParameterListopt"); } //$NON-NLS-1$ + case 259 : if (DEBUG) { System.out.println("MethodHeader ::= MethodHeaderName FormalParameterListopt"); } //$NON-NLS-1$ consumeMethodHeader(); break; - case 262 : if (DEBUG) { System.out.println("DefaultMethodHeader ::= DefaultMethodHeaderName..."); } //$NON-NLS-1$ + case 260 : if (DEBUG) { System.out.println("DefaultMethodHeader ::= DefaultMethodHeaderName..."); } //$NON-NLS-1$ consumeMethodHeader(); break; - case 263 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt TypeParameters Type..."); } //$NON-NLS-1$ + case 261 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt TypeParameters Type..."); } //$NON-NLS-1$ consumeMethodHeaderNameWithTypeParameters(false); break; - case 264 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt Type Identifier LPAREN"); } //$NON-NLS-1$ + case 262 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt Type Identifier LPAREN"); } //$NON-NLS-1$ consumeMethodHeaderName(false); break; - case 265 : if (DEBUG) { System.out.println("DefaultMethodHeaderName ::= ModifiersWithDefault..."); } //$NON-NLS-1$ + case 263 : if (DEBUG) { System.out.println("DefaultMethodHeaderName ::= ModifiersWithDefault..."); } //$NON-NLS-1$ consumeMethodHeaderNameWithTypeParameters(false); break; - case 266 : if (DEBUG) { System.out.println("DefaultMethodHeaderName ::= ModifiersWithDefault Type..."); } //$NON-NLS-1$ + case 264 : if (DEBUG) { System.out.println("DefaultMethodHeaderName ::= ModifiersWithDefault Type..."); } //$NON-NLS-1$ consumeMethodHeaderName(false); break; - case 267 : if (DEBUG) { System.out.println("ModifiersWithDefault ::= Modifiersopt default..."); } //$NON-NLS-1$ + case 265 : if (DEBUG) { System.out.println("ModifiersWithDefault ::= Modifiersopt default..."); } //$NON-NLS-1$ consumePushCombineModifiers(); break; - case 268 : if (DEBUG) { System.out.println("MethodHeaderRightParen ::= RPAREN"); } //$NON-NLS-1$ + case 266 : if (DEBUG) { System.out.println("MethodHeaderRightParen ::= RPAREN"); } //$NON-NLS-1$ consumeMethodHeaderRightParen(); break; - case 269 : if (DEBUG) { System.out.println("MethodHeaderExtendedDims ::= Dimsopt"); } //$NON-NLS-1$ + case 267 : if (DEBUG) { System.out.println("MethodHeaderExtendedDims ::= Dimsopt"); } //$NON-NLS-1$ consumeMethodHeaderExtendedDims(); break; - case 270 : if (DEBUG) { System.out.println("MethodHeaderThrowsClause ::= throws ClassTypeList"); } //$NON-NLS-1$ + case 268 : if (DEBUG) { System.out.println("MethodHeaderThrowsClause ::= throws ClassTypeList"); } //$NON-NLS-1$ consumeMethodHeaderThrowsClause(); break; - case 271 : if (DEBUG) { System.out.println("ConstructorHeader ::= ConstructorHeaderName..."); } //$NON-NLS-1$ + case 269 : if (DEBUG) { System.out.println("ConstructorHeader ::= ConstructorHeaderName..."); } //$NON-NLS-1$ consumeConstructorHeader(); break; - case 272 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt TypeParameters..."); } //$NON-NLS-1$ + case 270 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt TypeParameters..."); } //$NON-NLS-1$ consumeConstructorHeaderNameWithTypeParameters(); break; - case 273 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt Identifier LPAREN"); } //$NON-NLS-1$ + case 271 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt Identifier LPAREN"); } //$NON-NLS-1$ consumeConstructorHeaderName(); break; - case 275 : if (DEBUG) { System.out.println("FormalParameterList ::= FormalParameterList COMMA..."); } //$NON-NLS-1$ + case 273 : if (DEBUG) { System.out.println("FormalParameterList ::= FormalParameterList COMMA..."); } //$NON-NLS-1$ consumeFormalParameterList(); break; - case 276 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type..."); } //$NON-NLS-1$ + case 274 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type..."); } //$NON-NLS-1$ consumeFormalParameter(false); break; - case 277 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type..."); } //$NON-NLS-1$ + case 275 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type..."); } //$NON-NLS-1$ consumeFormalParameter(true); break; - case 278 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type AT308DOTDOTDOT..."); } //$NON-NLS-1$ + case 276 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type AT308DOTDOTDOT..."); } //$NON-NLS-1$ consumeFormalParameter(true); break; - case 279 : if (DEBUG) { System.out.println("CatchFormalParameter ::= Modifiersopt CatchType..."); } //$NON-NLS-1$ + case 277 : if (DEBUG) { System.out.println("CatchFormalParameter ::= Modifiersopt CatchType..."); } //$NON-NLS-1$ consumeCatchFormalParameter(); break; - case 280 : if (DEBUG) { System.out.println("CatchType ::= UnionType"); } //$NON-NLS-1$ + case 278 : if (DEBUG) { System.out.println("CatchType ::= UnionType"); } //$NON-NLS-1$ consumeCatchType(); break; - case 281 : if (DEBUG) { System.out.println("UnionType ::= Type"); } //$NON-NLS-1$ + case 279 : if (DEBUG) { System.out.println("UnionType ::= Type"); } //$NON-NLS-1$ consumeUnionTypeAsClassType(); break; - case 282 : if (DEBUG) { System.out.println("UnionType ::= UnionType OR Type"); } //$NON-NLS-1$ + case 280 : if (DEBUG) { System.out.println("UnionType ::= UnionType OR Type"); } //$NON-NLS-1$ consumeUnionType(); break; - case 284 : if (DEBUG) { System.out.println("ClassTypeList ::= ClassTypeList COMMA ClassTypeElt"); } //$NON-NLS-1$ + case 282 : if (DEBUG) { System.out.println("ClassTypeList ::= ClassTypeList COMMA ClassTypeElt"); } //$NON-NLS-1$ consumeClassTypeList(); break; - case 285 : if (DEBUG) { System.out.println("ClassTypeElt ::= ClassType"); } //$NON-NLS-1$ + case 283 : if (DEBUG) { System.out.println("ClassTypeElt ::= ClassType"); } //$NON-NLS-1$ consumeClassTypeElt(); break; - case 286 : if (DEBUG) { System.out.println("MethodBody ::= NestedMethod LBRACE BlockStatementsopt..."); } //$NON-NLS-1$ + case 284 : if (DEBUG) { System.out.println("MethodBody ::= NestedMethod LBRACE BlockStatementsopt..."); } //$NON-NLS-1$ consumeMethodBody(); break; - case 287 : if (DEBUG) { System.out.println("NestedMethod ::="); } //$NON-NLS-1$ + case 285 : if (DEBUG) { System.out.println("NestedMethod ::="); } //$NON-NLS-1$ consumeNestedMethod(); break; - case 288 : if (DEBUG) { System.out.println("StaticInitializer ::= StaticOnly Block"); } //$NON-NLS-1$ + case 286 : if (DEBUG) { System.out.println("StaticInitializer ::= StaticOnly Block"); } //$NON-NLS-1$ consumeStaticInitializer(); break; - case 289 : if (DEBUG) { System.out.println("StaticOnly ::= static"); } //$NON-NLS-1$ + case 287 : if (DEBUG) { System.out.println("StaticOnly ::= static"); } //$NON-NLS-1$ consumeStaticOnly(); break; - case 290 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader MethodBody"); } //$NON-NLS-1$ + case 288 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader MethodBody"); } //$NON-NLS-1$ consumeConstructorDeclaration() ; break; - case 291 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader SEMICOLON"); } //$NON-NLS-1$ + case 289 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader SEMICOLON"); } //$NON-NLS-1$ consumeInvalidConstructorDeclaration() ; break; - case 292 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= this LPAREN..."); } //$NON-NLS-1$ + case 290 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= this LPAREN..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocation(0, THIS_CALL); break; - case 293 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments this"); } //$NON-NLS-1$ + case 291 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments this"); } //$NON-NLS-1$ consumeExplicitConstructorInvocationWithTypeArguments(0,THIS_CALL); break; - case 294 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= super LPAREN..."); } //$NON-NLS-1$ + case 292 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= super LPAREN..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocation(0,SUPER_CALL); break; - case 295 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments..."); } //$NON-NLS-1$ + case 293 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocationWithTypeArguments(0,SUPER_CALL); break; - case 296 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT super..."); } //$NON-NLS-1$ + case 294 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT super..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocation(1, SUPER_CALL); break; - case 297 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); } //$NON-NLS-1$ + case 295 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocationWithTypeArguments(1, SUPER_CALL); break; - case 298 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT super LPAREN"); } //$NON-NLS-1$ + case 296 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT super LPAREN"); } //$NON-NLS-1$ consumeExplicitConstructorInvocation(2, SUPER_CALL); break; - case 299 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); } //$NON-NLS-1$ + case 297 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocationWithTypeArguments(2, SUPER_CALL); break; - case 300 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT this..."); } //$NON-NLS-1$ + case 298 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT this..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocation(1, THIS_CALL); break; - case 301 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); } //$NON-NLS-1$ + case 299 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocationWithTypeArguments(1, THIS_CALL); break; - case 302 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT this LPAREN"); } //$NON-NLS-1$ + case 300 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT this LPAREN"); } //$NON-NLS-1$ consumeExplicitConstructorInvocation(2, THIS_CALL); break; - case 303 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); } //$NON-NLS-1$ + case 301 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocationWithTypeArguments(2, THIS_CALL); break; - case 304 : if (DEBUG) { System.out.println("InterfaceDeclaration ::= InterfaceHeader InterfaceBody"); } //$NON-NLS-1$ + case 302 : if (DEBUG) { System.out.println("InterfaceDeclaration ::= InterfaceHeader InterfaceBody"); } //$NON-NLS-1$ consumeInterfaceDeclaration(); break; - case 305 : if (DEBUG) { System.out.println("InterfaceHeader ::= InterfaceHeaderName..."); } //$NON-NLS-1$ + case 303 : if (DEBUG) { System.out.println("InterfaceHeader ::= InterfaceHeaderName..."); } //$NON-NLS-1$ consumeInterfaceHeader(); break; - case 306 : if (DEBUG) { System.out.println("InterfaceHeaderName ::= InterfaceHeaderName1..."); } //$NON-NLS-1$ + case 304 : if (DEBUG) { System.out.println("InterfaceHeaderName ::= InterfaceHeaderName1..."); } //$NON-NLS-1$ consumeTypeHeaderNameWithTypeParameters(); break; - case 308 : if (DEBUG) { System.out.println("InterfaceHeaderName1 ::= Modifiersopt interface..."); } //$NON-NLS-1$ + case 306 : if (DEBUG) { System.out.println("InterfaceHeaderName1 ::= Modifiersopt interface..."); } //$NON-NLS-1$ consumeInterfaceHeaderName1(); break; - case 309 : if (DEBUG) { System.out.println("InterfaceHeaderExtends ::= extends InterfaceTypeList"); } //$NON-NLS-1$ + case 307 : if (DEBUG) { System.out.println("InterfaceHeaderExtends ::= extends InterfaceTypeList"); } //$NON-NLS-1$ consumeInterfaceHeaderExtends(); break; - case 312 : if (DEBUG) { System.out.println("InterfaceMemberDeclarations ::=..."); } //$NON-NLS-1$ + case 310 : if (DEBUG) { System.out.println("InterfaceMemberDeclarations ::=..."); } //$NON-NLS-1$ consumeInterfaceMemberDeclarations(); break; - case 313 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= SEMICOLON"); } //$NON-NLS-1$ + case 311 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= SEMICOLON"); } //$NON-NLS-1$ consumeEmptyTypeDeclaration(); break; - case 315 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= DefaultMethodHeader..."); } //$NON-NLS-1$ + case 313 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= DefaultMethodHeader..."); } //$NON-NLS-1$ consumeInterfaceMethodDeclaration(false); break; - case 316 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= MethodHeader MethodBody"); } //$NON-NLS-1$ + case 314 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= MethodHeader MethodBody"); } //$NON-NLS-1$ consumeInterfaceMethodDeclaration(false); break; - case 317 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= DefaultMethodHeader..."); } //$NON-NLS-1$ + case 315 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= DefaultMethodHeader..."); } //$NON-NLS-1$ consumeInterfaceMethodDeclaration(true); break; - case 318 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); } //$NON-NLS-1$ + case 316 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); } //$NON-NLS-1$ consumeInvalidConstructorDeclaration(true); break; - case 319 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); } //$NON-NLS-1$ + case 317 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); } //$NON-NLS-1$ consumeInvalidConstructorDeclaration(false); break; - case 330 : if (DEBUG) { System.out.println("RecordDeclaration ::= RecordHeaderPart RecordBody"); } //$NON-NLS-1$ + case 328 : if (DEBUG) { System.out.println("RecordDeclaration ::= RecordHeaderPart RecordBody"); } //$NON-NLS-1$ consumeRecordDeclaration(); break; - case 331 : if (DEBUG) { System.out.println("RecordHeaderPart ::= RecordHeaderName RecordHeader..."); } //$NON-NLS-1$ + case 329 : if (DEBUG) { System.out.println("RecordHeaderPart ::= RecordHeaderName RecordHeader..."); } //$NON-NLS-1$ consumeRecordHeaderPart(); break; - case 332 : if (DEBUG) { System.out.println("RecordHeaderName ::= RecordHeaderName1 TypeParameters"); } //$NON-NLS-1$ + case 330 : if (DEBUG) { System.out.println("RecordHeaderName ::= RecordHeaderName1 TypeParameters"); } //$NON-NLS-1$ consumeRecordHeaderNameWithTypeParameters(); break; - case 334 : if (DEBUG) { System.out.println("RecordHeaderName1 ::= Modifiersopt..."); } //$NON-NLS-1$ + case 332 : if (DEBUG) { System.out.println("RecordHeaderName1 ::= Modifiersopt..."); } //$NON-NLS-1$ consumeRecordHeaderName1(); break; - case 335 : if (DEBUG) { System.out.println("RecordComponentHeaderRightParen ::= RPAREN"); } //$NON-NLS-1$ + case 333 : if (DEBUG) { System.out.println("RecordComponentHeaderRightParen ::= RPAREN"); } //$NON-NLS-1$ consumeRecordComponentHeaderRightParen(); break; - case 336 : if (DEBUG) { System.out.println("RecordHeader ::= LPAREN RecordComponentsopt..."); } //$NON-NLS-1$ + case 334 : if (DEBUG) { System.out.println("RecordHeader ::= LPAREN RecordComponentsopt..."); } //$NON-NLS-1$ consumeRecordHeader(); break; - case 337 : if (DEBUG) { System.out.println("RecordComponentsopt ::="); } //$NON-NLS-1$ + case 335 : if (DEBUG) { System.out.println("RecordComponentsopt ::="); } //$NON-NLS-1$ consumeRecordComponentsopt(); break; - case 340 : if (DEBUG) { System.out.println("RecordComponents ::= RecordComponents COMMA..."); } //$NON-NLS-1$ + case 338 : if (DEBUG) { System.out.println("RecordComponents ::= RecordComponents COMMA..."); } //$NON-NLS-1$ consumeRecordComponents(); break; - case 342 : if (DEBUG) { System.out.println("RecordComponent ::= Modifiersopt Type..."); } //$NON-NLS-1$ + case 340 : if (DEBUG) { System.out.println("RecordComponent ::= Modifiersopt Type..."); } //$NON-NLS-1$ consumeRecordComponent(false); break; - case 343 : if (DEBUG) { System.out.println("VariableArityRecordComponent ::= Modifiersopt Type..."); } //$NON-NLS-1$ + case 341 : if (DEBUG) { System.out.println("VariableArityRecordComponent ::= Modifiersopt Type..."); } //$NON-NLS-1$ consumeRecordComponent(true); break; - case 344 : if (DEBUG) { System.out.println("VariableArityRecordComponent ::= Modifiersopt Type..."); } //$NON-NLS-1$ + case 342 : if (DEBUG) { System.out.println("VariableArityRecordComponent ::= Modifiersopt Type..."); } //$NON-NLS-1$ consumeRecordComponent(true); break; - case 345 : if (DEBUG) { System.out.println("RecordBody ::= LBRACE RecordBodyDeclarationopt RBRACE"); } //$NON-NLS-1$ + case 343 : if (DEBUG) { System.out.println("RecordBody ::= LBRACE RecordBodyDeclarationopt RBRACE"); } //$NON-NLS-1$ consumeRecordBody(); break; - case 346 : if (DEBUG) { System.out.println("RecordBodyDeclarationopt ::="); } //$NON-NLS-1$ + case 344 : if (DEBUG) { System.out.println("RecordBodyDeclarationopt ::="); } //$NON-NLS-1$ consumeEmptyRecordBodyDeclaration(); break; - case 349 : if (DEBUG) { System.out.println("RecordBodyDeclarations ::= RecordBodyDeclarations..."); } //$NON-NLS-1$ + case 347 : if (DEBUG) { System.out.println("RecordBodyDeclarations ::= RecordBodyDeclarations..."); } //$NON-NLS-1$ consumeRecordBodyDeclarations(); break; - case 350 : if (DEBUG) { System.out.println("RecordBodyDeclaration ::= ClassBodyDeclaration"); } //$NON-NLS-1$ + case 348 : if (DEBUG) { System.out.println("RecordBodyDeclaration ::= ClassBodyDeclaration"); } //$NON-NLS-1$ consumeRecordBodyDeclaration(); break; - case 351 : if (DEBUG) { System.out.println("RecordBodyDeclaration ::= CompactConstructorDeclaration"); } //$NON-NLS-1$ + case 349 : if (DEBUG) { System.out.println("RecordBodyDeclaration ::= CompactConstructorDeclaration"); } //$NON-NLS-1$ consumeRecordBodyDeclaration(); break; - case 352 : if (DEBUG) { System.out.println("CompactConstructorDeclaration ::=..."); } //$NON-NLS-1$ + case 350 : if (DEBUG) { System.out.println("CompactConstructorDeclaration ::=..."); } //$NON-NLS-1$ consumeCompactConstructorDeclaration(); break; - case 353 : if (DEBUG) { System.out.println("CompactConstructorHeader ::=..."); } //$NON-NLS-1$ + case 351 : if (DEBUG) { System.out.println("CompactConstructorHeader ::=..."); } //$NON-NLS-1$ consumeCompactConstructorHeader(); break; - case 354 : if (DEBUG) { System.out.println("CompactConstructorHeaderName ::= Modifiersopt Identifier"); } //$NON-NLS-1$ + case 352 : if (DEBUG) { System.out.println("CompactConstructorHeaderName ::= Modifiersopt Identifier"); } //$NON-NLS-1$ consumeCompactConstructorHeaderName(); break; - case 355 : if (DEBUG) { System.out.println("CompactConstructorHeaderName ::= Modifiersopt..."); } //$NON-NLS-1$ + case 353 : if (DEBUG) { System.out.println("CompactConstructorHeaderName ::= Modifiersopt..."); } //$NON-NLS-1$ consumeCompactConstructorHeaderNameWithTypeParameters(); break; - case 357 : if (DEBUG) { System.out.println("InstanceofExpression ::= InstanceofExpression..."); } //$NON-NLS-1$ + case 355 : if (DEBUG) { System.out.println("InstanceofExpression ::= InstanceofExpression..."); } //$NON-NLS-1$ consumeInstanceOfExpression(); break; - case 360 : if (DEBUG) { System.out.println("InstanceofClassic ::= instanceof Modifiersopt Type"); } //$NON-NLS-1$ + case 358 : if (DEBUG) { System.out.println("InstanceofClassic ::= instanceof Modifiersopt Type"); } //$NON-NLS-1$ consumeInstanceOfClassic(); break; - case 361 : if (DEBUG) { System.out.println("InstanceofPattern ::= instanceof Pattern"); } //$NON-NLS-1$ + case 359 : if (DEBUG) { System.out.println("InstanceofPattern ::= instanceof Pattern"); } //$NON-NLS-1$ consumeInstanceofPattern(); break; - case 364 : if (DEBUG) { System.out.println("TypePattern ::= Modifiersopt Type Identifier"); } //$NON-NLS-1$ + case 362 : if (DEBUG) { System.out.println("TypePattern ::= Modifiersopt Type Identifier"); } //$NON-NLS-1$ consumeTypePattern(); break; - case 365 : if (DEBUG) { System.out.println("TypePattern ::= Modifiersopt Type UNDERSCORE"); } //$NON-NLS-1$ + case 363 : if (DEBUG) { System.out.println("TypePattern ::= Modifiersopt Type UNDERSCORE"); } //$NON-NLS-1$ consumeTypePattern(); break; - case 366 : if (DEBUG) { System.out.println("RecordPattern ::= Modifiersopt ReferenceType PushLPAREN"); } //$NON-NLS-1$ + case 364 : if (DEBUG) { System.out.println("RecordPattern ::= Modifiersopt ReferenceType PushLPAREN"); } //$NON-NLS-1$ consumeRecordPattern(); break; - case 367 : if (DEBUG) { System.out.println("ComponentPatternListopt ::="); } //$NON-NLS-1$ + case 365 : if (DEBUG) { System.out.println("ComponentPatternListopt ::="); } //$NON-NLS-1$ consumePatternListopt(); break; - case 370 : if (DEBUG) { System.out.println("ComponentPatternList ::= ComponentPatternList COMMA..."); } //$NON-NLS-1$ + case 368 : if (DEBUG) { System.out.println("ComponentPatternList ::= ComponentPatternList COMMA..."); } //$NON-NLS-1$ consumePatternList(); break; - case 373 : if (DEBUG) { System.out.println("UnnamedPattern ::= UNDERSCORE"); } //$NON-NLS-1$ + case 371 : if (DEBUG) { System.out.println("UnnamedPattern ::= UNDERSCORE"); } //$NON-NLS-1$ consumeUnnamedPattern(); break; - case 375 : if (DEBUG) { System.out.println("PushLeftBrace ::="); } //$NON-NLS-1$ + case 373 : if (DEBUG) { System.out.println("PushLeftBrace ::="); } //$NON-NLS-1$ consumePushLeftBrace(); break; - case 376 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace ,opt RBRACE"); } //$NON-NLS-1$ + case 374 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace ,opt RBRACE"); } //$NON-NLS-1$ consumeEmptyArrayInitializer(); break; - case 377 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$ + case 375 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$ consumeArrayInitializer(); break; - case 378 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$ + case 376 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$ consumeArrayInitializer(); break; - case 380 : if (DEBUG) { System.out.println("VariableInitializers ::= VariableInitializers COMMA..."); } //$NON-NLS-1$ + case 378 : if (DEBUG) { System.out.println("VariableInitializers ::= VariableInitializers COMMA..."); } //$NON-NLS-1$ consumeVariableInitializers(); break; - case 381 : if (DEBUG) { System.out.println("Block ::= OpenBlock LBRACE BlockStatementsopt RBRACE"); } //$NON-NLS-1$ + case 379 : if (DEBUG) { System.out.println("Block ::= OpenBlock LBRACE BlockStatementsopt RBRACE"); } //$NON-NLS-1$ consumeBlock(); break; - case 382 : if (DEBUG) { System.out.println("OpenBlock ::="); } //$NON-NLS-1$ + case 380 : if (DEBUG) { System.out.println("OpenBlock ::="); } //$NON-NLS-1$ consumeOpenBlock() ; break; - case 383 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatement"); } //$NON-NLS-1$ + case 381 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatement"); } //$NON-NLS-1$ consumeBlockStatement() ; break; - case 384 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatements BlockStatement"); } //$NON-NLS-1$ + case 382 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatements BlockStatement"); } //$NON-NLS-1$ consumeBlockStatements() ; break; - case 392 : if (DEBUG) { System.out.println("BlockStatement ::= InterfaceDeclaration"); } //$NON-NLS-1$ + case 390 : if (DEBUG) { System.out.println("BlockStatement ::= InterfaceDeclaration"); } //$NON-NLS-1$ consumeInvalidInterfaceDeclaration(); break; - case 393 : if (DEBUG) { System.out.println("BlockStatement ::= AnnotationTypeDeclaration"); } //$NON-NLS-1$ + case 391 : if (DEBUG) { System.out.println("BlockStatement ::= AnnotationTypeDeclaration"); } //$NON-NLS-1$ consumeInvalidAnnotationTypeDeclaration(); break; - case 394 : if (DEBUG) { System.out.println("BlockStatement ::= EnumDeclaration"); } //$NON-NLS-1$ + case 392 : if (DEBUG) { System.out.println("BlockStatement ::= EnumDeclaration"); } //$NON-NLS-1$ consumeInvalidEnumDeclaration(); break; - case 395 : if (DEBUG) { System.out.println("LocalVariableDeclarationStatement ::=..."); } //$NON-NLS-1$ + case 393 : if (DEBUG) { System.out.println("LocalVariableDeclarationStatement ::=..."); } //$NON-NLS-1$ consumeLocalVariableDeclarationStatement(); break; - case 396 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Type PushModifiers..."); } //$NON-NLS-1$ + case 394 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Type PushModifiers..."); } //$NON-NLS-1$ consumeLocalVariableDeclaration(); break; - case 397 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Modifiers Type..."); } //$NON-NLS-1$ + case 395 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Modifiers Type..."); } //$NON-NLS-1$ consumeLocalVariableDeclaration(); break; - case 398 : if (DEBUG) { System.out.println("PushModifiers ::="); } //$NON-NLS-1$ + case 396 : if (DEBUG) { System.out.println("PushModifiers ::="); } //$NON-NLS-1$ consumePushModifiers(); break; - case 399 : if (DEBUG) { System.out.println("PushModifiersForHeader ::="); } //$NON-NLS-1$ + case 397 : if (DEBUG) { System.out.println("PushModifiersForHeader ::="); } //$NON-NLS-1$ consumePushModifiersForHeader(); break; - case 400 : if (DEBUG) { System.out.println("PushRealModifiers ::="); } //$NON-NLS-1$ + case 398 : if (DEBUG) { System.out.println("PushRealModifiers ::="); } //$NON-NLS-1$ consumePushRealModifiers(); break; - case 428 : if (DEBUG) { System.out.println("EmptyStatement ::= SEMICOLON"); } //$NON-NLS-1$ + case 426 : if (DEBUG) { System.out.println("EmptyStatement ::= SEMICOLON"); } //$NON-NLS-1$ consumeEmptyStatement(); break; - case 429 : if (DEBUG) { System.out.println("LabeledStatement ::= Label COLON Statement"); } //$NON-NLS-1$ + case 427 : if (DEBUG) { System.out.println("LabeledStatement ::= Label COLON Statement"); } //$NON-NLS-1$ consumeStatementLabel() ; break; - case 430 : if (DEBUG) { System.out.println("LabeledStatementNoShortIf ::= Label COLON..."); } //$NON-NLS-1$ + case 428 : if (DEBUG) { System.out.println("LabeledStatementNoShortIf ::= Label COLON..."); } //$NON-NLS-1$ consumeStatementLabel() ; break; - case 431 : if (DEBUG) { System.out.println("Label ::= Identifier"); } //$NON-NLS-1$ + case 429 : if (DEBUG) { System.out.println("Label ::= Identifier"); } //$NON-NLS-1$ consumeLabel() ; break; - case 432 : if (DEBUG) { System.out.println("ExpressionStatement ::= StatementExpression SEMICOLON"); } //$NON-NLS-1$ + case 430 : if (DEBUG) { System.out.println("ExpressionStatement ::= StatementExpression SEMICOLON"); } //$NON-NLS-1$ consumeExpressionStatement(); break; - case 441 : if (DEBUG) { System.out.println("PostExpressionInSwitchStatement ::="); } //$NON-NLS-1$ + case 439 : if (DEBUG) { System.out.println("PostExpressionInSwitchStatement ::="); } //$NON-NLS-1$ consumePostExpressionInSwitch(true); break; - case 442 : if (DEBUG) { System.out.println("PostExpressionInSwitchExpression ::="); } //$NON-NLS-1$ + case 440 : if (DEBUG) { System.out.println("PostExpressionInSwitchExpression ::="); } //$NON-NLS-1$ consumePostExpressionInSwitch(false); break; - case 443 : if (DEBUG) { System.out.println("PostExpressionInIf ::="); } //$NON-NLS-1$ + case 441 : if (DEBUG) { System.out.println("PostExpressionInIf ::="); } //$NON-NLS-1$ consumePostExpressionInIf(); break; - case 444 : if (DEBUG) { System.out.println("PostExpressionInWhile ::="); } //$NON-NLS-1$ + case 442 : if (DEBUG) { System.out.println("PostExpressionInWhile ::="); } //$NON-NLS-1$ consumePostExpressionInWhile(); break; - case 445 : if (DEBUG) { System.out.println("IfThenStatement ::= if LPAREN Expression RPAREN..."); } //$NON-NLS-1$ + case 443 : if (DEBUG) { System.out.println("IfThenStatement ::= if LPAREN Expression RPAREN..."); } //$NON-NLS-1$ consumeStatementIfNoElse(); break; - case 446 : if (DEBUG) { System.out.println("IfThenElseStatement ::= if LPAREN Expression RPAREN..."); } //$NON-NLS-1$ + case 444 : if (DEBUG) { System.out.println("IfThenElseStatement ::= if LPAREN Expression RPAREN..."); } //$NON-NLS-1$ consumeStatementIfWithElse(); break; - case 447 : if (DEBUG) { System.out.println("IfThenElseStatementNoShortIf ::= if LPAREN Expression..."); } //$NON-NLS-1$ + case 445 : if (DEBUG) { System.out.println("IfThenElseStatementNoShortIf ::= if LPAREN Expression..."); } //$NON-NLS-1$ consumeStatementIfWithElse(); break; - case 448 : if (DEBUG) { System.out.println("SwitchStatement ::= switch LPAREN Expression RPAREN..."); } //$NON-NLS-1$ - consumeStatementSwitch() ; break; + case 446 : if (DEBUG) { System.out.println("SwitchStatement ::= switch LPAREN Expression RPAREN..."); } //$NON-NLS-1$ + consumeSwitchStatementOrExpression(true) ; break; - case 449 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE RBRACE"); } //$NON-NLS-1$ - consumeEmptySwitchBlock() ; break; + case 447 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE RBRACE"); } //$NON-NLS-1$ + consumeSwitchBlock(false) ; break; - case 452 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE SwitchBlockStatements..."); } //$NON-NLS-1$ - consumeSwitchBlock() ; break; + case 450 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE SwitchBlockStatements..."); } //$NON-NLS-1$ + consumeSwitchBlock(true) ; break; - case 454 : if (DEBUG) { System.out.println("SwitchBlockStatements ::= SwitchBlockStatements..."); } //$NON-NLS-1$ + case 452 : if (DEBUG) { System.out.println("SwitchBlockStatements ::= SwitchBlockStatements..."); } //$NON-NLS-1$ consumeSwitchBlockStatements() ; break; - case 456 : if (DEBUG) { System.out.println("SwitchBlockStatement ::= SwitchLabels BlockStatements"); } //$NON-NLS-1$ + case 454 : if (DEBUG) { System.out.println("SwitchBlockStatement ::= SwitchLabels BlockStatements"); } //$NON-NLS-1$ consumeSwitchBlockStatement() ; break; - case 458 : if (DEBUG) { System.out.println("SwitchLabels ::= SwitchLabels SwitchLabel"); } //$NON-NLS-1$ - consumeSwitchLabels() ; break; - - case 459 : if (DEBUG) { System.out.println("SwitchLabel ::= SwitchLabelCaseLhs COLON"); } //$NON-NLS-1$ - consumeCaseLabel(); break; + case 455 : if (DEBUG) { System.out.println("SwitchLabels ::= SwitchLabel COLON"); } //$NON-NLS-1$ + consumeSwitchLabels(false, false) ; break; - case 460 : if (DEBUG) { System.out.println("SwitchLabel ::= default COLON"); } //$NON-NLS-1$ - consumeDefaultLabel(); break; - - case 463 : if (DEBUG) { System.out.println("SwitchExpression ::= switch LPAREN Expression RPAREN..."); } //$NON-NLS-1$ - consumeSwitchExpression() ; break; + case 456 : if (DEBUG) { System.out.println("SwitchLabels ::= SwitchLabels SwitchLabel COLON"); } //$NON-NLS-1$ + consumeSwitchLabels(true, false) ; break; - case 466 : if (DEBUG) { System.out.println("SwitchLabeledRule ::= SwitchLabeledThrowStatement"); } //$NON-NLS-1$ - consumeSwitchLabeledRule(); break; + case 457 : if (DEBUG) { System.out.println("PostCaseArrow ::="); } //$NON-NLS-1$ + consumeSwitchLabels(false, true) ; break; - case 467 : if (DEBUG) { System.out.println("SwitchLabeledExpression ::= SwitchLabelExpr Expression"); } //$NON-NLS-1$ - consumeSwitchLabeledExpression(); break; + case 459 : if (DEBUG) { System.out.println("SwitchLabel ::= default"); } //$NON-NLS-1$ + consumeDefaultLabel(); break; - case 468 : if (DEBUG) { System.out.println("SwitchLabeledBlock ::= SwitchLabelExpr Block"); } //$NON-NLS-1$ - consumeSwitchLabeledBlock(); break; + case 462 : if (DEBUG) { System.out.println("SwitchExpression ::= switch LPAREN Expression RPAREN..."); } //$NON-NLS-1$ + consumeSwitchStatementOrExpression(false) ; break; - case 469 : if (DEBUG) { System.out.println("SwitchLabeledThrowStatement ::= SwitchLabelExpr..."); } //$NON-NLS-1$ - consumeSwitchLabeledThrowStatement(); break; + case 463 : if (DEBUG) { System.out.println("SwitchRule ::= SwitchLabel CaseArrow PostCaseArrow..."); } //$NON-NLS-1$ + consumeSwitchRule(SwitchRuleKind.EXPRESSION); break; - case 470 : if (DEBUG) { System.out.println("SwitchLabelExpr ::= default ARROW"); } //$NON-NLS-1$ - consumeDefaultLabelExpr(); break; + case 464 : if (DEBUG) { System.out.println("SwitchRule ::= SwitchLabel CaseArrow PostCaseArrow..."); } //$NON-NLS-1$ + consumeSwitchRule(SwitchRuleKind.BLOCK); break; - case 471 : if (DEBUG) { System.out.println("SwitchLabelExpr ::= SwitchLabelCaseLhs BeginCaseExpr..."); } //$NON-NLS-1$ - consumeCaseLabelExpr(); break; + case 465 : if (DEBUG) { System.out.println("SwitchRule ::= SwitchLabel CaseArrow PostCaseArrow..."); } //$NON-NLS-1$ + consumeSwitchRule(SwitchRuleKind.THROW); break; - case 472 : if (DEBUG) { System.out.println("SwitchLabelCaseLhs ::= case CaseLabelElements"); } //$NON-NLS-1$ + case 466 : if (DEBUG) { System.out.println("SwitchLabelCaseLhs ::= case CaseLabelElements"); } //$NON-NLS-1$ consumeSwitchLabelCaseLhs(); break; - case 474 : if (DEBUG) { System.out.println("CaseLabelElements ::= CaseLabelElements COMMA..."); } //$NON-NLS-1$ + case 468 : if (DEBUG) { System.out.println("CaseLabelElements ::= CaseLabelElements COMMA..."); } //$NON-NLS-1$ consumeCaseLabelElements(); break; - case 475 : if (DEBUG) { System.out.println("CaseLabelElement ::= ConstantExpression"); } //$NON-NLS-1$ + case 469 : if (DEBUG) { System.out.println("CaseLabelElement ::= ConstantExpression"); } //$NON-NLS-1$ consumeCaseLabelElement(CaseLabelKind.CASE_EXPRESSION); break; - case 476 : if (DEBUG) { System.out.println("CaseLabelElement ::= default"); } //$NON-NLS-1$ + case 470 : if (DEBUG) { System.out.println("CaseLabelElement ::= default"); } //$NON-NLS-1$ consumeCaseLabelElement(CaseLabelKind.CASE_DEFAULT); break; - case 477 : if (DEBUG) { System.out.println("CaseLabelElement ::= CaseLabelElementPattern"); } //$NON-NLS-1$ + case 471 : if (DEBUG) { System.out.println("CaseLabelElement ::= CaseLabelElementPattern"); } //$NON-NLS-1$ consumeCaseLabelElement(CaseLabelKind.CASE_PATTERN); break; - case 478 : if (DEBUG) { System.out.println("CaseLabelElement ::= CaseLabelElementPattern Guard"); } //$NON-NLS-1$ + case 472 : if (DEBUG) { System.out.println("CaseLabelElement ::= CaseLabelElementPattern Guard"); } //$NON-NLS-1$ consumeCaseLabelElement(CaseLabelKind.CASE_PATTERN); break; - case 480 : if (DEBUG) { System.out.println("Guard ::= RestrictedIdentifierWhen Expression"); } //$NON-NLS-1$ + case 474 : if (DEBUG) { System.out.println("Guard ::= RestrictedIdentifierWhen Expression"); } //$NON-NLS-1$ consumeGuard(); break; - case 481 : if (DEBUG) { System.out.println("YieldStatement ::= RestrictedIdentifierYield Expression"); } //$NON-NLS-1$ + case 475 : if (DEBUG) { System.out.println("YieldStatement ::= RestrictedIdentifierYield Expression"); } //$NON-NLS-1$ consumeStatementYield() ; break; - case 482 : if (DEBUG) { System.out.println("WhileStatement ::= while LPAREN Expression RPAREN..."); } //$NON-NLS-1$ + case 476 : if (DEBUG) { System.out.println("WhileStatement ::= while LPAREN Expression RPAREN..."); } //$NON-NLS-1$ consumeStatementWhile() ; break; - case 483 : if (DEBUG) { System.out.println("WhileStatementNoShortIf ::= while LPAREN Expression..."); } //$NON-NLS-1$ + case 477 : if (DEBUG) { System.out.println("WhileStatementNoShortIf ::= while LPAREN Expression..."); } //$NON-NLS-1$ consumeStatementWhile() ; break; - case 484 : if (DEBUG) { System.out.println("DoStatement ::= do Statement while LPAREN Expression..."); } //$NON-NLS-1$ + case 478 : if (DEBUG) { System.out.println("DoStatement ::= do Statement while LPAREN Expression..."); } //$NON-NLS-1$ consumeStatementDo() ; break; - case 485 : if (DEBUG) { System.out.println("ForStatement ::= for LPAREN ForInitopt SEMICOLON..."); } //$NON-NLS-1$ + case 479 : if (DEBUG) { System.out.println("ForStatement ::= for LPAREN ForInitopt SEMICOLON..."); } //$NON-NLS-1$ consumeStatementFor() ; break; - case 486 : if (DEBUG) { System.out.println("ForStatementNoShortIf ::= for LPAREN ForInitopt..."); } //$NON-NLS-1$ + case 480 : if (DEBUG) { System.out.println("ForStatementNoShortIf ::= for LPAREN ForInitopt..."); } //$NON-NLS-1$ consumeStatementFor() ; break; - case 487 : if (DEBUG) { System.out.println("ForInit ::= StatementExpressionList"); } //$NON-NLS-1$ + case 481 : if (DEBUG) { System.out.println("ForInit ::= StatementExpressionList"); } //$NON-NLS-1$ consumeForInit() ; break; - case 491 : if (DEBUG) { System.out.println("StatementExpressionList ::= StatementExpressionList..."); } //$NON-NLS-1$ + case 485 : if (DEBUG) { System.out.println("StatementExpressionList ::= StatementExpressionList..."); } //$NON-NLS-1$ consumeStatementExpressionList() ; break; - case 492 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression SEMICOLON"); } //$NON-NLS-1$ + case 486 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression SEMICOLON"); } //$NON-NLS-1$ consumeSimpleAssertStatement() ; break; - case 493 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression COLON Expression"); } //$NON-NLS-1$ + case 487 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression COLON Expression"); } //$NON-NLS-1$ consumeAssertStatement() ; break; - case 494 : if (DEBUG) { System.out.println("BreakStatement ::= break SEMICOLON"); } //$NON-NLS-1$ + case 488 : if (DEBUG) { System.out.println("BreakStatement ::= break SEMICOLON"); } //$NON-NLS-1$ consumeStatementBreak() ; break; - case 495 : if (DEBUG) { System.out.println("BreakStatement ::= break Identifier SEMICOLON"); } //$NON-NLS-1$ + case 489 : if (DEBUG) { System.out.println("BreakStatement ::= break Identifier SEMICOLON"); } //$NON-NLS-1$ consumeStatementBreakWithLabel() ; break; - case 496 : if (DEBUG) { System.out.println("ContinueStatement ::= continue SEMICOLON"); } //$NON-NLS-1$ + case 490 : if (DEBUG) { System.out.println("ContinueStatement ::= continue SEMICOLON"); } //$NON-NLS-1$ consumeStatementContinue() ; break; - case 497 : if (DEBUG) { System.out.println("ContinueStatement ::= continue Identifier SEMICOLON"); } //$NON-NLS-1$ + case 491 : if (DEBUG) { System.out.println("ContinueStatement ::= continue Identifier SEMICOLON"); } //$NON-NLS-1$ consumeStatementContinueWithLabel() ; break; - case 498 : if (DEBUG) { System.out.println("ReturnStatement ::= return Expressionopt SEMICOLON"); } //$NON-NLS-1$ + case 492 : if (DEBUG) { System.out.println("ReturnStatement ::= return Expressionopt SEMICOLON"); } //$NON-NLS-1$ consumeStatementReturn() ; break; - case 499 : if (DEBUG) { System.out.println("ThrowStatement ::= throw Expression SEMICOLON"); } //$NON-NLS-1$ + case 493 : if (DEBUG) { System.out.println("ThrowStatement ::= throw Expression SEMICOLON"); } //$NON-NLS-1$ consumeStatementThrow(); break; - case 500 : if (DEBUG) { System.out.println("ThrowExpression ::= throw Expression"); } //$NON-NLS-1$ - consumeThrowExpression() ; break; - - case 501 : if (DEBUG) { System.out.println("SynchronizedStatement ::= OnlySynchronized LPAREN..."); } //$NON-NLS-1$ + case 494 : if (DEBUG) { System.out.println("SynchronizedStatement ::= OnlySynchronized LPAREN..."); } //$NON-NLS-1$ consumeStatementSynchronized(); break; - case 502 : if (DEBUG) { System.out.println("OnlySynchronized ::= synchronized"); } //$NON-NLS-1$ + case 495 : if (DEBUG) { System.out.println("OnlySynchronized ::= synchronized"); } //$NON-NLS-1$ consumeOnlySynchronized(); break; - case 503 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catches"); } //$NON-NLS-1$ + case 496 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catches"); } //$NON-NLS-1$ consumeStatementTry(false, false); break; - case 504 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catchesopt Finally"); } //$NON-NLS-1$ + case 497 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catchesopt Finally"); } //$NON-NLS-1$ consumeStatementTry(true, false); break; - case 505 : if (DEBUG) { System.out.println("TryStatementWithResources ::= try ResourceSpecification"); } //$NON-NLS-1$ + case 498 : if (DEBUG) { System.out.println("TryStatementWithResources ::= try ResourceSpecification"); } //$NON-NLS-1$ consumeStatementTry(false, true); break; - case 506 : if (DEBUG) { System.out.println("TryStatementWithResources ::= try ResourceSpecification"); } //$NON-NLS-1$ + case 499 : if (DEBUG) { System.out.println("TryStatementWithResources ::= try ResourceSpecification"); } //$NON-NLS-1$ consumeStatementTry(true, true); break; - case 507 : if (DEBUG) { System.out.println("ResourceSpecification ::= LPAREN Resources ;opt RPAREN"); } //$NON-NLS-1$ + case 500 : if (DEBUG) { System.out.println("ResourceSpecification ::= LPAREN Resources ;opt RPAREN"); } //$NON-NLS-1$ consumeResourceSpecification(); break; - case 508 : if (DEBUG) { System.out.println(";opt ::="); } //$NON-NLS-1$ + case 501 : if (DEBUG) { System.out.println(";opt ::="); } //$NON-NLS-1$ consumeResourceOptionalTrailingSemiColon(false); break; - case 509 : if (DEBUG) { System.out.println(";opt ::= SEMICOLON"); } //$NON-NLS-1$ + case 502 : if (DEBUG) { System.out.println(";opt ::= SEMICOLON"); } //$NON-NLS-1$ consumeResourceOptionalTrailingSemiColon(true); break; - case 510 : if (DEBUG) { System.out.println("Resources ::= Resource"); } //$NON-NLS-1$ + case 503 : if (DEBUG) { System.out.println("Resources ::= Resource"); } //$NON-NLS-1$ consumeSingleResource(); break; - case 511 : if (DEBUG) { System.out.println("Resources ::= Resources TrailingSemiColon Resource"); } //$NON-NLS-1$ + case 504 : if (DEBUG) { System.out.println("Resources ::= Resources TrailingSemiColon Resource"); } //$NON-NLS-1$ consumeMultipleResources(); break; - case 512 : if (DEBUG) { System.out.println("TrailingSemiColon ::= SEMICOLON"); } //$NON-NLS-1$ + case 505 : if (DEBUG) { System.out.println("TrailingSemiColon ::= SEMICOLON"); } //$NON-NLS-1$ consumeResourceOptionalTrailingSemiColon(true); break; - case 513 : if (DEBUG) { System.out.println("Resource ::= Type PushModifiers VariableDeclaratorId..."); } //$NON-NLS-1$ + case 506 : if (DEBUG) { System.out.println("Resource ::= Type PushModifiers VariableDeclaratorId..."); } //$NON-NLS-1$ consumeResourceAsLocalVariableDeclaration(); break; - case 514 : if (DEBUG) { System.out.println("Resource ::= Modifiers Type PushRealModifiers..."); } //$NON-NLS-1$ + case 507 : if (DEBUG) { System.out.println("Resource ::= Modifiers Type PushRealModifiers..."); } //$NON-NLS-1$ consumeResourceAsLocalVariableDeclaration(); break; - case 515 : if (DEBUG) { System.out.println("Resource ::= Name"); } //$NON-NLS-1$ + case 508 : if (DEBUG) { System.out.println("Resource ::= Name"); } //$NON-NLS-1$ consumeResourceAsLocalVariable(); break; - case 516 : if (DEBUG) { System.out.println("Resource ::= this"); } //$NON-NLS-1$ + case 509 : if (DEBUG) { System.out.println("Resource ::= this"); } //$NON-NLS-1$ consumeResourceAsThis(); break; - case 517 : if (DEBUG) { System.out.println("Resource ::= FieldAccess"); } //$NON-NLS-1$ + case 510 : if (DEBUG) { System.out.println("Resource ::= FieldAccess"); } //$NON-NLS-1$ consumeResourceAsFieldAccess(); break; - case 519 : if (DEBUG) { System.out.println("ExitTryBlock ::="); } //$NON-NLS-1$ + case 512 : if (DEBUG) { System.out.println("ExitTryBlock ::="); } //$NON-NLS-1$ consumeExitTryBlock(); break; - case 521 : if (DEBUG) { System.out.println("Catches ::= Catches CatchClause"); } //$NON-NLS-1$ + case 514 : if (DEBUG) { System.out.println("Catches ::= Catches CatchClause"); } //$NON-NLS-1$ consumeCatches(); break; - case 522 : if (DEBUG) { System.out.println("CatchClause ::= catch LPAREN CatchFormalParameter RPAREN"); } //$NON-NLS-1$ + case 515 : if (DEBUG) { System.out.println("CatchClause ::= catch LPAREN CatchFormalParameter RPAREN"); } //$NON-NLS-1$ consumeStatementCatch() ; break; - case 524 : if (DEBUG) { System.out.println("PushLPAREN ::= LPAREN"); } //$NON-NLS-1$ + case 517 : if (DEBUG) { System.out.println("PushLPAREN ::= LPAREN"); } //$NON-NLS-1$ consumeLeftParen(); break; - case 525 : if (DEBUG) { System.out.println("PushRPAREN ::= RPAREN"); } //$NON-NLS-1$ + case 518 : if (DEBUG) { System.out.println("PushRPAREN ::= RPAREN"); } //$NON-NLS-1$ consumeRightParen(); break; - case 530 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= this"); } //$NON-NLS-1$ + case 523 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= this"); } //$NON-NLS-1$ consumePrimaryNoNewArrayThis(); break; - case 531 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Expression_NotName..."); } //$NON-NLS-1$ + case 524 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Expression_NotName..."); } //$NON-NLS-1$ consumePrimaryNoNewArray(); break; - case 532 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Name PushRPAREN"); } //$NON-NLS-1$ + case 525 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Name PushRPAREN"); } //$NON-NLS-1$ consumePrimaryNoNewArrayWithName(); break; - case 535 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT this"); } //$NON-NLS-1$ + case 528 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT this"); } //$NON-NLS-1$ consumePrimaryNoNewArrayNameThis(); break; - case 536 : if (DEBUG) { System.out.println("QualifiedSuperReceiver ::= Name DOT super"); } //$NON-NLS-1$ + case 529 : if (DEBUG) { System.out.println("QualifiedSuperReceiver ::= Name DOT super"); } //$NON-NLS-1$ consumeQualifiedSuperReceiver(); break; - case 537 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT class"); } //$NON-NLS-1$ + case 530 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT class"); } //$NON-NLS-1$ consumePrimaryNoNewArrayName(); break; - case 538 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name Dims DOT class"); } //$NON-NLS-1$ + case 531 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name Dims DOT class"); } //$NON-NLS-1$ consumePrimaryNoNewArrayArrayType(); break; - case 539 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType Dims DOT class"); } //$NON-NLS-1$ + case 532 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType Dims DOT class"); } //$NON-NLS-1$ consumePrimaryNoNewArrayPrimitiveArrayType(); break; - case 540 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType DOT class"); } //$NON-NLS-1$ + case 533 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType DOT class"); } //$NON-NLS-1$ consumePrimaryNoNewArrayPrimitiveType(); break; - case 546 : if (DEBUG) { System.out.println("ReferenceExpressionTypeArgumentsAndTrunk0 ::=..."); } //$NON-NLS-1$ + case 539 : if (DEBUG) { System.out.println("ReferenceExpressionTypeArgumentsAndTrunk0 ::=..."); } //$NON-NLS-1$ consumeReferenceExpressionTypeArgumentsAndTrunk(false); break; - case 547 : if (DEBUG) { System.out.println("ReferenceExpressionTypeArgumentsAndTrunk0 ::=..."); } //$NON-NLS-1$ + case 540 : if (DEBUG) { System.out.println("ReferenceExpressionTypeArgumentsAndTrunk0 ::=..."); } //$NON-NLS-1$ consumeReferenceExpressionTypeArgumentsAndTrunk(true); break; - case 548 : if (DEBUG) { System.out.println("ReferenceExpression ::= PrimitiveType Dims COLON_COLON"); } //$NON-NLS-1$ + case 541 : if (DEBUG) { System.out.println("ReferenceExpression ::= PrimitiveType Dims COLON_COLON"); } //$NON-NLS-1$ consumeReferenceExpressionTypeForm(true); break; - case 549 : if (DEBUG) { System.out.println("ReferenceExpression ::= Name Dimsopt COLON_COLON..."); } //$NON-NLS-1$ + case 542 : if (DEBUG) { System.out.println("ReferenceExpression ::= Name Dimsopt COLON_COLON..."); } //$NON-NLS-1$ consumeReferenceExpressionTypeForm(false); break; - case 550 : if (DEBUG) { System.out.println("ReferenceExpression ::= Name BeginTypeArguments..."); } //$NON-NLS-1$ + case 543 : if (DEBUG) { System.out.println("ReferenceExpression ::= Name BeginTypeArguments..."); } //$NON-NLS-1$ consumeReferenceExpressionGenericTypeForm(); break; - case 551 : if (DEBUG) { System.out.println("ReferenceExpression ::= Primary COLON_COLON..."); } //$NON-NLS-1$ + case 544 : if (DEBUG) { System.out.println("ReferenceExpression ::= Primary COLON_COLON..."); } //$NON-NLS-1$ consumeReferenceExpressionPrimaryForm(); break; - case 552 : if (DEBUG) { System.out.println("ReferenceExpression ::= QualifiedSuperReceiver..."); } //$NON-NLS-1$ + case 545 : if (DEBUG) { System.out.println("ReferenceExpression ::= QualifiedSuperReceiver..."); } //$NON-NLS-1$ consumeReferenceExpressionPrimaryForm(); break; - case 553 : if (DEBUG) { System.out.println("ReferenceExpression ::= super COLON_COLON..."); } //$NON-NLS-1$ + case 546 : if (DEBUG) { System.out.println("ReferenceExpression ::= super COLON_COLON..."); } //$NON-NLS-1$ consumeReferenceExpressionSuperForm(); break; - case 554 : if (DEBUG) { System.out.println("NonWildTypeArgumentsopt ::="); } //$NON-NLS-1$ + case 547 : if (DEBUG) { System.out.println("NonWildTypeArgumentsopt ::="); } //$NON-NLS-1$ consumeEmptyTypeArguments(); break; - case 556 : if (DEBUG) { System.out.println("IdentifierOrNew ::= Identifier"); } //$NON-NLS-1$ + case 549 : if (DEBUG) { System.out.println("IdentifierOrNew ::= Identifier"); } //$NON-NLS-1$ consumeIdentifierOrNew(false); break; - case 557 : if (DEBUG) { System.out.println("IdentifierOrNew ::= new"); } //$NON-NLS-1$ + case 550 : if (DEBUG) { System.out.println("IdentifierOrNew ::= new"); } //$NON-NLS-1$ consumeIdentifierOrNew(true); break; - case 558 : if (DEBUG) { System.out.println("LambdaExpression ::= LambdaParameters ARROW LambdaBody"); } //$NON-NLS-1$ + case 551 : if (DEBUG) { System.out.println("LambdaExpression ::= LambdaParameters ARROW LambdaBody"); } //$NON-NLS-1$ consumeLambdaExpression(); break; - case 559 : if (DEBUG) { System.out.println("NestedLambda ::="); } //$NON-NLS-1$ + case 552 : if (DEBUG) { System.out.println("NestedLambda ::="); } //$NON-NLS-1$ consumeNestedLambda(); break; - case 560 : if (DEBUG) { System.out.println("LambdaParameters ::= UNDERSCORE NestedLambda"); } //$NON-NLS-1$ + case 553 : if (DEBUG) { System.out.println("LambdaParameters ::= UNDERSCORE NestedLambda"); } //$NON-NLS-1$ consumeTypeElidedLambdaParameter(false); break; - case 561 : if (DEBUG) { System.out.println("LambdaParameters ::= Identifier NestedLambda"); } //$NON-NLS-1$ + case 554 : if (DEBUG) { System.out.println("LambdaParameters ::= Identifier NestedLambda"); } //$NON-NLS-1$ consumeTypeElidedLambdaParameter(false); break; - case 567 : if (DEBUG) { System.out.println("TypeElidedFormalParameterList ::=..."); } //$NON-NLS-1$ + case 560 : if (DEBUG) { System.out.println("TypeElidedFormalParameterList ::=..."); } //$NON-NLS-1$ consumeFormalParameterList(); break; - case 568 : if (DEBUG) { System.out.println("TypeElidedFormalParameter ::= Modifiersopt Identifier"); } //$NON-NLS-1$ + case 561 : if (DEBUG) { System.out.println("TypeElidedFormalParameter ::= Modifiersopt Identifier"); } //$NON-NLS-1$ consumeTypeElidedLambdaParameter(true); break; - case 569 : if (DEBUG) { System.out.println("TypeElidedFormalParameter ::= UNDERSCORE"); } //$NON-NLS-1$ + case 562 : if (DEBUG) { System.out.println("TypeElidedFormalParameter ::= UNDERSCORE"); } //$NON-NLS-1$ consumeBracketedTypeElidedUnderscoreLambdaParameter(); break; - case 572 : if (DEBUG) { System.out.println("ElidedLeftBraceAndReturn ::="); } //$NON-NLS-1$ + case 565 : if (DEBUG) { System.out.println("ElidedLeftBraceAndReturn ::="); } //$NON-NLS-1$ consumeElidedLeftBraceAndReturn(); break; - case 573 : if (DEBUG) { System.out.println("AllocationHeader ::= new ClassType LPAREN..."); } //$NON-NLS-1$ + case 566 : if (DEBUG) { System.out.println("AllocationHeader ::= new ClassType LPAREN..."); } //$NON-NLS-1$ consumeAllocationHeader(); break; - case 574 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new..."); } //$NON-NLS-1$ + case 567 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new..."); } //$NON-NLS-1$ consumeClassInstanceCreationExpressionWithTypeArguments(); break; - case 575 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new ClassType..."); } //$NON-NLS-1$ + case 568 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new ClassType..."); } //$NON-NLS-1$ consumeClassInstanceCreationExpression(); break; - case 576 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); } //$NON-NLS-1$ + case 569 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); } //$NON-NLS-1$ consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ; break; - case 577 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); } //$NON-NLS-1$ + case 570 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); } //$NON-NLS-1$ consumeClassInstanceCreationExpressionQualified() ; break; - case 578 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); } //$NON-NLS-1$ + case 571 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); } //$NON-NLS-1$ consumeClassInstanceCreationExpressionQualified() ; break; - case 579 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); } //$NON-NLS-1$ + case 572 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); } //$NON-NLS-1$ consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ; break; - case 580 : if (DEBUG) { System.out.println("EnterInstanceCreationArgumentList ::="); } //$NON-NLS-1$ + case 573 : if (DEBUG) { System.out.println("EnterInstanceCreationArgumentList ::="); } //$NON-NLS-1$ consumeEnterInstanceCreationArgumentList(); break; - case 581 : if (DEBUG) { System.out.println("ClassInstanceCreationExpressionName ::= Name DOT new"); } //$NON-NLS-1$ + case 574 : if (DEBUG) { System.out.println("ClassInstanceCreationExpressionName ::= Name DOT new"); } //$NON-NLS-1$ consumeClassInstanceCreationExpressionName() ; break; - case 582 : if (DEBUG) { System.out.println("UnqualifiedClassBodyopt ::="); } //$NON-NLS-1$ + case 575 : if (DEBUG) { System.out.println("UnqualifiedClassBodyopt ::="); } //$NON-NLS-1$ consumeClassBodyopt(); break; - case 584 : if (DEBUG) { System.out.println("UnqualifiedEnterAnonymousClassBody ::="); } //$NON-NLS-1$ + case 577 : if (DEBUG) { System.out.println("UnqualifiedEnterAnonymousClassBody ::="); } //$NON-NLS-1$ consumeEnterAnonymousClassBody(false); break; - case 585 : if (DEBUG) { System.out.println("QualifiedClassBodyopt ::="); } //$NON-NLS-1$ + case 578 : if (DEBUG) { System.out.println("QualifiedClassBodyopt ::="); } //$NON-NLS-1$ consumeClassBodyopt(); break; - case 587 : if (DEBUG) { System.out.println("QualifiedEnterAnonymousClassBody ::="); } //$NON-NLS-1$ + case 580 : if (DEBUG) { System.out.println("QualifiedEnterAnonymousClassBody ::="); } //$NON-NLS-1$ consumeEnterAnonymousClassBody(true); break; - case 589 : if (DEBUG) { System.out.println("ArgumentList ::= ArgumentList COMMA Expression"); } //$NON-NLS-1$ + case 582 : if (DEBUG) { System.out.println("ArgumentList ::= ArgumentList COMMA Expression"); } //$NON-NLS-1$ consumeArgumentList(); break; - case 590 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new PrimitiveType..."); } //$NON-NLS-1$ + case 583 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new PrimitiveType..."); } //$NON-NLS-1$ consumeArrayCreationHeader(); break; - case 591 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new ClassOrInterfaceType..."); } //$NON-NLS-1$ + case 584 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new ClassOrInterfaceType..."); } //$NON-NLS-1$ consumeArrayCreationHeader(); break; - case 592 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$ + case 585 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$ consumeArrayCreationExpressionWithoutInitializer(); break; - case 593 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new PrimitiveType"); } //$NON-NLS-1$ + case 586 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new PrimitiveType"); } //$NON-NLS-1$ consumeArrayCreationExpressionWithInitializer(); break; - case 594 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$ + case 587 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$ consumeArrayCreationExpressionWithoutInitializer(); break; - case 595 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new..."); } //$NON-NLS-1$ + case 588 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new..."); } //$NON-NLS-1$ consumeArrayCreationExpressionWithInitializer(); break; - case 597 : if (DEBUG) { System.out.println("DimWithOrWithOutExprs ::= DimWithOrWithOutExprs..."); } //$NON-NLS-1$ + case 590 : if (DEBUG) { System.out.println("DimWithOrWithOutExprs ::= DimWithOrWithOutExprs..."); } //$NON-NLS-1$ consumeDimWithOrWithOutExprs(); break; - case 599 : if (DEBUG) { System.out.println("DimWithOrWithOutExpr ::= TypeAnnotationsopt LBRACKET..."); } //$NON-NLS-1$ + case 592 : if (DEBUG) { System.out.println("DimWithOrWithOutExpr ::= TypeAnnotationsopt LBRACKET..."); } //$NON-NLS-1$ consumeDimWithOrWithOutExpr(); break; - case 600 : if (DEBUG) { System.out.println("Dims ::= DimsLoop"); } //$NON-NLS-1$ + case 593 : if (DEBUG) { System.out.println("Dims ::= DimsLoop"); } //$NON-NLS-1$ consumeDims(); break; - case 603 : if (DEBUG) { System.out.println("OneDimLoop ::= LBRACKET RBRACKET"); } //$NON-NLS-1$ + case 596 : if (DEBUG) { System.out.println("OneDimLoop ::= LBRACKET RBRACKET"); } //$NON-NLS-1$ consumeOneDimLoop(false); break; - case 604 : if (DEBUG) { System.out.println("OneDimLoop ::= TypeAnnotations LBRACKET RBRACKET"); } //$NON-NLS-1$ + case 597 : if (DEBUG) { System.out.println("OneDimLoop ::= TypeAnnotations LBRACKET RBRACKET"); } //$NON-NLS-1$ consumeOneDimLoop(true); break; - case 605 : if (DEBUG) { System.out.println("FieldAccess ::= Primary DOT Identifier"); } //$NON-NLS-1$ + case 598 : if (DEBUG) { System.out.println("FieldAccess ::= Primary DOT Identifier"); } //$NON-NLS-1$ consumeFieldAccess(false); break; - case 606 : if (DEBUG) { System.out.println("FieldAccess ::= super DOT Identifier"); } //$NON-NLS-1$ + case 599 : if (DEBUG) { System.out.println("FieldAccess ::= super DOT Identifier"); } //$NON-NLS-1$ consumeFieldAccess(true); break; - case 607 : if (DEBUG) { System.out.println("FieldAccess ::= QualifiedSuperReceiver DOT Identifier"); } //$NON-NLS-1$ + case 600 : if (DEBUG) { System.out.println("FieldAccess ::= QualifiedSuperReceiver DOT Identifier"); } //$NON-NLS-1$ consumeFieldAccess(false); break; - case 608 : if (DEBUG) { System.out.println("MethodInvocation ::= Name LPAREN ArgumentListopt RPAREN"); } //$NON-NLS-1$ + case 601 : if (DEBUG) { System.out.println("MethodInvocation ::= Name LPAREN ArgumentListopt RPAREN"); } //$NON-NLS-1$ consumeMethodInvocationName(); break; - case 609 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT OnlyTypeArguments..."); } //$NON-NLS-1$ + case 602 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT OnlyTypeArguments..."); } //$NON-NLS-1$ consumeMethodInvocationNameWithTypeArguments(); break; - case 610 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT OnlyTypeArguments..."); } //$NON-NLS-1$ + case 603 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT OnlyTypeArguments..."); } //$NON-NLS-1$ consumeMethodInvocationPrimaryWithTypeArguments(); break; - case 611 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT Identifier LPAREN..."); } //$NON-NLS-1$ + case 604 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT Identifier LPAREN..."); } //$NON-NLS-1$ consumeMethodInvocationPrimary(); break; - case 612 : if (DEBUG) { System.out.println("MethodInvocation ::= QualifiedSuperReceiver DOT..."); } //$NON-NLS-1$ + case 605 : if (DEBUG) { System.out.println("MethodInvocation ::= QualifiedSuperReceiver DOT..."); } //$NON-NLS-1$ consumeMethodInvocationPrimary(); break; - case 613 : if (DEBUG) { System.out.println("MethodInvocation ::= QualifiedSuperReceiver DOT..."); } //$NON-NLS-1$ + case 606 : if (DEBUG) { System.out.println("MethodInvocation ::= QualifiedSuperReceiver DOT..."); } //$NON-NLS-1$ consumeMethodInvocationPrimaryWithTypeArguments(); break; - case 614 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT OnlyTypeArguments..."); } //$NON-NLS-1$ + case 607 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT OnlyTypeArguments..."); } //$NON-NLS-1$ consumeMethodInvocationSuperWithTypeArguments(); break; - case 615 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT Identifier LPAREN..."); } //$NON-NLS-1$ + case 608 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT Identifier LPAREN..."); } //$NON-NLS-1$ consumeMethodInvocationSuper(); break; - case 616 : if (DEBUG) { System.out.println("ArrayAccess ::= Name LBRACKET Expression RBRACKET"); } //$NON-NLS-1$ + case 609 : if (DEBUG) { System.out.println("ArrayAccess ::= Name LBRACKET Expression RBRACKET"); } //$NON-NLS-1$ consumeArrayAccess(true); break; - case 617 : if (DEBUG) { System.out.println("ArrayAccess ::= PrimaryNoNewArray LBRACKET Expression..."); } //$NON-NLS-1$ + case 610 : if (DEBUG) { System.out.println("ArrayAccess ::= PrimaryNoNewArray LBRACKET Expression..."); } //$NON-NLS-1$ consumeArrayAccess(false); break; - case 618 : if (DEBUG) { System.out.println("ArrayAccess ::= ArrayCreationWithArrayInitializer..."); } //$NON-NLS-1$ + case 611 : if (DEBUG) { System.out.println("ArrayAccess ::= ArrayCreationWithArrayInitializer..."); } //$NON-NLS-1$ consumeArrayAccess(false); break; - case 620 : if (DEBUG) { System.out.println("PostfixExpression ::= Name"); } //$NON-NLS-1$ + case 613 : if (DEBUG) { System.out.println("PostfixExpression ::= Name"); } //$NON-NLS-1$ consumePostfixExpression(); break; - case 623 : if (DEBUG) { System.out.println("PostIncrementExpression ::= PostfixExpression PLUS_PLUS"); } //$NON-NLS-1$ + case 616 : if (DEBUG) { System.out.println("PostIncrementExpression ::= PostfixExpression PLUS_PLUS"); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.PLUS,true); break; - case 624 : if (DEBUG) { System.out.println("PostDecrementExpression ::= PostfixExpression..."); } //$NON-NLS-1$ + case 617 : if (DEBUG) { System.out.println("PostDecrementExpression ::= PostfixExpression..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.MINUS,true); break; - case 625 : if (DEBUG) { System.out.println("PushPosition ::="); } //$NON-NLS-1$ + case 618 : if (DEBUG) { System.out.println("PushPosition ::="); } //$NON-NLS-1$ consumePushPosition(); break; - case 628 : if (DEBUG) { System.out.println("UnaryExpression ::= PLUS PushPosition UnaryExpression"); } //$NON-NLS-1$ + case 621 : if (DEBUG) { System.out.println("UnaryExpression ::= PLUS PushPosition UnaryExpression"); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.PLUS); break; - case 629 : if (DEBUG) { System.out.println("UnaryExpression ::= MINUS PushPosition UnaryExpression"); } //$NON-NLS-1$ + case 622 : if (DEBUG) { System.out.println("UnaryExpression ::= MINUS PushPosition UnaryExpression"); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.MINUS); break; - case 631 : if (DEBUG) { System.out.println("PreIncrementExpression ::= PLUS_PLUS PushPosition..."); } //$NON-NLS-1$ + case 624 : if (DEBUG) { System.out.println("PreIncrementExpression ::= PLUS_PLUS PushPosition..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.PLUS,false); break; - case 632 : if (DEBUG) { System.out.println("PreDecrementExpression ::= MINUS_MINUS PushPosition..."); } //$NON-NLS-1$ + case 625 : if (DEBUG) { System.out.println("PreDecrementExpression ::= MINUS_MINUS PushPosition..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.MINUS,false); break; - case 634 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= TWIDDLE PushPosition..."); } //$NON-NLS-1$ + case 627 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= TWIDDLE PushPosition..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.TWIDDLE); break; - case 635 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= NOT PushPosition..."); } //$NON-NLS-1$ + case 628 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= NOT PushPosition..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.NOT); break; - case 637 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN PrimitiveType Dimsopt..."); } //$NON-NLS-1$ + case 630 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN PrimitiveType Dimsopt..."); } //$NON-NLS-1$ consumeCastExpressionWithPrimitiveType(); break; - case 638 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); } //$NON-NLS-1$ + case 631 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); } //$NON-NLS-1$ consumeCastExpressionWithGenericsArray(); break; - case 639 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); } //$NON-NLS-1$ + case 632 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); } //$NON-NLS-1$ consumeCastExpressionWithQualifiedGenericsArray(); break; - case 640 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name PushRPAREN..."); } //$NON-NLS-1$ + case 633 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name PushRPAREN..."); } //$NON-NLS-1$ consumeCastExpressionLL1(); break; - case 641 : if (DEBUG) { System.out.println("CastExpression ::= BeginIntersectionCast PushLPAREN..."); } //$NON-NLS-1$ + case 634 : if (DEBUG) { System.out.println("CastExpression ::= BeginIntersectionCast PushLPAREN..."); } //$NON-NLS-1$ consumeCastExpressionLL1WithBounds(); break; - case 642 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name Dims..."); } //$NON-NLS-1$ + case 635 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name Dims..."); } //$NON-NLS-1$ consumeCastExpressionWithNameArray(); break; - case 643 : if (DEBUG) { System.out.println("AdditionalBoundsListOpt ::="); } //$NON-NLS-1$ + case 636 : if (DEBUG) { System.out.println("AdditionalBoundsListOpt ::="); } //$NON-NLS-1$ consumeZeroAdditionalBounds(); break; - case 647 : if (DEBUG) { System.out.println("OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments"); } //$NON-NLS-1$ + case 640 : if (DEBUG) { System.out.println("OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments"); } //$NON-NLS-1$ consumeOnlyTypeArgumentsForCastExpression(); break; - case 648 : if (DEBUG) { System.out.println("InsideCastExpression ::="); } //$NON-NLS-1$ + case 641 : if (DEBUG) { System.out.println("InsideCastExpression ::="); } //$NON-NLS-1$ consumeInsideCastExpression(); break; - case 649 : if (DEBUG) { System.out.println("InsideCastExpressionLL1 ::="); } //$NON-NLS-1$ + case 642 : if (DEBUG) { System.out.println("InsideCastExpressionLL1 ::="); } //$NON-NLS-1$ consumeInsideCastExpressionLL1(); break; - case 650 : if (DEBUG) { System.out.println("InsideCastExpressionLL1WithBounds ::="); } //$NON-NLS-1$ + case 643 : if (DEBUG) { System.out.println("InsideCastExpressionLL1WithBounds ::="); } //$NON-NLS-1$ consumeInsideCastExpressionLL1WithBounds (); break; - case 651 : if (DEBUG) { System.out.println("InsideCastExpressionWithQualifiedGenerics ::="); } //$NON-NLS-1$ + case 644 : if (DEBUG) { System.out.println("InsideCastExpressionWithQualifiedGenerics ::="); } //$NON-NLS-1$ consumeInsideCastExpressionWithQualifiedGenerics(); break; - case 653 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$ + case 646 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.MULTIPLY); break; - case 654 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$ + case 647 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.DIVIDE); break; - case 655 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$ + case 648 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.REMAINDER); break; - case 657 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression PLUS..."); } //$NON-NLS-1$ + case 650 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression PLUS..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.PLUS); break; - case 658 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression MINUS..."); } //$NON-NLS-1$ + case 651 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression MINUS..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.MINUS); break; - case 660 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression LEFT_SHIFT..."); } //$NON-NLS-1$ + case 653 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression LEFT_SHIFT..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.LEFT_SHIFT); break; - case 661 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression RIGHT_SHIFT..."); } //$NON-NLS-1$ + case 654 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression RIGHT_SHIFT..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.RIGHT_SHIFT); break; - case 662 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$ + case 655 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT); break; - case 664 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS..."); } //$NON-NLS-1$ + case 657 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.LESS); break; - case 665 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression GREATER..."); } //$NON-NLS-1$ + case 658 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression GREATER..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.GREATER); break; - case 666 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS_EQUAL"); } //$NON-NLS-1$ + case 659 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS_EQUAL"); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.LESS_EQUAL); break; - case 667 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression..."); } //$NON-NLS-1$ + case 660 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.GREATER_EQUAL); break; - case 669 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression EQUAL_EQUAL..."); } //$NON-NLS-1$ + case 662 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression EQUAL_EQUAL..."); } //$NON-NLS-1$ consumeEqualityExpression(OperatorIds.EQUAL_EQUAL); break; - case 670 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression NOT_EQUAL..."); } //$NON-NLS-1$ + case 663 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression NOT_EQUAL..."); } //$NON-NLS-1$ consumeEqualityExpression(OperatorIds.NOT_EQUAL); break; - case 672 : if (DEBUG) { System.out.println("AndExpression ::= AndExpression AND EqualityExpression"); } //$NON-NLS-1$ + case 665 : if (DEBUG) { System.out.println("AndExpression ::= AndExpression AND EqualityExpression"); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.AND); break; - case 674 : if (DEBUG) { System.out.println("ExclusiveOrExpression ::= ExclusiveOrExpression XOR..."); } //$NON-NLS-1$ + case 667 : if (DEBUG) { System.out.println("ExclusiveOrExpression ::= ExclusiveOrExpression XOR..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.XOR); break; - case 676 : if (DEBUG) { System.out.println("InclusiveOrExpression ::= InclusiveOrExpression OR..."); } //$NON-NLS-1$ + case 669 : if (DEBUG) { System.out.println("InclusiveOrExpression ::= InclusiveOrExpression OR..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.OR); break; - case 678 : if (DEBUG) { System.out.println("ConditionalAndExpression ::= ConditionalAndExpression..."); } //$NON-NLS-1$ + case 671 : if (DEBUG) { System.out.println("ConditionalAndExpression ::= ConditionalAndExpression..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.AND_AND); break; - case 680 : if (DEBUG) { System.out.println("ConditionalOrExpression ::= ConditionalOrExpression..."); } //$NON-NLS-1$ + case 673 : if (DEBUG) { System.out.println("ConditionalOrExpression ::= ConditionalOrExpression..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.OR_OR); break; - case 682 : if (DEBUG) { System.out.println("ConditionalExpression ::= ConditionalOrExpression..."); } //$NON-NLS-1$ + case 675 : if (DEBUG) { System.out.println("ConditionalExpression ::= ConditionalOrExpression..."); } //$NON-NLS-1$ consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ; break; - case 685 : if (DEBUG) { System.out.println("Assignment ::= PostfixExpression AssignmentOperator..."); } //$NON-NLS-1$ + case 678 : if (DEBUG) { System.out.println("Assignment ::= PostfixExpression AssignmentOperator..."); } //$NON-NLS-1$ consumeAssignment(); break; - case 687 : if (DEBUG) { System.out.println("Assignment ::= InvalidArrayInitializerAssignement"); } //$NON-NLS-1$ + case 680 : if (DEBUG) { System.out.println("Assignment ::= InvalidArrayInitializerAssignement"); } //$NON-NLS-1$ ignoreExpressionAssignment(); break; - case 688 : if (DEBUG) { System.out.println("AssignmentOperator ::= EQUAL"); } //$NON-NLS-1$ + case 681 : if (DEBUG) { System.out.println("AssignmentOperator ::= EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(EQUAL); break; - case 689 : if (DEBUG) { System.out.println("AssignmentOperator ::= MULTIPLY_EQUAL"); } //$NON-NLS-1$ + case 682 : if (DEBUG) { System.out.println("AssignmentOperator ::= MULTIPLY_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(MULTIPLY); break; - case 690 : if (DEBUG) { System.out.println("AssignmentOperator ::= DIVIDE_EQUAL"); } //$NON-NLS-1$ + case 683 : if (DEBUG) { System.out.println("AssignmentOperator ::= DIVIDE_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(DIVIDE); break; - case 691 : if (DEBUG) { System.out.println("AssignmentOperator ::= REMAINDER_EQUAL"); } //$NON-NLS-1$ + case 684 : if (DEBUG) { System.out.println("AssignmentOperator ::= REMAINDER_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(REMAINDER); break; - case 692 : if (DEBUG) { System.out.println("AssignmentOperator ::= PLUS_EQUAL"); } //$NON-NLS-1$ + case 685 : if (DEBUG) { System.out.println("AssignmentOperator ::= PLUS_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(PLUS); break; - case 693 : if (DEBUG) { System.out.println("AssignmentOperator ::= MINUS_EQUAL"); } //$NON-NLS-1$ + case 686 : if (DEBUG) { System.out.println("AssignmentOperator ::= MINUS_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(MINUS); break; - case 694 : if (DEBUG) { System.out.println("AssignmentOperator ::= LEFT_SHIFT_EQUAL"); } //$NON-NLS-1$ + case 687 : if (DEBUG) { System.out.println("AssignmentOperator ::= LEFT_SHIFT_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(LEFT_SHIFT); break; - case 695 : if (DEBUG) { System.out.println("AssignmentOperator ::= RIGHT_SHIFT_EQUAL"); } //$NON-NLS-1$ + case 688 : if (DEBUG) { System.out.println("AssignmentOperator ::= RIGHT_SHIFT_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(RIGHT_SHIFT); break; - case 696 : if (DEBUG) { System.out.println("AssignmentOperator ::= UNSIGNED_RIGHT_SHIFT_EQUAL"); } //$NON-NLS-1$ + case 689 : if (DEBUG) { System.out.println("AssignmentOperator ::= UNSIGNED_RIGHT_SHIFT_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(UNSIGNED_RIGHT_SHIFT); break; - case 697 : if (DEBUG) { System.out.println("AssignmentOperator ::= AND_EQUAL"); } //$NON-NLS-1$ + case 690 : if (DEBUG) { System.out.println("AssignmentOperator ::= AND_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(AND); break; - case 698 : if (DEBUG) { System.out.println("AssignmentOperator ::= XOR_EQUAL"); } //$NON-NLS-1$ + case 691 : if (DEBUG) { System.out.println("AssignmentOperator ::= XOR_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(XOR); break; - case 699 : if (DEBUG) { System.out.println("AssignmentOperator ::= OR_EQUAL"); } //$NON-NLS-1$ + case 692 : if (DEBUG) { System.out.println("AssignmentOperator ::= OR_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(OR); break; - case 700 : if (DEBUG) { System.out.println("Expression ::= AssignmentExpression"); } //$NON-NLS-1$ + case 693 : if (DEBUG) { System.out.println("Expression ::= AssignmentExpression"); } //$NON-NLS-1$ consumeExpression(); break; - case 703 : if (DEBUG) { System.out.println("Expressionopt ::="); } //$NON-NLS-1$ + case 696 : if (DEBUG) { System.out.println("Expressionopt ::="); } //$NON-NLS-1$ consumeEmptyExpression(); break; - case 708 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::="); } //$NON-NLS-1$ + case 701 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::="); } //$NON-NLS-1$ consumeEmptyClassBodyDeclarationsopt(); break; - case 709 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$ + case 702 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$ consumeClassBodyDeclarationsopt(); break; - case 710 : if (DEBUG) { System.out.println("Modifiersopt ::="); } //$NON-NLS-1$ + case 703 : if (DEBUG) { System.out.println("Modifiersopt ::="); } //$NON-NLS-1$ consumeDefaultModifiers(); break; - case 711 : if (DEBUG) { System.out.println("Modifiersopt ::= Modifiers"); } //$NON-NLS-1$ + case 704 : if (DEBUG) { System.out.println("Modifiersopt ::= Modifiers"); } //$NON-NLS-1$ consumeModifiers(); break; - case 712 : if (DEBUG) { System.out.println("BlockStatementsopt ::="); } //$NON-NLS-1$ + case 705 : if (DEBUG) { System.out.println("BlockStatementsopt ::="); } //$NON-NLS-1$ consumeEmptyBlockStatementsopt(); break; - case 714 : if (DEBUG) { System.out.println("Dimsopt ::="); } //$NON-NLS-1$ + case 707 : if (DEBUG) { System.out.println("Dimsopt ::="); } //$NON-NLS-1$ consumeEmptyDimsopt(); break; - case 716 : if (DEBUG) { System.out.println("ArgumentListopt ::="); } //$NON-NLS-1$ + case 709 : if (DEBUG) { System.out.println("ArgumentListopt ::="); } //$NON-NLS-1$ consumeEmptyArgumentListopt(); break; - case 720 : if (DEBUG) { System.out.println("FormalParameterListopt ::="); } //$NON-NLS-1$ + case 713 : if (DEBUG) { System.out.println("FormalParameterListopt ::="); } //$NON-NLS-1$ consumeFormalParameterListopt(); break; - case 726 : if (DEBUG) { System.out.println("PermittedTypesopt ::= RestrictedIdentifierpermits..."); } //$NON-NLS-1$ + case 719 : if (DEBUG) { System.out.println("PermittedTypesopt ::= RestrictedIdentifierpermits..."); } //$NON-NLS-1$ consumePermittedTypes(); break; - case 727 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::="); } //$NON-NLS-1$ + case 720 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::="); } //$NON-NLS-1$ consumeEmptyInterfaceMemberDeclarationsopt(); break; - case 728 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$ + case 721 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$ consumeInterfaceMemberDeclarationsopt(); break; - case 729 : if (DEBUG) { System.out.println("NestedType ::="); } //$NON-NLS-1$ + case 722 : if (DEBUG) { System.out.println("NestedType ::="); } //$NON-NLS-1$ consumeNestedType(); break; - case 730 : if (DEBUG) { System.out.println("ForInitopt ::="); } //$NON-NLS-1$ + case 723 : if (DEBUG) { System.out.println("ForInitopt ::="); } //$NON-NLS-1$ consumeEmptyForInitopt(); break; - case 732 : if (DEBUG) { System.out.println("ForUpdateopt ::="); } //$NON-NLS-1$ + case 725 : if (DEBUG) { System.out.println("ForUpdateopt ::="); } //$NON-NLS-1$ consumeEmptyForUpdateopt(); break; - case 736 : if (DEBUG) { System.out.println("Catchesopt ::="); } //$NON-NLS-1$ + case 729 : if (DEBUG) { System.out.println("Catchesopt ::="); } //$NON-NLS-1$ consumeEmptyCatchesopt(); break; - case 738 : if (DEBUG) { System.out.println("EnumDeclaration ::= EnumHeader EnumBody"); } //$NON-NLS-1$ + case 731 : if (DEBUG) { System.out.println("EnumDeclaration ::= EnumHeader EnumBody"); } //$NON-NLS-1$ consumeEnumDeclaration(); break; - case 739 : if (DEBUG) { System.out.println("EnumHeader ::= EnumHeaderName ClassHeaderImplementsopt"); } //$NON-NLS-1$ + case 732 : if (DEBUG) { System.out.println("EnumHeader ::= EnumHeaderName ClassHeaderImplementsopt"); } //$NON-NLS-1$ consumeEnumHeader(); break; - case 740 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier"); } //$NON-NLS-1$ + case 733 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier"); } //$NON-NLS-1$ consumeEnumHeaderName(); break; - case 741 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier..."); } //$NON-NLS-1$ + case 734 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier..."); } //$NON-NLS-1$ consumeEnumHeaderNameWithTypeParameters(); break; - case 742 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumBodyDeclarationsopt RBRACE"); } //$NON-NLS-1$ + case 735 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumBodyDeclarationsopt RBRACE"); } //$NON-NLS-1$ consumeEnumBodyNoConstants(); break; - case 743 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE COMMA EnumBodyDeclarationsopt..."); } //$NON-NLS-1$ + case 736 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE COMMA EnumBodyDeclarationsopt..."); } //$NON-NLS-1$ consumeEnumBodyNoConstants(); break; - case 744 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants COMMA..."); } //$NON-NLS-1$ + case 737 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants COMMA..."); } //$NON-NLS-1$ consumeEnumBodyWithConstants(); break; - case 745 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants..."); } //$NON-NLS-1$ + case 738 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants..."); } //$NON-NLS-1$ consumeEnumBodyWithConstants(); break; - case 747 : if (DEBUG) { System.out.println("EnumConstants ::= EnumConstants COMMA EnumConstant"); } //$NON-NLS-1$ + case 740 : if (DEBUG) { System.out.println("EnumConstants ::= EnumConstants COMMA EnumConstant"); } //$NON-NLS-1$ consumeEnumConstants(); break; - case 748 : if (DEBUG) { System.out.println("EnumConstantHeaderName ::= Modifiersopt Identifier"); } //$NON-NLS-1$ + case 741 : if (DEBUG) { System.out.println("EnumConstantHeaderName ::= Modifiersopt Identifier"); } //$NON-NLS-1$ consumeEnumConstantHeaderName(); break; - case 749 : if (DEBUG) { System.out.println("EnumConstantHeader ::= EnumConstantHeaderName..."); } //$NON-NLS-1$ + case 742 : if (DEBUG) { System.out.println("EnumConstantHeader ::= EnumConstantHeaderName..."); } //$NON-NLS-1$ consumeEnumConstantHeader(); break; - case 750 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader ForceNoDiet..."); } //$NON-NLS-1$ + case 743 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader ForceNoDiet..."); } //$NON-NLS-1$ consumeEnumConstantWithClassBody(); break; - case 751 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader"); } //$NON-NLS-1$ + case 744 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader"); } //$NON-NLS-1$ consumeEnumConstantNoClassBody(); break; - case 752 : if (DEBUG) { System.out.println("Arguments ::= LPAREN ArgumentListopt RPAREN"); } //$NON-NLS-1$ + case 745 : if (DEBUG) { System.out.println("Arguments ::= LPAREN ArgumentListopt RPAREN"); } //$NON-NLS-1$ consumeArguments(); break; - case 753 : if (DEBUG) { System.out.println("Argumentsopt ::="); } //$NON-NLS-1$ + case 746 : if (DEBUG) { System.out.println("Argumentsopt ::="); } //$NON-NLS-1$ consumeEmptyArguments(); break; - case 755 : if (DEBUG) { System.out.println("EnumDeclarations ::= SEMICOLON ClassBodyDeclarationsopt"); } //$NON-NLS-1$ + case 748 : if (DEBUG) { System.out.println("EnumDeclarations ::= SEMICOLON ClassBodyDeclarationsopt"); } //$NON-NLS-1$ consumeEnumDeclarations(); break; - case 756 : if (DEBUG) { System.out.println("EnumBodyDeclarationsopt ::="); } //$NON-NLS-1$ + case 749 : if (DEBUG) { System.out.println("EnumBodyDeclarationsopt ::="); } //$NON-NLS-1$ consumeEmptyEnumDeclarations(); break; - case 758 : if (DEBUG) { System.out.println("EnhancedForStatement ::= EnhancedForStatementHeader..."); } //$NON-NLS-1$ + case 751 : if (DEBUG) { System.out.println("EnhancedForStatement ::= EnhancedForStatementHeader..."); } //$NON-NLS-1$ consumeEnhancedForStatement(); break; - case 759 : if (DEBUG) { System.out.println("EnhancedForStatementNoShortIf ::=..."); } //$NON-NLS-1$ + case 752 : if (DEBUG) { System.out.println("EnhancedForStatementNoShortIf ::=..."); } //$NON-NLS-1$ consumeEnhancedForStatement(); break; - case 760 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Type..."); } //$NON-NLS-1$ + case 753 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Type..."); } //$NON-NLS-1$ consumeEnhancedForStatementHeaderInit(false); break; - case 761 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Modifiers"); } //$NON-NLS-1$ + case 754 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Modifiers"); } //$NON-NLS-1$ consumeEnhancedForStatementHeaderInit(true); break; - case 762 : if (DEBUG) { System.out.println("EnhancedForStatementHeader ::=..."); } //$NON-NLS-1$ + case 755 : if (DEBUG) { System.out.println("EnhancedForStatementHeader ::=..."); } //$NON-NLS-1$ consumeEnhancedForStatementHeader(); break; - case 763 : if (DEBUG) { System.out.println("SingleStaticImportDeclaration ::=..."); } //$NON-NLS-1$ + case 756 : if (DEBUG) { System.out.println("SingleStaticImportDeclaration ::=..."); } //$NON-NLS-1$ consumeImportDeclaration(); break; - case 764 : if (DEBUG) { System.out.println("SingleStaticImportDeclarationName ::= import static Name"); } //$NON-NLS-1$ + case 757 : if (DEBUG) { System.out.println("SingleStaticImportDeclarationName ::= import static Name"); } //$NON-NLS-1$ consumeSingleStaticImportDeclarationName(); break; - case 765 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclaration ::=..."); } //$NON-NLS-1$ + case 758 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclaration ::=..."); } //$NON-NLS-1$ consumeImportDeclaration(); break; - case 766 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclarationName ::= import static..."); } //$NON-NLS-1$ + case 759 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclarationName ::= import static..."); } //$NON-NLS-1$ consumeStaticImportOnDemandDeclarationName(); break; - case 768 : if (DEBUG) { System.out.println("SingleModuleImportDeclaration ::=..."); } //$NON-NLS-1$ + case 761 : if (DEBUG) { System.out.println("SingleModuleImportDeclaration ::=..."); } //$NON-NLS-1$ consumeImportDeclaration(); break; - case 769 : if (DEBUG) { System.out.println("SingleModuleImportDeclarationName ::= import module Name"); } //$NON-NLS-1$ + case 762 : if (DEBUG) { System.out.println("SingleModuleImportDeclarationName ::= import module Name"); } //$NON-NLS-1$ consumeSingleModuleImportDeclarationName(); break; - case 770 : if (DEBUG) { System.out.println("TypeArguments ::= LESS TypeArgumentList1"); } //$NON-NLS-1$ + case 763 : if (DEBUG) { System.out.println("TypeArguments ::= LESS TypeArgumentList1"); } //$NON-NLS-1$ consumeTypeArguments(); break; - case 771 : if (DEBUG) { System.out.println("OnlyTypeArguments ::= LESS TypeArgumentList1"); } //$NON-NLS-1$ + case 764 : if (DEBUG) { System.out.println("OnlyTypeArguments ::= LESS TypeArgumentList1"); } //$NON-NLS-1$ consumeOnlyTypeArguments(); break; - case 773 : if (DEBUG) { System.out.println("TypeArgumentList1 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$ + case 766 : if (DEBUG) { System.out.println("TypeArgumentList1 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$ consumeTypeArgumentList1(); break; - case 775 : if (DEBUG) { System.out.println("TypeArgumentList ::= TypeArgumentList COMMA TypeArgument"); } //$NON-NLS-1$ + case 768 : if (DEBUG) { System.out.println("TypeArgumentList ::= TypeArgumentList COMMA TypeArgument"); } //$NON-NLS-1$ consumeTypeArgumentList(); break; - case 776 : if (DEBUG) { System.out.println("TypeArgument ::= ReferenceType"); } //$NON-NLS-1$ + case 769 : if (DEBUG) { System.out.println("TypeArgument ::= ReferenceType"); } //$NON-NLS-1$ consumeTypeArgument(); break; - case 780 : if (DEBUG) { System.out.println("ReferenceType1 ::= ReferenceType GREATER"); } //$NON-NLS-1$ + case 773 : if (DEBUG) { System.out.println("ReferenceType1 ::= ReferenceType GREATER"); } //$NON-NLS-1$ consumeReferenceType1(); break; - case 781 : if (DEBUG) { System.out.println("ReferenceType1 ::= ClassOrInterface LESS..."); } //$NON-NLS-1$ + case 774 : if (DEBUG) { System.out.println("ReferenceType1 ::= ClassOrInterface LESS..."); } //$NON-NLS-1$ consumeTypeArgumentReferenceType1(); break; - case 783 : if (DEBUG) { System.out.println("TypeArgumentList2 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$ + case 776 : if (DEBUG) { System.out.println("TypeArgumentList2 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$ consumeTypeArgumentList2(); break; - case 786 : if (DEBUG) { System.out.println("ReferenceType2 ::= ReferenceType RIGHT_SHIFT"); } //$NON-NLS-1$ + case 779 : if (DEBUG) { System.out.println("ReferenceType2 ::= ReferenceType RIGHT_SHIFT"); } //$NON-NLS-1$ consumeReferenceType2(); break; - case 787 : if (DEBUG) { System.out.println("ReferenceType2 ::= ClassOrInterface LESS..."); } //$NON-NLS-1$ + case 780 : if (DEBUG) { System.out.println("ReferenceType2 ::= ClassOrInterface LESS..."); } //$NON-NLS-1$ consumeTypeArgumentReferenceType2(); break; - case 789 : if (DEBUG) { System.out.println("TypeArgumentList3 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$ + case 782 : if (DEBUG) { System.out.println("TypeArgumentList3 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$ consumeTypeArgumentList3(); break; - case 792 : if (DEBUG) { System.out.println("ReferenceType3 ::= ReferenceType UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$ + case 785 : if (DEBUG) { System.out.println("ReferenceType3 ::= ReferenceType UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$ consumeReferenceType3(); break; - case 793 : if (DEBUG) { System.out.println("Wildcard ::= TypeAnnotationsopt QUESTION"); } //$NON-NLS-1$ + case 786 : if (DEBUG) { System.out.println("Wildcard ::= TypeAnnotationsopt QUESTION"); } //$NON-NLS-1$ consumeWildcard(); break; - case 794 : if (DEBUG) { System.out.println("Wildcard ::= TypeAnnotationsopt QUESTION WildcardBounds"); } //$NON-NLS-1$ + case 787 : if (DEBUG) { System.out.println("Wildcard ::= TypeAnnotationsopt QUESTION WildcardBounds"); } //$NON-NLS-1$ consumeWildcardWithBounds(); break; - case 795 : if (DEBUG) { System.out.println("WildcardBounds ::= extends ReferenceType"); } //$NON-NLS-1$ + case 788 : if (DEBUG) { System.out.println("WildcardBounds ::= extends ReferenceType"); } //$NON-NLS-1$ consumeWildcardBoundsExtends(); break; - case 796 : if (DEBUG) { System.out.println("WildcardBounds ::= super ReferenceType"); } //$NON-NLS-1$ + case 789 : if (DEBUG) { System.out.println("WildcardBounds ::= super ReferenceType"); } //$NON-NLS-1$ consumeWildcardBoundsSuper(); break; - case 797 : if (DEBUG) { System.out.println("Wildcard1 ::= TypeAnnotationsopt QUESTION GREATER"); } //$NON-NLS-1$ + case 790 : if (DEBUG) { System.out.println("Wildcard1 ::= TypeAnnotationsopt QUESTION GREATER"); } //$NON-NLS-1$ consumeWildcard1(); break; - case 798 : if (DEBUG) { System.out.println("Wildcard1 ::= TypeAnnotationsopt QUESTION..."); } //$NON-NLS-1$ + case 791 : if (DEBUG) { System.out.println("Wildcard1 ::= TypeAnnotationsopt QUESTION..."); } //$NON-NLS-1$ consumeWildcard1WithBounds(); break; - case 799 : if (DEBUG) { System.out.println("WildcardBounds1 ::= extends ReferenceType1"); } //$NON-NLS-1$ + case 792 : if (DEBUG) { System.out.println("WildcardBounds1 ::= extends ReferenceType1"); } //$NON-NLS-1$ consumeWildcardBounds1Extends(); break; - case 800 : if (DEBUG) { System.out.println("WildcardBounds1 ::= super ReferenceType1"); } //$NON-NLS-1$ + case 793 : if (DEBUG) { System.out.println("WildcardBounds1 ::= super ReferenceType1"); } //$NON-NLS-1$ consumeWildcardBounds1Super(); break; - case 801 : if (DEBUG) { System.out.println("Wildcard2 ::= TypeAnnotationsopt QUESTION RIGHT_SHIFT"); } //$NON-NLS-1$ + case 794 : if (DEBUG) { System.out.println("Wildcard2 ::= TypeAnnotationsopt QUESTION RIGHT_SHIFT"); } //$NON-NLS-1$ consumeWildcard2(); break; - case 802 : if (DEBUG) { System.out.println("Wildcard2 ::= TypeAnnotationsopt QUESTION..."); } //$NON-NLS-1$ + case 795 : if (DEBUG) { System.out.println("Wildcard2 ::= TypeAnnotationsopt QUESTION..."); } //$NON-NLS-1$ consumeWildcard2WithBounds(); break; - case 803 : if (DEBUG) { System.out.println("WildcardBounds2 ::= extends ReferenceType2"); } //$NON-NLS-1$ + case 796 : if (DEBUG) { System.out.println("WildcardBounds2 ::= extends ReferenceType2"); } //$NON-NLS-1$ consumeWildcardBounds2Extends(); break; - case 804 : if (DEBUG) { System.out.println("WildcardBounds2 ::= super ReferenceType2"); } //$NON-NLS-1$ + case 797 : if (DEBUG) { System.out.println("WildcardBounds2 ::= super ReferenceType2"); } //$NON-NLS-1$ consumeWildcardBounds2Super(); break; - case 805 : if (DEBUG) { System.out.println("Wildcard3 ::= TypeAnnotationsopt QUESTION..."); } //$NON-NLS-1$ + case 798 : if (DEBUG) { System.out.println("Wildcard3 ::= TypeAnnotationsopt QUESTION..."); } //$NON-NLS-1$ consumeWildcard3(); break; - case 806 : if (DEBUG) { System.out.println("Wildcard3 ::= TypeAnnotationsopt QUESTION..."); } //$NON-NLS-1$ + case 799 : if (DEBUG) { System.out.println("Wildcard3 ::= TypeAnnotationsopt QUESTION..."); } //$NON-NLS-1$ consumeWildcard3WithBounds(); break; - case 807 : if (DEBUG) { System.out.println("WildcardBounds3 ::= extends ReferenceType3"); } //$NON-NLS-1$ + case 800 : if (DEBUG) { System.out.println("WildcardBounds3 ::= extends ReferenceType3"); } //$NON-NLS-1$ consumeWildcardBounds3Extends(); break; - case 808 : if (DEBUG) { System.out.println("WildcardBounds3 ::= super ReferenceType3"); } //$NON-NLS-1$ + case 801 : if (DEBUG) { System.out.println("WildcardBounds3 ::= super ReferenceType3"); } //$NON-NLS-1$ consumeWildcardBounds3Super(); break; - case 809 : if (DEBUG) { System.out.println("TypeParameterHeader ::= TypeAnnotationsopt Identifier"); } //$NON-NLS-1$ + case 802 : if (DEBUG) { System.out.println("TypeParameterHeader ::= TypeAnnotationsopt Identifier"); } //$NON-NLS-1$ consumeTypeParameterHeader(); break; - case 810 : if (DEBUG) { System.out.println("TypeParameters ::= LESS TypeParameterList1"); } //$NON-NLS-1$ + case 803 : if (DEBUG) { System.out.println("TypeParameters ::= LESS TypeParameterList1"); } //$NON-NLS-1$ consumeTypeParameters(); break; - case 812 : if (DEBUG) { System.out.println("TypeParameterList ::= TypeParameterList COMMA..."); } //$NON-NLS-1$ + case 805 : if (DEBUG) { System.out.println("TypeParameterList ::= TypeParameterList COMMA..."); } //$NON-NLS-1$ consumeTypeParameterList(); break; - case 814 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ + case 807 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ consumeTypeParameterWithExtends(); break; - case 815 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ + case 808 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ consumeTypeParameterWithExtendsAndBounds(); break; - case 817 : if (DEBUG) { System.out.println("AdditionalBoundList ::= AdditionalBoundList..."); } //$NON-NLS-1$ + case 810 : if (DEBUG) { System.out.println("AdditionalBoundList ::= AdditionalBoundList..."); } //$NON-NLS-1$ consumeAdditionalBoundList(); break; - case 818 : if (DEBUG) { System.out.println("AdditionalBound ::= AND ReferenceType"); } //$NON-NLS-1$ + case 811 : if (DEBUG) { System.out.println("AdditionalBound ::= AND ReferenceType"); } //$NON-NLS-1$ consumeAdditionalBound(); break; - case 820 : if (DEBUG) { System.out.println("TypeParameterList1 ::= TypeParameterList COMMA..."); } //$NON-NLS-1$ + case 813 : if (DEBUG) { System.out.println("TypeParameterList1 ::= TypeParameterList COMMA..."); } //$NON-NLS-1$ consumeTypeParameterList1(); break; - case 821 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader GREATER"); } //$NON-NLS-1$ + case 814 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader GREATER"); } //$NON-NLS-1$ consumeTypeParameter1(); break; - case 822 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ + case 815 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ consumeTypeParameter1WithExtends(); break; - case 823 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ + case 816 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ consumeTypeParameter1WithExtendsAndBounds(); break; - case 825 : if (DEBUG) { System.out.println("AdditionalBoundList1 ::= AdditionalBoundList..."); } //$NON-NLS-1$ + case 818 : if (DEBUG) { System.out.println("AdditionalBoundList1 ::= AdditionalBoundList..."); } //$NON-NLS-1$ consumeAdditionalBoundList1(); break; - case 826 : if (DEBUG) { System.out.println("AdditionalBound1 ::= AND ReferenceType1"); } //$NON-NLS-1$ + case 819 : if (DEBUG) { System.out.println("AdditionalBound1 ::= AND ReferenceType1"); } //$NON-NLS-1$ consumeAdditionalBound1(); break; - case 832 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= PLUS PushPosition..."); } //$NON-NLS-1$ + case 825 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= PLUS PushPosition..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.PLUS); break; - case 833 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= MINUS PushPosition..."); } //$NON-NLS-1$ + case 826 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= MINUS PushPosition..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.MINUS); break; - case 836 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= TWIDDLE..."); } //$NON-NLS-1$ + case 829 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= TWIDDLE..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.TWIDDLE); break; - case 837 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= NOT PushPosition"); } //$NON-NLS-1$ + case 830 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= NOT PushPosition"); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.NOT); break; - case 840 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$ + case 833 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.MULTIPLY); break; - case 841 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name MULTIPLY..."); } //$NON-NLS-1$ + case 834 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name MULTIPLY..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.MULTIPLY); break; - case 842 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$ + case 835 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.DIVIDE); break; - case 843 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name DIVIDE..."); } //$NON-NLS-1$ + case 836 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name DIVIDE..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.DIVIDE); break; - case 844 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$ + case 837 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.REMAINDER); break; - case 845 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name REMAINDER..."); } //$NON-NLS-1$ + case 838 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name REMAINDER..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.REMAINDER); break; - case 847 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); } //$NON-NLS-1$ + case 840 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.PLUS); break; - case 848 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name PLUS..."); } //$NON-NLS-1$ + case 841 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name PLUS..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.PLUS); break; - case 849 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); } //$NON-NLS-1$ + case 842 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.MINUS); break; - case 850 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name MINUS..."); } //$NON-NLS-1$ + case 843 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name MINUS..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.MINUS); break; - case 852 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$ + case 845 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.LEFT_SHIFT); break; - case 853 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name LEFT_SHIFT..."); } //$NON-NLS-1$ + case 846 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name LEFT_SHIFT..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.LEFT_SHIFT); break; - case 854 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$ + case 847 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.RIGHT_SHIFT); break; - case 855 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name RIGHT_SHIFT..."); } //$NON-NLS-1$ + case 848 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name RIGHT_SHIFT..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.RIGHT_SHIFT); break; - case 856 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$ + case 849 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT); break; - case 857 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name UNSIGNED_RIGHT_SHIFT..."); } //$NON-NLS-1$ + case 850 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name UNSIGNED_RIGHT_SHIFT..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.UNSIGNED_RIGHT_SHIFT); break; - case 859 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); } //$NON-NLS-1$ + case 852 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.LESS); break; - case 860 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS..."); } //$NON-NLS-1$ + case 853 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.LESS); break; - case 861 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); } //$NON-NLS-1$ + case 854 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.GREATER); break; - case 862 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER..."); } //$NON-NLS-1$ + case 855 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.GREATER); break; - case 863 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); } //$NON-NLS-1$ + case 856 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.LESS_EQUAL); break; - case 864 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS_EQUAL..."); } //$NON-NLS-1$ + case 857 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS_EQUAL..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.LESS_EQUAL); break; - case 865 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); } //$NON-NLS-1$ + case 858 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.GREATER_EQUAL); break; - case 866 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER_EQUAL..."); } //$NON-NLS-1$ + case 859 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER_EQUAL..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.GREATER_EQUAL); break; - case 868 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::= Name InstanceofRHS"); } //$NON-NLS-1$ + case 861 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::= Name InstanceofRHS"); } //$NON-NLS-1$ consumeInstanceOfExpressionWithName(); break; - case 869 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::=..."); } //$NON-NLS-1$ + case 862 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::=..."); } //$NON-NLS-1$ consumeInstanceOfExpression(); break; - case 871 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); } //$NON-NLS-1$ + case 864 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); } //$NON-NLS-1$ consumeEqualityExpression(OperatorIds.EQUAL_EQUAL); break; - case 872 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name EQUAL_EQUAL..."); } //$NON-NLS-1$ + case 865 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name EQUAL_EQUAL..."); } //$NON-NLS-1$ consumeEqualityExpressionWithName(OperatorIds.EQUAL_EQUAL); break; - case 873 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); } //$NON-NLS-1$ + case 866 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); } //$NON-NLS-1$ consumeEqualityExpression(OperatorIds.NOT_EQUAL); break; - case 874 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name NOT_EQUAL..."); } //$NON-NLS-1$ + case 867 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name NOT_EQUAL..."); } //$NON-NLS-1$ consumeEqualityExpressionWithName(OperatorIds.NOT_EQUAL); break; - case 876 : if (DEBUG) { System.out.println("AndExpression_NotName ::= AndExpression_NotName AND..."); } //$NON-NLS-1$ + case 869 : if (DEBUG) { System.out.println("AndExpression_NotName ::= AndExpression_NotName AND..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.AND); break; - case 877 : if (DEBUG) { System.out.println("AndExpression_NotName ::= Name AND EqualityExpression"); } //$NON-NLS-1$ + case 870 : if (DEBUG) { System.out.println("AndExpression_NotName ::= Name AND EqualityExpression"); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.AND); break; - case 879 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::=..."); } //$NON-NLS-1$ + case 872 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.XOR); break; - case 880 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::= Name XOR AndExpression"); } //$NON-NLS-1$ + case 873 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::= Name XOR AndExpression"); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.XOR); break; - case 882 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::=..."); } //$NON-NLS-1$ + case 875 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.OR); break; - case 883 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::= Name OR..."); } //$NON-NLS-1$ + case 876 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::= Name OR..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.OR); break; - case 885 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::=..."); } //$NON-NLS-1$ + case 878 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.AND_AND); break; - case 886 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::= Name AND_AND..."); } //$NON-NLS-1$ + case 879 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::= Name AND_AND..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.AND_AND); break; - case 888 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::=..."); } //$NON-NLS-1$ + case 881 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.OR_OR); break; - case 889 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::= Name OR_OR..."); } //$NON-NLS-1$ + case 882 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::= Name OR_OR..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.OR_OR); break; - case 891 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::=..."); } //$NON-NLS-1$ + case 884 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::=..."); } //$NON-NLS-1$ consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ; break; - case 892 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::= Name QUESTION..."); } //$NON-NLS-1$ + case 885 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::= Name QUESTION..."); } //$NON-NLS-1$ consumeConditionalExpressionWithName(OperatorIds.QUESTIONCOLON) ; break; - case 896 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); } //$NON-NLS-1$ + case 889 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); } //$NON-NLS-1$ consumeAnnotationTypeDeclarationHeaderName() ; break; - case 897 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); } //$NON-NLS-1$ + case 890 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); } //$NON-NLS-1$ consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ; break; - case 898 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); } //$NON-NLS-1$ + case 891 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); } //$NON-NLS-1$ consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ; break; - case 899 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); } //$NON-NLS-1$ + case 892 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); } //$NON-NLS-1$ consumeAnnotationTypeDeclarationHeaderName() ; break; - case 900 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeader ::=..."); } //$NON-NLS-1$ + case 893 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeader ::=..."); } //$NON-NLS-1$ consumeAnnotationTypeDeclarationHeader() ; break; - case 901 : if (DEBUG) { System.out.println("AnnotationTypeDeclaration ::=..."); } //$NON-NLS-1$ + case 894 : if (DEBUG) { System.out.println("AnnotationTypeDeclaration ::=..."); } //$NON-NLS-1$ consumeAnnotationTypeDeclaration() ; break; - case 903 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::="); } //$NON-NLS-1$ + case 896 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::="); } //$NON-NLS-1$ consumeEmptyAnnotationTypeMemberDeclarationsopt() ; break; - case 904 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$ + case 897 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$ consumeAnnotationTypeMemberDeclarationsopt() ; break; - case 906 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarations ::=..."); } //$NON-NLS-1$ + case 899 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarations ::=..."); } //$NON-NLS-1$ consumeAnnotationTypeMemberDeclarations() ; break; - case 907 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt..."); } //$NON-NLS-1$ + case 900 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt..."); } //$NON-NLS-1$ consumeMethodHeaderNameWithTypeParameters(true); break; - case 908 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt Type..."); } //$NON-NLS-1$ + case 901 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt Type..."); } //$NON-NLS-1$ consumeMethodHeaderName(true); break; - case 909 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::="); } //$NON-NLS-1$ + case 902 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::="); } //$NON-NLS-1$ consumeEmptyMethodHeaderDefaultValue() ; break; - case 910 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::= DefaultValue"); } //$NON-NLS-1$ + case 903 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::= DefaultValue"); } //$NON-NLS-1$ consumeMethodHeaderDefaultValue(); break; - case 911 : if (DEBUG) { System.out.println("AnnotationMethodHeader ::= AnnotationMethodHeaderName..."); } //$NON-NLS-1$ + case 904 : if (DEBUG) { System.out.println("AnnotationMethodHeader ::= AnnotationMethodHeaderName..."); } //$NON-NLS-1$ consumeMethodHeader(); break; - case 912 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclaration ::=..."); } //$NON-NLS-1$ + case 905 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclaration ::=..."); } //$NON-NLS-1$ consumeAnnotationTypeMemberDeclaration() ; break; - case 920 : if (DEBUG) { System.out.println("AnnotationName ::= AT UnannotatableName"); } //$NON-NLS-1$ + case 913 : if (DEBUG) { System.out.println("AnnotationName ::= AT UnannotatableName"); } //$NON-NLS-1$ consumeAnnotationName() ; break; - case 921 : if (DEBUG) { System.out.println("NormalAnnotation ::= AnnotationName LPAREN..."); } //$NON-NLS-1$ + case 914 : if (DEBUG) { System.out.println("NormalAnnotation ::= AnnotationName LPAREN..."); } //$NON-NLS-1$ consumeNormalAnnotation(false) ; break; - case 922 : if (DEBUG) { System.out.println("MemberValuePairsopt ::="); } //$NON-NLS-1$ + case 915 : if (DEBUG) { System.out.println("MemberValuePairsopt ::="); } //$NON-NLS-1$ consumeEmptyMemberValuePairsopt() ; break; - case 925 : if (DEBUG) { System.out.println("MemberValuePairs ::= MemberValuePairs COMMA..."); } //$NON-NLS-1$ + case 918 : if (DEBUG) { System.out.println("MemberValuePairs ::= MemberValuePairs COMMA..."); } //$NON-NLS-1$ consumeMemberValuePairs() ; break; - case 926 : if (DEBUG) { System.out.println("MemberValuePair ::= SimpleName EQUAL EnterMemberValue..."); } //$NON-NLS-1$ + case 919 : if (DEBUG) { System.out.println("MemberValuePair ::= SimpleName EQUAL EnterMemberValue..."); } //$NON-NLS-1$ consumeMemberValuePair() ; break; - case 927 : if (DEBUG) { System.out.println("EnterMemberValue ::="); } //$NON-NLS-1$ + case 920 : if (DEBUG) { System.out.println("EnterMemberValue ::="); } //$NON-NLS-1$ consumeEnterMemberValue() ; break; - case 928 : if (DEBUG) { System.out.println("ExitMemberValue ::="); } //$NON-NLS-1$ + case 921 : if (DEBUG) { System.out.println("ExitMemberValue ::="); } //$NON-NLS-1$ consumeExitMemberValue() ; break; - case 930 : if (DEBUG) { System.out.println("MemberValue ::= Name"); } //$NON-NLS-1$ + case 923 : if (DEBUG) { System.out.println("MemberValue ::= Name"); } //$NON-NLS-1$ consumeMemberValueAsName() ; break; - case 933 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ + case 926 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ consumeMemberValueArrayInitializer() ; break; - case 934 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ + case 927 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ consumeMemberValueArrayInitializer() ; break; - case 935 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ + case 928 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ consumeEmptyMemberValueArrayInitializer() ; break; - case 936 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ + case 929 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ consumeEmptyMemberValueArrayInitializer() ; break; - case 937 : if (DEBUG) { System.out.println("EnterMemberValueArrayInitializer ::="); } //$NON-NLS-1$ + case 930 : if (DEBUG) { System.out.println("EnterMemberValueArrayInitializer ::="); } //$NON-NLS-1$ consumeEnterMemberValueArrayInitializer() ; break; - case 939 : if (DEBUG) { System.out.println("MemberValues ::= MemberValues COMMA MemberValue"); } //$NON-NLS-1$ + case 932 : if (DEBUG) { System.out.println("MemberValues ::= MemberValues COMMA MemberValue"); } //$NON-NLS-1$ consumeMemberValues() ; break; - case 940 : if (DEBUG) { System.out.println("MarkerAnnotation ::= AnnotationName"); } //$NON-NLS-1$ + case 933 : if (DEBUG) { System.out.println("MarkerAnnotation ::= AnnotationName"); } //$NON-NLS-1$ consumeMarkerAnnotation(false) ; break; - case 941 : if (DEBUG) { System.out.println("SingleMemberAnnotationMemberValue ::= MemberValue"); } //$NON-NLS-1$ + case 934 : if (DEBUG) { System.out.println("SingleMemberAnnotationMemberValue ::= MemberValue"); } //$NON-NLS-1$ consumeSingleMemberAnnotationMemberValue() ; break; - case 942 : if (DEBUG) { System.out.println("SingleMemberAnnotation ::= AnnotationName LPAREN..."); } //$NON-NLS-1$ + case 935 : if (DEBUG) { System.out.println("SingleMemberAnnotation ::= AnnotationName LPAREN..."); } //$NON-NLS-1$ consumeSingleMemberAnnotation(false) ; break; - case 943 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt TypeParameters"); } //$NON-NLS-1$ + case 936 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt TypeParameters"); } //$NON-NLS-1$ consumeRecoveryMethodHeaderNameWithTypeParameters(); break; - case 944 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt Type..."); } //$NON-NLS-1$ + case 937 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt Type..."); } //$NON-NLS-1$ consumeRecoveryMethodHeaderName(); break; - case 945 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= ModifiersWithDefault..."); } //$NON-NLS-1$ + case 938 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= ModifiersWithDefault..."); } //$NON-NLS-1$ consumeRecoveryMethodHeaderNameWithTypeParameters(); break; - case 946 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= ModifiersWithDefault Type"); } //$NON-NLS-1$ + case 939 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= ModifiersWithDefault Type"); } //$NON-NLS-1$ consumeRecoveryMethodHeaderName(); break; - case 947 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); } //$NON-NLS-1$ + case 940 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); } //$NON-NLS-1$ consumeMethodHeader(); break; - case 948 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); } //$NON-NLS-1$ + case 941 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); } //$NON-NLS-1$ consumeMethodHeader(); break; } @@ -9173,13 +9116,11 @@ protected void consumeStatementReturn() { pushOnAstStack(new ReturnStatement(null, this.intStack[this.intPtr--], this.endStatementPosition)); } } -private SwitchStatement createSwitchStatementOrExpression(boolean isStmt) { +protected void consumeSwitchStatementOrExpression(boolean isStmt) { + // SwitchStatement ::= 'switch' '(' Expression ')' PostExpressionInSwitchStatement OpenBlock SwitchBlock + // SwitchExpression ::= 'switch' '(' Expression ')' PostExpressionInSwitchExpression OpenBlock SwitchBlock - //OpenBlock just makes the semantic action blockStart() - //the block is inlined but a scope need to be created - //if some declaration occurs. - Boolean isPatternSwitch = this.recordPatternSwitches.remove(this.switchNestingLevel); - Boolean isNullSwitch = this.recordNullSwitches.remove(this.switchNestingLevel); + // Expression and SwitchBlock are only non-epsilon productions. the block is inlined but a scope need to be created if some declaration occurs. this.nestedType--; this.switchNestingLevel--; int length; @@ -9196,23 +9137,21 @@ private SwitchStatement createSwitchStatementOrExpression(boolean isStmt) { length); } switchStatement.explicitDeclarations = this.realBlockStack[this.realBlockPtr--]; - switchStatement.containsPatterns = isPatternSwitch != null ? isPatternSwitch.booleanValue() : false; - switchStatement.containsNull = isNullSwitch != null ? isNullSwitch.booleanValue() : false; - pushOnAstStack(switchStatement); switchStatement.blockStart = this.intStack[this.intPtr--]; switchStatement.sourceStart = this.intStack[this.intPtr--]; switchStatement.sourceEnd = this.endStatementPosition; if (length == 0 && !containsComment(switchStatement.blockStart, switchStatement.sourceEnd)) { switchStatement.bits |= ASTNode.UndocumentedEmptyBlock; } -// this.scanner.caseStartPosition = -1; // safety: at the end of a switch we definitely leave the scope of this value - this.scanner.caseStartPosition = resetCaseStartAndPopPrev(this.switchNestingLevel + 1); // +1 because already dec above - return switchStatement; -} -protected void consumeStatementSwitch() { - // SwitchStatement ::= 'switch' OpenBlock '(' Expression ')' SwitchBlock - createSwitchStatementOrExpression(true); + if (isStmt) + pushOnAstStack(switchStatement); + else { + if (!this.parsingJava14Plus) + problemReporter().switchExpressionsNotSupported(switchStatement); + pushOnExpressionStack(switchStatement); + } } + protected void consumeStatementSynchronized() { // SynchronizedStatement ::= OnlySynchronized '(' Expression ')' Block //optimize the push/pop @@ -9437,10 +9376,12 @@ private TextBlock createTextBlock(char[] allchars, int start, int end) { } return textBlock; } -protected void consumeSwitchBlock() { - // SwitchBlock ::= '{' SwitchBlockStatements SwitchLabels '}' - concatNodeLists(); - +protected void consumeSwitchBlock(boolean hasContents) { + // SwitchBlock ::= '{' { SwitchBlockStatements SwitchLabels } '}' + if (hasContents) + concatNodeLists(); + else + pushOnAstLengthStack(0); } protected void consumeSwitchBlockStatement() { // SwitchBlockStatement ::= SwitchLabels BlockStatements @@ -9450,57 +9391,68 @@ protected void consumeSwitchBlockStatements() { // SwitchBlockStatements ::= SwitchBlockStatements SwitchBlockStatement concatNodeLists(); } -protected void consumeSwitchLabels() { - // SwitchLabels ::= SwitchLabels SwitchLabel - optimizedConcatNodeLists(); + +protected void consumeSwitchLabels(boolean shouldConcat, boolean isSwitchRule) { + // SwitchLabels -> SwitchLabel ':' + // SwitchLabels ::= SwitchLabels SwitchLabel ':' + Expression[] labelExpressions = null; + int sourceEnd, sourceStart; + + int length = 0; + if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) > 0) { + this.expressionPtr -= length; + System.arraycopy( + this.expressionStack, + this.expressionPtr + 1, + labelExpressions = new Expression[length], + 0, + length); + sourceStart = this.intStack[this.intPtr--]; + sourceEnd = labelExpressions[length - 1].sourceEnd; + } else { // default -> + sourceEnd = this.intStack[this.intPtr--]; + sourceStart = this.intStack[this.intPtr--]; + labelExpressions = Expression.NO_EXPRESSIONS; + } + + CaseStatement caseStatement = new CaseStatement(labelExpressions, sourceStart, sourceEnd); + caseStatement.isSwitchRule = isSwitchRule; + if (labelExpressions.length > 1 && !this.parsingJava14Plus) + problemReporter().multiConstantCaseLabelsNotSupported(caseStatement); + if (isSwitchRule && !this.parsingJava14Plus) + problemReporter().arrowInCaseStatementsNotSupported(caseStatement); + + // Look for $fall-through$ tag in leading comment for case statement + if (hasLeadingTagComment(FALL_THROUGH_TAG, caseStatement.sourceStart)) + caseStatement.bits |= ASTNode.DocumentedFallthrough; + + // Look for $fall-through$ AND $CASES-OMITTED$ tags in leading comment for default statement + if (labelExpressions.length == 0 && hasLeadingTagComment(CASES_OMITTED_TAG, caseStatement.sourceStart)) + caseStatement.bits |= ASTNode.DocumentedCasesOmitted; + + pushOnAstStack(caseStatement); + if (shouldConcat) + optimizedConcatNodeLists(); } protected void consumeSwitchLabelCaseLhs() { if (this.scanner.lookBack[1] == TerminalTokens.TokenNameCOLON) // kludge for yield :( this.scanner.yieldColons = 1; - if (this.switchNestingLevel >= 0) { - this.caseStartMap.put(this.switchNestingLevel, -1); - } - this.scanner.caseStartPosition = resetCaseStartAndPopPrev(this.switchNestingLevel); - -} -protected void consumeCaseLabelExpr() { -// SwitchLabelExpr ::= SwitchLabelCaseLhs BeginCaseExpr '->' - consumeCaseLabel(); - CaseStatement caseStatement = (CaseStatement) this.astStack[this.astPtr]; - if (!this.parsingJava14Plus) { - problemReporter().arrowInCaseStatementsNotSupported(caseStatement); - } - caseStatement.isSwitchRule = true; -} -protected void consumeDefaultLabelExpr() { -// SwitchLabelDefaultExpr ::= 'default' '->' - consumeDefaultLabel(); - CaseStatement defaultStatement = (CaseStatement) this.astStack[this.astPtr]; - if (!this.parsingJava14Plus) { - problemReporter().arrowInCaseStatementsNotSupported(defaultStatement); - } - defaultStatement.isSwitchRule = true; } -protected void consumeSwitchExpression() { -// SwitchExpression ::= 'switch' '(' Expression ')' OpenBlock SwitchExpressionBlock - createSwitchStatementOrExpression(false); - if (this.astLengthStack[this.astLengthPtr--] != 0) { - SwitchExpression s = (SwitchExpression) this.astStack[this.astPtr--]; - if (!this.parsingJava14Plus) { - problemReporter().switchExpressionsNotSupported(s); - } - pushOnExpressionStack(s); +protected void consumeSwitchRule(SwitchRuleKind kind) { + // SwitchRule ::= SwitchLabel CaseArrow { Expression | Block | ThrowStatement } + YieldStatement yieldStatement = null; + if (kind == SwitchRuleKind.EXPRESSION) { + consumeExpressionStatement(); + Expression expr = (Expression) this.astStack[this.astPtr]; + expr.bits &= ~ASTNode.InsideExpressionStatement; + yieldStatement = new YieldStatement(expr, expr.sourceStart, this.endStatementPosition); + yieldStatement.isImplicit = true; + this.astStack[this.astPtr] = yieldStatement; } + concatNodeLists(); } -protected void consumeSwitchExprThrowDefaultArm() { -// SwitchExprThrowDefaultArm ::= SwitchLabelDefaultExpr Expression ';' - consumeStatementThrow(); -// pushSwitchLabeledRule(SwitchLabeledRule.RULE_KIND.DEFAULT_THROW); -} -protected void consumeConstantExpression() { - // do nothing for now. -} + protected void consumeCaseLabelElement(CaseLabelKind kind) { Expression pattern = null; switch (kind) { @@ -9508,24 +9460,19 @@ protected void consumeCaseLabelElement(CaseLabelKind kind) { this.astLengthPtr--; pattern = (Pattern) this.astStack[this.astPtr--]; pushOnExpressionStack(pattern); - this.recordPatternSwitches.put(this.switchNestingLevel, Boolean.TRUE); - } + } case CASE_EXPRESSION -> { - if ((pattern = this.expressionStack[this.expressionPtr]) instanceof NullLiteral) { - this.recordNullSwitches.put(this.switchNestingLevel, Boolean.TRUE); - } else { + if (!((pattern = this.expressionStack[this.expressionPtr]) instanceof NullLiteral)) pattern = null; - } - } + } case CASE_DEFAULT -> { int end = this.intStack[this.intPtr--]; int start = this.intStack[this.intPtr--]; pushOnExpressionStack(pattern = new FakeDefaultLiteral(start, end)); - } + } } - if (pattern != null) { + if (pattern != null) problemReporter().validateJavaFeatureSupport(JavaFeature.PATTERN_MATCHING_IN_SWITCH, pattern.sourceStart, pattern.sourceEnd); - } this.scanner.multiCaseLabelComma = this.currentToken == TerminalTokens.TokenNameCOMMA; } protected void consumeCaseLabelElements() { @@ -9552,44 +9499,7 @@ protected void consumeCaseLabelElements() { this.expressionLengthStack[this.expressionLengthPtr]--; } } -protected void consumeSwitchLabeledRules() { - concatNodeLists(); -} -protected void consumeSwitchLabeledRule() { -// SwitchLabeledRule ::= SwitchLabeledExpression -// SwitchLabeledRule ::= SwitchLabeledBlock -// SwitchLabeledRule ::= SwitchLabeledThrowStatement -// concatNodeLists(); - // do nothing explicit here -} -protected void consumeSwitchLabeledRuleToBlockStatement() { - // do nothing -} -protected void consumeSwitchLabeledExpression() { - consumeExpressionStatement(); - Expression expr = (Expression) this.astStack[this.astPtr]; - expr.bits &= ~ASTNode.InsideExpressionStatement; - YieldStatement yieldStatement = new YieldStatement( - expr, - expr.sourceStart, - this.endStatementPosition); - yieldStatement.isImplicit = true; - this.astStack[this.astPtr] = yieldStatement; - concatNodeLists(); -} -protected void consumeSwitchLabeledBlock() { - concatNodeLists(); -} -protected void consumeSwitchLabeledThrowStatement() { - // TODO: Semicolon not there - so we call this early - consumeStatementThrow(); - concatNodeLists(); -} -protected void consumeThrowExpression() { - // do nothing -} -protected boolean caseFlagSet = false; protected void consumeToken(int type) { /* remember the last consumed value */ /* try to minimize the number of build values */ @@ -9613,16 +9523,11 @@ protected void consumeToken(int type) { //System.out.println(this.scanner.toStringAction(type)); switch (type) { case TokenNameARROW: - if (!this.caseFlagSet && this.scanner.lookBack[0] != TokenNamedefault) - consumeLambdaHeader(); - this.caseFlagSet = false; + consumeLambdaHeader(); break; case TokenNameCOLON_COLON: this.colonColonStart = this.scanner.currentPosition - 2; break; - case TokenNameBeginCaseExpr: - this.caseFlagSet = true; - break; case TokenNameBeginLambda: flushCommentsDefinedPriorTo(this.scanner.currentPosition); break; @@ -9870,7 +9775,6 @@ protected void consumeToken(int type) { break; case TokenNamecase : pushOnIntStack(this.scanner.startPosition); - this.caseStartMap.put(this.switchNestingLevel, this.scanner.startPosition); break; case TokenNameswitch : consumeNestedType(); @@ -11996,7 +11900,6 @@ public void initialize(boolean parsingCompilationUnit) { this.intPtr = -1; this.nestedMethod[this.nestedType = 0] = 0; // need to reset for further reuse this.switchNestingLevel = 0; - this.caseStartMap.clear(); this.variablesCounter[this.nestedType] = 0; this.dimensions = 0 ; this.realBlockPtr = -1; @@ -12033,7 +11936,6 @@ public void initialize(boolean parsingCompilationUnit) { this.scanner.checkNonExternalizedStringLiterals = parsingCompilationUnit && checkNLS; this.scanner.checkUninternedIdentityComparison = parsingCompilationUnit && this.options.complainOnUninternedIdentityComparison; this.scanner.lastPosition = -1; - this.scanner.caseStartPosition = -1; resetModifiers(); @@ -13826,8 +13728,6 @@ protected void resetStacks() { this.genericsPtr = -1; this.valueLambdaNestDepth = -1; this.recordNestedMethodLevels = new HashMap<>(); - this.recordPatternSwitches = new HashMap<>(); - this.recordNullSwitches = new HashMap<>(); } /* * Reset context so as to resume to regular parse loop @@ -13910,10 +13810,6 @@ protected int resumeOnSyntaxError() { if (this.lastPosistion < this.scanner.currentPosition) { this.lastPosistion = this.scanner.currentPosition; this.scanner.lastPosition = this.scanner.currentPosition; - if (this.scanner.startPosition <= this.scanner.caseStartPosition) { - this.scanner.caseStartPosition = -1; - } - } /* attempt to reset state in order to resume to parse loop */ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java index f135e34116d..79833794060 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java @@ -20,22 +20,22 @@ public interface ParserBasicInformation { public final static int // BEGIN_AUTOGENERATED_REGION - ERROR_SYMBOL = 138, - MAX_NAME_LENGTH = 41, - NUM_STATES = 1243, + ERROR_SYMBOL = 138, + MAX_NAME_LENGTH = 41, + NUM_STATES = 1239, - NT_OFFSET = 138, - SCOPE_UBOUND = 320, - SCOPE_SIZE = 321, - LA_STATE_OFFSET = 18269, - MAX_LA = 1, - NUM_RULES = 948, - NUM_TERMINALS = 138, - NUM_NON_TERMINALS = 437, - NUM_SYMBOLS = 575, - START_STATE = 1143, - EOFT_SYMBOL = 39, - EOLT_SYMBOL = 39, - ACCEPT_ACTION = 18268, - ERROR_ACTION = 18269; + NT_OFFSET = 138, + SCOPE_UBOUND = 320, + SCOPE_SIZE = 321, + LA_STATE_OFFSET = 18228, + MAX_LA = 1, + NUM_RULES = 941, + NUM_TERMINALS = 138, + NUM_NON_TERMINALS = 433, + NUM_SYMBOLS = 571, + START_STATE = 1188, + EOFT_SYMBOL = 39, + EOLT_SYMBOL = 39, + ACCEPT_ACTION = 18227, + ERROR_ACTION = 18228; } diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/Scanner.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/Scanner.java index 8b539c17be2..a43311c2a5a 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/Scanner.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/Scanner.java @@ -16,7 +16,6 @@ package org.eclipse.jdt.internal.compiler.parser; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.eclipse.jdt.core.compiler.CharOperation; import org.eclipse.jdt.core.compiler.InvalidInputException; @@ -113,7 +112,6 @@ public class Scanner implements TerminalTokens { public boolean wasAcr = false; public boolean fakeInModule = false; - public int caseStartPosition = -1; boolean inCondition = false; /* package */ int yieldColons = -1; boolean breakPreviewAllowed = false; @@ -233,7 +231,6 @@ public Scanner( this.complianceLevel = complianceLevel; this.checkNonExternalizedStringLiterals = checkNonExternalizedStringLiterals; this.previewEnabled = isPreviewEnabled; - this.caseStartPosition = -1; this.multiCaseLabelComma = false; if (taskTags != null) { int taskTagsLength = taskTags.length; @@ -1426,11 +1423,7 @@ public void ungetToken(int unambiguousToken) { } this.nextToken = unambiguousToken; } -protected void updateCase(int token) { - if (token == TokenNamecase) { - this.caseStartPosition = this.startPosition; - } -} + public int getNextToken() throws InvalidInputException { int token; @@ -1443,7 +1436,6 @@ public int getNextToken() throws InvalidInputException { this.scanContext = isInModuleDeclaration() ? ScanContext.EXPECTING_KEYWORD : ScanContext.INACTIVE; } token = getNextToken0(); - updateCase(token); if (areRestrictedModuleKeywordsActive()) { if (isRestrictedKeyword(token)) token = disambiguatedRestrictedKeyword(token); @@ -4997,20 +4989,14 @@ public int getNextToken() throws InvalidInputException { this.scanContext = isInModuleDeclaration() ? ScanContext.EXPECTING_KEYWORD : ScanContext.INACTIVE; } token = getNextToken0(); - updateCase(token); if (areRestrictedModuleKeywordsActive()) { if (isRestrictedKeyword(token)) token = disambiguatedRestrictedKeyword(token); updateScanContext(token); } else if (mayBeAtCasePattern(token)) { token = disambiguateCasePattern(token, this); - } else if (token == TokenNameARROW && - mayBeAtCaseLabelExpr() && this.caseStartPosition < this.startPosition) { - // this.caseStartPosition > this.startPositionpossible on recovery - bother only about correct ones. - // add fake token of TokenNameCOLON, call vanguard on this modified source - // TODO: Inefficient method due to redoing of the same source, investigate alternate - // Can we do a dup of parsing/check the transition of the state? - token = disambiguateArrowWithCaseExpr(this, token); + } else if (token == TokenNameARROW) { + token = disambiguatedToken(token, this); } else if (token == TokenNameAT && atTypeAnnotation()) { if (((VanguardParser) this.activeParser).currentGoal == Goal.LambdaParameterListGoal) { token = disambiguatedToken(token, this); @@ -5035,8 +5021,6 @@ private static class Goal { static int ReferenceExpressionRule = 0; static int VarargTypeAnnotationsRule = 0; static int BlockStatementoptRule = 0; - static int YieldStatementRule = 0; - static int SwitchLabelCaseLhsRule = 0; static int[] ModifiersoptRules; static int PermittedTypesRule; static int[] PatternRules; @@ -5046,8 +5030,6 @@ private static class Goal { static Goal VarargTypeAnnotationGoal; static Goal ReferenceExpressionGoal; static Goal BlockStatementoptGoal; - static Goal YieldStatementGoal; - static Goal SwitchLabelCaseLhsGoal; static Goal SealedModifierGoal; static Goal PermittedTypesGoal; static Goal PatternGoal; @@ -5055,7 +5037,7 @@ private static class Goal { static int[] SealedModifierFollow = { TokenNameclass, TokenNameinterface, TokenNameenum, TokenNameRestrictedIdentifierrecord };// Note: enum/record allowed as error flagging rules. static int[] PermittedTypesFollow = { TokenNameLBRACE }; - static int[] PatternCaseLabelFollow = {TokenNameCOLON, TokenNameARROW, TokenNameCOMMA, TokenNameBeginCaseExpr, TokenNameRestrictedIdentifierWhen}; + static int[] PatternCaseLabelFollow = {TokenNameCOLON, TokenNameARROW, TokenNameCOMMA, TokenNameCaseArrow, TokenNameRestrictedIdentifierWhen}; static { @@ -5078,18 +5060,12 @@ private static class Goal { if ("BlockStatementopt".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$ BlockStatementoptRule = i; else - if ("YieldStatement".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$ - YieldStatementRule = i; - else if ("Modifiersopt".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$ modifiersOptStates.add(i); else if ("PermittedTypes".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$ PermittedTypesRule = i; else - if ("SwitchLabelCaseLhs".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$ - SwitchLabelCaseLhsRule = i; - else if ("TypePattern".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$ patternStates.add(i); else @@ -5107,8 +5083,6 @@ private static class Goal { VarargTypeAnnotationGoal = new Goal(TokenNameAT, new int[] { TokenNameELLIPSIS }, VarargTypeAnnotationsRule); ReferenceExpressionGoal = new Goal(TokenNameLESS, new int[] { TokenNameCOLON_COLON }, ReferenceExpressionRule); BlockStatementoptGoal = new Goal(TokenNameLBRACE, new int [0], BlockStatementoptRule); - YieldStatementGoal = new Goal(TokenNameARROW, new int [0], YieldStatementRule); - SwitchLabelCaseLhsGoal = new Goal(TokenNameARROW, new int [0], SwitchLabelCaseLhsRule); SealedModifierGoal = new Goal(TokenNameRestrictedIdentifiersealed, SealedModifierFollow, ModifiersoptRules); PermittedTypesGoal = new Goal(TokenNameRestrictedIdentifierpermits, PermittedTypesFollow, PermittedTypesRule); PatternGoal = new Goal(TokenNameBeginCaseElement, PatternCaseLabelFollow, PatternRules); @@ -5230,7 +5204,7 @@ else if (this.currentToken == TokenNameRPAREN) // ProcessNonTerminals : do { /* reduce */ // mimic the unfortunate side effect introduced by org.eclipse.jdt.internal.compiler.parser.Parser.consumeCaseLabelElement(CaseLabelKind) - if (parenthesized == 0 && this.currentToken == TerminalTokens.TokenNameCOMMA && this.scanner.caseStartPosition < this.scanner.startPosition) { + if (parenthesized == 0 && this.currentToken == TerminalTokens.TokenNameCOMMA) { for (int patternRule : Goal.PatternRules) { if (act == patternRule) { this.scanner.multiCaseLabelComma = true; @@ -5702,27 +5676,14 @@ int disambiguatesRestrictedIdentifierWithLookAhead(int restrictedIdentifierToken return TokenNameIdentifier; } -private VanguardScanner getNewVanguardScanner(char[] src) { - VanguardScanner vs = new VanguardScanner(this.sourceLevel, this.complianceLevel, this.previewEnabled); - vs.setSource(src); - vs.resetTo(0, src.length, isInModuleDeclaration(), this.scanContext); - return vs; -} -private VanguardParser getNewVanguardParser(char[] src) { - VanguardScanner vs = getNewVanguardScanner(src); - VanguardParser vp = new VanguardParser(vs); - vs.setActiveParser(vp); - return vp; -} int disambiguatedToken(int token, Scanner scanner) { final VanguardParser parser = getVanguardParser(); - parser.scanner.caseStartPosition = this.caseStartPosition; - if (token == TokenNameARROW && mayBeAtCaseLabelExpr() && scanner.caseStartPosition < scanner.startPosition) { - // this.caseStartPosition > this.startPositionpossible on recovery - bother only about correct ones. - // add fake token of TokenNameCOLON, call vanguard on this modified source - // TODO: Inefficient method due to redoing of the same source, investigate alternate - // Can we do a dup of parsing/check the transition of the state? - return disambiguateArrowWithCaseExpr(scanner, token); + if (token == TokenNameARROW) { + if (this.lookBack[1] == TokenNamedefault) + return TokenNameCaseArrow; + if (this.sourceLevel < ClassFileConstants.JDK14 || this.activeParser == null || !this.activeParser.automatonWillShift(TokenNameCaseArrow)) + return TokenNameARROW; + return TokenNameCaseArrow; } else if (token == TokenNameLPAREN && maybeAtLambdaOrCast()) { if (parser.parse(Goal.LambdaParameterListGoal) == VanguardParser.SUCCESS) { scanner.nextToken = TokenNameLPAREN; @@ -5750,17 +5711,6 @@ int disambiguatedToken(int token, Scanner scanner) { } return token; } - -protected int disambiguateArrowWithCaseExpr(Scanner scanner, int retToken) { - char[] nSource = CharOperation.append(Arrays.copyOfRange(scanner.source, scanner.caseStartPosition, scanner.startPosition), ':'); - VanguardParser vp = getNewVanguardParser(nSource); - if (vp.parse(Goal.SwitchLabelCaseLhsGoal) == VanguardParser.SUCCESS) { - scanner.nextToken = TokenNameARROW; - retToken = TokenNameBeginCaseExpr; -// scanner.caseStartPosition = scanner.caseStartStack.isEmpty() ? -1 : scanner.caseStartStack.pop(); - } - return retToken; -} /* * Assumption: mayBeAtCasePattern(token) is true before calling this method. */ @@ -5768,7 +5718,6 @@ int disambiguateCasePattern(int token, Scanner scanner) { int delta = token == TokenNamecase ? 4 : 0; // 4 for case. final VanguardParser parser = getNewVanguardParser(); parser.scanner.resetTo(parser.scanner.currentPosition + delta, parser.scanner.eofPosition); - parser.scanner.caseStartPosition = this.caseStartPosition; if (parser.parse(Goal.PatternGoal) == VanguardParser.SUCCESS) { if (token == TokenNamecase) { scanner.nextToken = TokenNameBeginCaseElement; @@ -5780,15 +5729,6 @@ int disambiguateCasePattern(int token, Scanner scanner) { return token; } -protected boolean mayBeAtCaseLabelExpr() { - if (isInModuleDeclaration() || this.caseStartPosition <= 0) - return false; - if (this.lookBack[1] == TokenNamedefault) { - return this.lookBack[0] == TerminalTokens.TokenNamecase || this.lookBack[0] == TerminalTokens.TokenNameCOMMA; - } - return true; -} - protected boolean isAtAssistIdentifier() { return false; } @@ -5870,7 +5810,7 @@ We use FOLLOW rather than FIRST since we want to recognize empty statements. i.e case TokenNameLBRACE: case TokenNameAT: case TokenNameBeginLambda: - case TokenNameBeginCaseExpr: + case TokenNameCaseArrow: case TokenNameAT308: case TokenNameRestrictedIdentifierYield: // can be in FOLLOW of Block if(getVanguardParser().parse(Goal.BlockStatementoptGoal) == VanguardParser.SUCCESS) diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java index 0d9fbef1b89..71b6b2c1f64 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java @@ -74,35 +74,35 @@ static int getRestrictedKeyword(String text) { // BEGIN_AUTOGENERATED_REGION int TokenNameIdentifier = 19, TokenNameabstract = 44, - TokenNameassert = 82, - TokenNameboolean = 106, - TokenNamebreak = 83, - TokenNamebyte = 107, - TokenNamecase = 92, - TokenNamecatch = 108, - TokenNamechar = 109, + TokenNameassert = 81, + TokenNameboolean = 104, + TokenNamebreak = 82, + TokenNamebyte = 105, + TokenNamecase = 106, + TokenNamecatch = 107, + TokenNamechar = 108, TokenNameclass = 71, - TokenNamecontinue = 84, + TokenNamecontinue = 83, TokenNameconst = 136, TokenNamedefault = 77, - TokenNamedo = 85, - TokenNamedouble = 110, + TokenNamedo = 84, + TokenNamedouble = 109, TokenNameelse = 121, TokenNameenum = 75, - TokenNameextends = 93, + TokenNameextends = 92, TokenNamefalse = 54, TokenNamefinal = 45, - TokenNamefinally = 118, - TokenNamefloat = 111, - TokenNamefor = 86, + TokenNamefinally = 117, + TokenNamefloat = 110, + TokenNamefor = 85, TokenNamegoto = 137, - TokenNameif = 87, + TokenNameif = 86, TokenNameimplements = 133, - TokenNameimport = 112, + TokenNameimport = 111, TokenNameinstanceof = 17, - TokenNameint = 113, + TokenNameint = 112, TokenNameinterface = 72, - TokenNamelong = 114, + TokenNamelong = 113, TokenNamenative = 46, TokenNamenew = 40, TokenNamenon_sealed = 47, @@ -111,8 +111,8 @@ static int getRestrictedKeyword(String text) { TokenNameprivate = 48, TokenNameprotected = 49, TokenNamepublic = 50, - TokenNamereturn = 88, - TokenNameshort = 115, + TokenNamereturn = 87, + TokenNameshort = 114, TokenNamestatic = 38, TokenNamestrictfp = 51, TokenNamesuper = 36, @@ -120,14 +120,14 @@ static int getRestrictedKeyword(String text) { TokenNamesynchronized = 41, TokenNamethis = 37, TokenNamethrow = 79, - TokenNamethrows = 119, + TokenNamethrows = 118, TokenNametransient = 52, TokenNametrue = 56, - TokenNametry = 89, - TokenNamevoid = 116, + TokenNametry = 88, + TokenNamevoid = 115, TokenNamevolatile = 53, TokenNamewhile = 80, - TokenNamemodule = 117, + TokenNamemodule = 116, TokenNameopen = 122, TokenNamerequires = 123, TokenNametransitive = 128, @@ -153,24 +153,24 @@ static int getRestrictedKeyword(String text) { TokenNameLEFT_SHIFT = 18, TokenNameRIGHT_SHIFT = 14, TokenNameUNSIGNED_RIGHT_SHIFT = 16, - TokenNamePLUS_EQUAL = 94, - TokenNameMINUS_EQUAL = 95, - TokenNameMULTIPLY_EQUAL = 96, - TokenNameDIVIDE_EQUAL = 97, - TokenNameAND_EQUAL = 98, - TokenNameOR_EQUAL = 99, - TokenNameXOR_EQUAL = 100, - TokenNameREMAINDER_EQUAL = 101, - TokenNameLEFT_SHIFT_EQUAL = 102, - TokenNameRIGHT_SHIFT_EQUAL = 103, - TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL = 104, + TokenNamePLUS_EQUAL = 93, + TokenNameMINUS_EQUAL = 94, + TokenNameMULTIPLY_EQUAL = 95, + TokenNameDIVIDE_EQUAL = 96, + TokenNameAND_EQUAL = 97, + TokenNameOR_EQUAL = 98, + TokenNameXOR_EQUAL = 99, + TokenNameREMAINDER_EQUAL = 100, + TokenNameLEFT_SHIFT_EQUAL = 101, + TokenNameRIGHT_SHIFT_EQUAL = 102, + TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL = 103, TokenNameOR_OR = 31, TokenNameAND_AND = 30, TokenNamePLUS = 4, TokenNameMINUS = 5, TokenNameNOT = 67, TokenNameREMAINDER = 9, - TokenNameXOR = 25, + TokenNameXOR = 24, TokenNameAND = 22, TokenNameMULTIPLY = 8, TokenNameOR = 28, @@ -179,29 +179,29 @@ static int getRestrictedKeyword(String text) { TokenNameGREATER = 15, TokenNameLESS = 11, TokenNameLPAREN = 23, - TokenNameRPAREN = 26, + TokenNameRPAREN = 25, TokenNameLBRACE = 42, TokenNameRBRACE = 33, TokenNameLBRACKET = 6, TokenNameRBRACKET = 70, - TokenNameSEMICOLON = 24, + TokenNameSEMICOLON = 26, TokenNameQUESTION = 29, TokenNameCOLON = 66, TokenNameCOMMA = 32, TokenNameDOT = 1, TokenNameEQUAL = 78, TokenNameAT = 35, - TokenNameELLIPSIS = 120, - TokenNameARROW = 105, + TokenNameELLIPSIS = 119, + TokenNameARROW = 120, TokenNameCOLON_COLON = 7, TokenNameBeginLambda = 64, TokenNameBeginIntersectionCast = 69, - TokenNameBeginTypeArguments = 90, + TokenNameBeginTypeArguments = 89, TokenNameElidedSemicolonAndRightBrace = 73, TokenNameAT308 = 27, TokenNameAT308DOTDOTDOT = 129, - TokenNameBeginCaseExpr = 74, - TokenNameRestrictedIdentifierYield = 81, + TokenNameCaseArrow = 74, + TokenNameRestrictedIdentifierYield = 90, TokenNameRestrictedIdentifierrecord = 76, TokenNameRestrictedIdentifiersealed = 43, TokenNameRestrictedIdentifierpermits = 130, diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser1.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser1.rsc index 1815802a632..daa7eb1644c 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser1.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser1.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser10.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser10.rsc index 59f20b9af5d..786291c63d6 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser10.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser10.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser11.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser11.rsc index 6ace9fa6031..9e6874fe84c 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser11.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser11.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser12.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser12.rsc index 7225500f26b..a3d028e411e 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser12.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser12.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser13.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser13.rsc index 3cc481fd376..532c790471f 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser13.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser13.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser14.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser14.rsc index 88b105ebe6a..ccd8ec76469 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser14.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser14.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser15.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser15.rsc index 7d12c9a4408..f451383e08c 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser15.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser15.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser16.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser16.rsc index 678ff9099d4..497d33a9360 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser16.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser16.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser17.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser17.rsc index d192c8a071c..4034368b545 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser17.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser17.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser18.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser18.rsc index 0ef60edfe7f..dc0ff21ba75 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser18.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser18.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser19.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser19.rsc index 28344168336..51bda513863 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser19.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser19.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser2.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser2.rsc index 444390d67a9..91badf206c8 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser2.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser2.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser20.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser20.rsc index f184b566952..6ade6d94267 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser20.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser20.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser21.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser21.rsc index 04c20c925f4..31f5ab6ab9e 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser21.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser21.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser22.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser22.rsc index 7f8b3ca5915..e7e3d685f39 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser22.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser22.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser23.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser23.rsc index ce383ebd1e8..2c47f215af0 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser23.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser23.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser24.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser24.rsc index bef23a6501c..2c4df90d114 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser24.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser24.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser3.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser3.rsc index 77e57e5d1a2..ce29e987986 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser3.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser3.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser4.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser4.rsc index f97a65d41dc..82737b415d0 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser4.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser4.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser5.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser5.rsc index acb50b2e835..c98cad023d7 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser5.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser5.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser6.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser6.rsc index 133c9a73c3f..f5da0ea7260 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser6.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser6.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser7.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser7.rsc index 07491374b3d..81cd99124b7 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser7.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser7.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser8.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser8.rsc index f2d1c81ba8d..08dbe719563 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser8.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser8.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser9.rsc b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser9.rsc index b1fb27786c0..e829a13a97b 100644 Binary files a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser9.rsc and b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/parser9.rsc differ diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/readableNames.props b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/readableNames.props index dea6daef0b7..611d7adc343 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/readableNames.props +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/readableNames.props @@ -331,15 +331,10 @@ SwitchBlockStatements=SwitchBlockStatements SwitchExpression=SwitchExpression SwitchLabel=SwitchLabel SwitchLabelCaseLhs=SwitchLabelCaseLhs -SwitchLabelExpr=SwitchLabelDefaultExpr -SwitchLabeledBlock=SwitchLabeledBlock -SwitchLabeledExpression=SwitchLabeledExpression -SwitchLabeledRule=SwitchLabeledRule -SwitchLabeledThrowStatement=SwitchLabeledThrowStatement -SwitchLabels=SwitchLabels +SwitchLabels=SwitchLabel +SwitchRule=SwitchRule SwitchStatement=SwitchStatement SynchronizedStatement=SynchronizedStatement -ThrowExpression=ThrowExpression ThrowStatement=ThrowStatement TrailingSemiColon=; TryBlock=Block diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java index 61a3efd45fe..90169dfc84d 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java @@ -8409,6 +8409,15 @@ private void syntaxError( // We should silently recover so swallow the message. return; } + + if (currentKind == TerminalTokens.TokenNameARROW && expectedToken != null && expectedToken.equals("CaseArrow")) { //$NON-NLS-1$ + /* Silently swallow the error: "Syntax error on token "->", CaseArrow expected": Diagnose Parser will apply this repair and chug along on its way ... + * This can never be the only error in a program, so we are good suppressing this. In fact, this means there is NO penalty in the Scanner having to + * failed to disambiguate between TokenNameARROW and TokenNameCaseArrow and that is beautiful! + */ + return; + } + String eTokenName; if (Scanner.isKeyword(currentKind) || isLiteral(currentKind) || @@ -8417,8 +8426,8 @@ private void syntaxError( } else { eTokenName = errorTokenName; } - if (TerminalTokens.isRestrictedKeyword(currentKind)) - eTokenName = replaceIfSynthetic(eTokenName); + + eTokenName = replaceIfSynthetic(eTokenName); String[] arguments; if(expectedToken != null) { @@ -8441,7 +8450,7 @@ private String replaceIfSynthetic(String token) { third synthetic token "ElidedSemicolonAndRightBrace" that we don't expect to show up in messages since it is manufactured by the parser automatically. */ - if (token.equals("BeginCaseExpr")) //$NON-NLS-1$ + if (token.equals("CaseArrow")) //$NON-NLS-1$ return "->"; //$NON-NLS-1$ if (token.equals("BeginTypeArguments")) //$NON-NLS-1$ return "."; //$NON-NLS-1$ @@ -11693,6 +11702,9 @@ public void switchExpressionBlockCompletesNormally(Statement stmt) { stmt.sourceEnd); } public void arrowColonMixup(ASTNode statement) { + CompilationResult result = this.referenceContext.compilationResult(); + if (result != null && result.hasSyntaxError) + return; // Diagnose parser's "repair" can cause this mixup where there is none in source, CU is rejected anyway this.handle( IProblem.SwitchPreviewMixedCase, NoArgument, diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionParserTest12.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionParserTest12.java deleted file mode 100644 index a49f5acdf17..00000000000 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionParserTest12.java +++ /dev/null @@ -1,817 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019, 2023 IBM Corporation and others. - * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jdt.core.tests.compiler.parser; - -import junit.framework.Test; -import org.eclipse.jdt.core.JavaModelException; - -public class SelectionParserTest12 extends AbstractSelectionTest { -static { -// TESTS_NUMBERS = new int[] { 1 }; -// TESTS_NAMES = new String[] { "test005" }; -} -public static Test suite() { - return buildMinimalComplianceTestSuite(SelectionParserTest12.class, F_12); -} - -public SelectionParserTest12(String testName) { - super(testName); -} -/* - * Multi constant case statement with ':', selection node is the string constant - */ -public void test001() throws JavaModelException { - String string = "public class X {\n" + - "static final String ONE=\"One\", TWO = \"Two\", THREE=\"Three\";\n" + - " public static void foo(String num) {\n" + - " switch (num) {\n" + - " case ONE, TWO, THREE:\n" + - " System.out.println(num);\n" + - " break;\n" + - " }" + - " }\n" + - "}"; - - String selection = "ONE"; - String selectKey = ""; - - String selectionIdentifier = "ONE"; - String expectedUnitDisplayString = - "public class X {\n" + - " static final String ONE;\n" + - " static final String TWO;\n" + - " static final String THREE;\n" + - " () {\n" + - " }\n" + - " public X() {\n" + - " }\n" + - " public static void foo(String num) {\n" + - " {\n" + - " switch (num) {\n" + - " case :\n" + - " }\n" + - " }\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "ONE"; - String testName = "X.java"; - - int selectionStart = string.lastIndexOf(selection); - int selectionEnd = string.lastIndexOf(selection) + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -/* - * Multi constant case statement with ':', selection node is the first enum constant - */ -public void test002() throws JavaModelException { - String string = "public class X {\n" + - " public static void foo(Num num) {\n" + - " switch (num) {\n" + - " case ONE, TWO, THREE:\n" + - " System.out.println(num);\n" + - " break;\n" + - " }" + - " }\n" + - " enum Num { ONE, TWO, THREE;}\n" + - "}"; - - String selection = "ONE"; - String selectKey = ""; - - String selectionIdentifier = "ONE"; - String expectedUnitDisplayString = - "public class X {\n" + - " enum Num {\n" + - " ONE(),\n" + - " TWO(),\n" + - " THREE(),\n" + - " () {\n" + - " }\n" + - " Num() {\n" + - " }\n" + - " }\n" + - " public X() {\n" + - " }\n" + - " public static void foo(Num num) {\n" + - " {\n" + - " switch (num) {\n" + - " case :\n" + - " }\n" + - " }\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "ONE"; - String testName = "X.java"; - - int selectionStart = string.indexOf(selection); - int selectionEnd = selectionStart + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -/* - * Multi constant case statement with ':', selection node is the second string constant - */ -public void test003() throws JavaModelException { - String string = "public class X {\n" + - "static final String ONE=\"One\", TWO = \"Two\", THREE=\"Three\";\n" + - " public static void foo(String num) {\n" + - " switch (num) {\n" + - " case ONE, TWO, THREE:\n" + - " System.out.println(num);\n" + - " break;\n" + - " }" + - " }\n" + - "}"; - - String selection = "TWO"; - String selectKey = ""; - - String selectionIdentifier = "TWO"; - String expectedUnitDisplayString = - "public class X {\n" + - " static final String ONE;\n" + - " static final String TWO;\n" + - " static final String THREE;\n" + - " () {\n" + - " }\n" + - " public X() {\n" + - " }\n" + - " public static void foo(String num) {\n" + - " {\n" + - " switch (num) {\n" + - " case :\n" + - " }\n" + - " }\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "TWO"; - String testName = "X.java"; - - int selectionStart = string.lastIndexOf(selection); - int selectionEnd = string.lastIndexOf(selection) + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -/* - * Multi constant case statement with ':', selection node is the second enum constant - */ -public void test004() throws JavaModelException { - String string = "public class X {\n" + - " public static void foo(Num num) {\n" + - " switch (num) {\n" + - " case ONE, TWO, THREE:\n" + - " System.out.println(num);\n" + - " break;\n" + - " }" + - " }\n" + - " enum Num { ONE, TWO, THREE;}\n" + - "}"; - - String selection = "TWO"; - String selectKey = ""; - - String selectionIdentifier = "TWO"; - String expectedUnitDisplayString = - "public class X {\n" + - " enum Num {\n" + - " ONE(),\n" + - " TWO(),\n" + - " THREE(),\n" + - " () {\n" + - " }\n" + - " Num() {\n" + - " }\n" + - " }\n" + - " public X() {\n" + - " }\n" + - " public static void foo(Num num) {\n" + - " {\n" + - " switch (num) {\n" + - " case :\n" + - " }\n" + - " }\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "TWO"; - String testName = "X.java"; - - int selectionStart = string.indexOf(selection); - int selectionEnd = selectionStart + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -/* - * Multi constant case statement with '->', selection node is the string constant - */ -public void test005() throws JavaModelException { - String string = "public class X {\n" + - "static final String ONE=\"One\", TWO = \"Two\", THREE=\"Three\";\n" + - " public static void foo(String num) {\n" + - " switch (num) {\n" + - " case ONE, TWO, THREE ->\n" + - " System.out.println(num);\n" + - " }" + - " }\n" + - "}"; - /* - * Note: The completion parser ignores the -> that follows and we end up creating - * the CaseStatement without maring it as an Expression, hence the ':' instead of the '->' - */ - String selection = "ONE"; - String selectKey = ""; - String selectionIdentifier = "ONE"; - String expectedUnitDisplayString = - "public class X {\n" + - " static final String ONE;\n" + - " static final String TWO;\n" + - " static final String THREE;\n" + - " () {\n" + - " }\n" + - " public X() {\n" + - " }\n" + - " public static void foo(String num) {\n" + - " {\n" + - " switch (num) {\n" + - " case :\n" + - " }\n" + - " }\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "ONE"; - String testName = "X.java"; - - int selectionStart = string.lastIndexOf(selection); - int selectionEnd = string.lastIndexOf(selection) + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -/* - * Multi constant case statement with '->', selection node is the first enum constant - */ -public void test006() throws JavaModelException { - String string = "public class X {\n" + - " public static void foo(Num num) {\n" + - " switch (num) {\n" + - " case ONE, TWO, THREE ->\n" + - " System.out.println(num);\n" + - " break; // illegal, but should be ignored and shouldn't matter\n" + - " }" + - " }\n" + - " enum Num { ONE, TWO, THREE;}\n" + - "}"; - - String selection = "ONE"; - String selectKey = ""; - - String selectionIdentifier = "ONE"; - String expectedUnitDisplayString = - "public class X {\n" + - " enum Num {\n" + - " ONE(),\n" + - " TWO(),\n" + - " THREE(),\n" + - " () {\n" + - " }\n" + - " Num() {\n" + - " }\n" + - " }\n" + - " public X() {\n" + - " }\n" + - " public static void foo(Num num) {\n" + - " {\n" + - " switch (num) {\n" + - " case :\n" + - " }\n" + - " }\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "ONE"; - String testName = "X.java"; - - int selectionStart = string.indexOf(selection); - int selectionEnd = selectionStart + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -/* - * Multi constant case statement with '->', selection node is the second string constant - */ -public void test007() throws JavaModelException { - String string = "public class X {\n" + - "static final String ONE=\"One\", TWO = \"Two\", THREE=\"Three\";\n" + - " public static void foo(String num) {\n" + - " switch (num) {\n" + - " case ONE, TWO, THREE ->\n" + - " System.out.println(num);\n" + - " break;\n" + - " }" + - " }\n" + - "}"; - - String selection = "TWO"; - String selectKey = ""; - - String selectionIdentifier = "TWO"; - String expectedUnitDisplayString = - "public class X {\n" + - " static final String ONE;\n" + - " static final String TWO;\n" + - " static final String THREE;\n" + - " () {\n" + - " }\n" + - " public X() {\n" + - " }\n" + - " public static void foo(String num) {\n" + - " {\n" + - " switch (num) {\n" + - " case :\n" + - " }\n" + - " }\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "TWO"; - String testName = "X.java"; - - int selectionStart = string.lastIndexOf(selection); - int selectionEnd = string.lastIndexOf(selection) + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -/* - * Multi constant case statement with '->', selection node is the second enum constant - */ -public void test008() throws JavaModelException { - String string = "public class X {\n" + - " public static void foo(Num num) {\n" + - " switch (num) {\n" + - " case ONE, TWO, THREE ->\n" + - " System.out.println(num);\n" + - " break;\n" + - " }" + - " }\n" + - " enum Num { ONE, TWO, THREE;}\n" + - "}"; - - String selection = "TWO"; - String selectKey = ""; - - String selectionIdentifier = "TWO"; - String expectedUnitDisplayString = - "public class X {\n" + - " enum Num {\n" + - " ONE(),\n" + - " TWO(),\n" + - " THREE(),\n" + - " () {\n" + - " }\n" + - " Num() {\n" + - " }\n" + - " }\n" + - " public X() {\n" + - " }\n" + - " public static void foo(Num num) {\n" + - " {\n" + - " switch (num) {\n" + - " case :\n" + - " }\n" + - " }\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "TWO"; - String testName = "X.java"; - - int selectionStart = string.indexOf(selection); - int selectionEnd = selectionStart + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -/* - * Multi constant case statement with '->', selection is a reference in the case block - * which same as the switch's expression - */ -public void test009() throws JavaModelException { - String string = "public class X {\n" + - " public static void foo(Num num_) {\n" + - " switch (num_) {\n" + - " case ONE, TWO, THREE ->\n" + - " System.out.println(num_);\n" + - " break;\n" + - " }" + - " }\n" + - " enum Num { ONE, TWO, THREE;}\n" + - "}"; - - String selection = "num_"; - String selectKey = ""; - - String selectionIdentifier = "num_"; - String expectedUnitDisplayString = - "public class X {\n" + - " enum Num {\n" + - " ONE(),\n" + - " TWO(),\n" + - " THREE(),\n" + - " () {\n" + - " }\n" + - " Num() {\n" + - " }\n" + - " }\n" + - " public X() {\n" + - " }\n" + - " public static void foo(Num num_) {\n" + - " {\n" + - " switch (num_) {\n" + - " case THREE ->\n" + - " ;\n" + - " }\n" + - " }\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "num_"; - String testName = "X.java"; - - int selectionStart = string.lastIndexOf(selection); - int selectionEnd = selectionStart + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -/* - * Multi constant case statement with '->', selection is a reference in the case block - * which is referencing a local variable defined in the case block - */ -public void test010() throws JavaModelException { - String string = "public class X {\n" + - " public static void foo(Num num_) {\n" + - " switch (num_) {\n" + - " case ONE, TWO, THREE -> {\n" + - " int i_j = 0;" + - " System.out.println(i_j);\n" + - " break;" + - " }\n" + - " }" + - " }\n" + - " enum Num { ONE, TWO, THREE;}\n" + - "}"; - - String selection = "i_j"; - String selectKey = ""; - - String selectionIdentifier = "i_j"; - String expectedUnitDisplayString = - "public class X {\n" + - " enum Num {\n" + - " ONE(),\n" + - " TWO(),\n" + - " THREE(),\n" + - " () {\n" + - " }\n" + - " Num() {\n" + - " }\n" + - " }\n" + - " public X() {\n" + - " }\n" + - " public static void foo(Num num_) {\n" + - " {\n" + - " {\n" + - " switch (num_) {\n" + - " case THREE ->\n" + - " int i_j;\n" + - " ;\n" + - " }\n" + - " }\n" + - " }\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "i_j"; - String testName = "X.java"; - - int selectionStart = string.lastIndexOf(selection); - int selectionEnd = selectionStart + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -/* - * Multi constant case statement with '->', selection is a referenced name of type enum in switch expression - */ -public void test011() throws JavaModelException { - String string = "public class X {\n" + - " public static void foo(Num num_) {\n" + - " switch (num_) {\n" + - " case ONE, TWO, THREE -> {\n" + - " break;" + - " }\n" + - " }" + - " }\n" + - " enum Num { ONE, TWO, THREE;}\n" + - "}"; - - String selection = "num_"; - String selectKey = ""; - - String selectionIdentifier = "num_"; - String expectedUnitDisplayString = - "public class X {\n" + - " enum Num {\n" + - " ONE(),\n" + - " TWO(),\n" + - " THREE(),\n" + - " () {\n" + - " }\n" + - " Num() {\n" + - " }\n" + - " }\n" + - " public X() {\n" + - " }\n" + - " public static void foo(Num num_) {\n" + - " ;\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "num_"; - String testName = "X.java"; - - int selectionStart = string.lastIndexOf(selection); - int selectionEnd = selectionStart + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -/* - * Multi constant case statement with '->', selection is a referenced name of type int in switch expression - */ -public void test012() throws JavaModelException { - String string = "public class X {\n" + - " public static void foo(int num_) {\n" + - " switch (num_ + 1) {\n" + - " case 1, 2, 3 -> {\n" + - " break;" + - " }\n" + - " }" + - " }\n" + - "}"; - - String selection = "num_"; - String selectKey = ""; - - String selectionIdentifier = "num_"; - String expectedUnitDisplayString = - "public class X {\n" + - " public X() {\n" + - " }\n" + - " public static void foo(int num_) {\n" + - " ;\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "num_"; - String testName = "X.java"; - - int selectionStart = string.lastIndexOf(selection); - int selectionEnd = selectionStart + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -/* - * Multi constant case statement with '->', selection is a referenced name of type int in switch expression - */ -public void test013() throws JavaModelException { - String string = "public class X {\n" + - " public static void foo(int num_) {\n" + - " int i = switch (num_) {\n" + - " case 1, 2, 3 -> (num_ + 1);\n" + - " default -> 0;\n" + - " }" + - " }\n" + - "}"; - - String selection = "num_"; - String selectKey = ""; - - String selectionIdentifier = "num_"; - String expectedUnitDisplayString = - "public class X {\n" + - " public X() {\n" + - " }\n" + - " public static void foo(int num_) {\n" + - " int i;\n" + - " {\n" + - " switch (num_) {\n" + - " case 3 ->\n" + - " ;\n" + - " }\n" + - " }\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "num_"; - String testName = "X.java"; - - int selectionStart = string.lastIndexOf(selection); - int selectionEnd = selectionStart + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -/* - * Multi constant case statement with '->', selection is a referenced name of type int in switch expression - */ -public void test014() throws JavaModelException { - String string = "public class X {\n" + - " public static void foo(int num_) {\n" + - " int i = switch (num_) {\n" + - " case 1, 2, 3 -> 0;\n" + - " default -> (num_ + 1);\n" + - " }" + - " }\n" + - "}"; - - String selection = "num_"; - String selectKey = ""; - - String selectionIdentifier = "num_"; - String expectedUnitDisplayString = - "public class X {\n" + - " public X() {\n" + - " }\n" + - " public static void foo(int num_) {\n" + - " int i;\n" + - " {\n" + - " switch (num_) {\n" + - " case 3 ->\n" + - " 0;\n" + - " default ->\n" + - " ;\n" + - " }\n" + - " }\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "num_"; - String testName = "X.java"; - - int selectionStart = string.lastIndexOf(selection); - int selectionEnd = selectionStart + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -/* - * Multi constant case statement with '->', selection is a referenced name of type int in switch expression - */ -public void test015() throws JavaModelException { - String string = "public class X {\n" + - " public static void foo(int num_) {\n" + - " int i = switch (num_) {\n" + - " case 1, 2, 3 -> 0;\n" + - " default -> (num_ + 1);\n" + - " }" + - " }\n" + - "}"; - - String selection = "num_"; - String selectKey = ""; - - String selectionIdentifier = "num_"; - String expectedUnitDisplayString = - "public class X {\n" + - " public X() {\n" + - " }\n" + - " public static void foo(int num_) {\n" + - " int i;\n" + - " {\n" + - " switch (num_) {\n" + - " case 3 ->\n" + - " 0;\n" + - " default ->\n" + - " ;\n" + - " }\n" + - " }\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "num_"; - String testName = "X.java"; - - int selectionStart = string.lastIndexOf(selection); - int selectionEnd = selectionStart + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -/* - * Multi constant case statement with '->', selection is a referenced name of type int in switch expression - */ -public void test016() throws JavaModelException { - String string = "public class X {\n" + - " public void bar(int s) {\n" + - " int i_j = switch (s) {\n" + - " case 1, 2, 3 -> (s+1);\n" + - " default -> i_j;\n" + - " };\n" + - " }\n" + - "}\n"; - - String selection = "i_j"; - String selectKey = ""; - - String selectionIdentifier = "i_j"; - String expectedUnitDisplayString = - "public class X {\n" + - " public X() {\n" + - " }\n" + - " public void bar(int s) {\n" + - " int i_j;\n" + - " {\n" + - " switch (s) {\n" + - " case 3 ->\n" + - " (s + 1);\n" + - " default ->\n" + - " ;\n" + - " }\n" + - " }\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "i_j"; - String testName = "X.java"; - - int selectionStart = string.lastIndexOf(selection); - int selectionEnd = selectionStart + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -public void test017() throws JavaModelException { - String string = "public class X {\n" + - " public void bar(int s) {\n" + - " int i_j = switch (s) {\n" + - " case 1, 2, 3 -> (s+1);\n" + - " default -> (1+i_j);\n" + - " };\n" + - " }\n" + - "}\n"; - - String selection = "i_j"; - String selectKey = ""; - - String selectionIdentifier = "i_j"; - String expectedUnitDisplayString = - "public class X {\n" + - " public X() {\n" + - " }\n" + - " public void bar(int s) {\n" + - " int i_j;\n" + - " {\n" + - " switch (s) {\n" + - " case 3 ->\n" + - " (s + 1);\n" + - " default ->\n" + - " ;\n" + - " }\n" + - " }\n" + - " }\n" + - "}\n"; - String expectedReplacedSource = "i_j"; - String testName = "X.java"; - - int selectionStart = string.lastIndexOf(selection); - int selectionEnd = selectionStart + selection.length() - 1; - - checkMethodParse(string.toCharArray(), selectionStart, selectionEnd, expectedSelection, expectedUnitDisplayString, - selectionIdentifier, expectedReplacedSource, testName); -} -} diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionParserTest13.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionParserTest14.java similarity index 99% rename from org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionParserTest13.java rename to org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionParserTest14.java index ea69892ad3c..374938978d1 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionParserTest13.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionParserTest14.java @@ -16,16 +16,16 @@ import junit.framework.Test; import org.eclipse.jdt.core.JavaModelException; -public class SelectionParserTest13 extends AbstractSelectionTest { +public class SelectionParserTest14 extends AbstractSelectionTest { static { // TESTS_NUMBERS = new int[] { 1 }; // TESTS_NAMES = new String[] { "test005" }; } public static Test suite() { - return buildMinimalComplianceTestSuite(SelectionParserTest13.class, F_13); + return buildMinimalComplianceTestSuite(SelectionParserTest14.class, F_14); } -public SelectionParserTest13(String testName) { +public SelectionParserTest14(String testName) { super(testName); } /* diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java index 53c7c579fc1..636ec53f752 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java @@ -140,7 +140,7 @@ public static TestSuite getTestSuite(boolean addComplianceDiagnoseTest) { ArrayList tests_13 = (ArrayList)testClasses.clone(); tests_13.addAll(TEST_CLASSES_1_5); addJava12Tests(tests_13); - addJava13Tests(tests_13); + //TODO:To add SwitchExpressionYieldTests here as well as master // Reset forgotten subsets tests TestCase.TESTS_PREFIX = null; @@ -154,6 +154,7 @@ public static TestSuite getTestSuite(boolean addComplianceDiagnoseTest) { ArrayList tests_14 = (ArrayList)testClasses.clone(); tests_14.addAll(TEST_CLASSES_1_5); addJava12Tests(tests_14); + addJava14Tests(tests_14); // Reset forgotten subsets tests TestCase.TESTS_PREFIX = null; TestCase.TESTS_NAMES = null; @@ -265,12 +266,11 @@ private static void addJava16Tests(ArrayList tests_16) { addJava1_8Tests(tests_16); tests_16.add(PatternMatchingSelectionTest.class); } -private static void addJava13Tests(ArrayList tests_12) { - tests_12.add(SelectionParserTest13.class); +private static void addJava14Tests(ArrayList tests_14) { + tests_14.add(SelectionParserTest14.class); } private static void addJava12Tests(ArrayList tests_12) { addJava10Tests(tests_12); - tests_12.add(SelectionParserTest12.class); } private static void addJava10Tests(ArrayList tests_10) { diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PrimitiveInPatternsTestSH.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PrimitiveInPatternsTestSH.java index 79763d606e9..505e3970e95 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PrimitiveInPatternsTestSH.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PrimitiveInPatternsTestSH.java @@ -1646,6 +1646,7 @@ public static String switchbool(boolean in) { } public static String switchfloatMoreCases(float f) { return switch (f) { + case float v when v == 1.6 -> "v="+String.valueOf(v); case 1.0f -> "1.0"; case 1.5f -> "1.5"; case float v -> "v="+String.valueOf(v); @@ -2621,4 +2622,31 @@ public void _testSpec00X() { "----------\n"); } + // https://github.com/eclipse-jdt/eclipse.jdt.core/issues/3265 + // [Primitive Patterns] Wrong duplicate case error + public void _testIssue3265() { + runConformTest(new String[] { + "X.java", + """ + public class X { + public static String switchfloatMoreCases(float f) { + return switch (f) { + case 1.0f -> "1.0"; + case 1.5f -> "1.5"; + default -> String.valueOf(f); + }; + } + + public static void main(String... args) { + System.out.print(switchfloatMoreCases(1.0f)); + System.out.print("|"); + System.out.print(switchfloatMoreCases(1.5f)); + System.out.print("|"); + System.out.print(switchfloatMoreCases(1.6f)); + System.out.print("|"); + } + } + """}, + "1.0|1.5|1.6|"); + } } diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PublicScannerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PublicScannerTest.java index aec5de09a0a..71cbfa9eb82 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PublicScannerTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PublicScannerTest.java @@ -68,11 +68,11 @@ public class PublicScannerTest extends AbstractRegressionTest { Map map = new HashMap<>(); map.put(TerminalTokens.TokenNameAT308DOTDOTDOT, TerminalTokens.TokenNameAT); map.put(TerminalTokens.TokenNameAT308, TerminalTokens.TokenNameAT); + map.put(TerminalTokens.TokenNameCaseArrow, TerminalTokens.TokenNameARROW); SYNTHETIC_REPLACE_TOKENS = Collections.unmodifiableMap(map); List list = new ArrayList<>(); list.add(TerminalTokens.TokenNameBeginCaseElement); - list.add(TerminalTokens.TokenNameBeginCaseExpr); list.add(TerminalTokens.TokenNameBeginIntersectionCast); list.add(TerminalTokens.TokenNameBeginLambda); list.add(TerminalTokens.TokenNameBeginTypeArguments); diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RecordPatternTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RecordPatternTest.java index 4d61ed1e69b..6d99b3e36b6 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RecordPatternTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RecordPatternTest.java @@ -1707,8 +1707,13 @@ public void testRemoveNamedRecordPatterns_001() { "----------\n" + "1. ERROR in X.java (at line 4)\n" + " case Rectangle(int x, int y) r -> 1;\n" + - " ^\n" + - "Syntax error on token \"r\", delete this token\n" + + " ^\n" + + "Syntax error, insert \":\" to complete SwitchLabel\n" + + "----------\n" + + "2. ERROR in X.java (at line 4)\n" + + " case Rectangle(int x, int y) r -> 1;\n" + + " ^\n" + + "Syntax error, insert \"AssignmentOperator Expression\" to complete Expression\n" + "----------\n"); } // https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2004 diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SealedTypesTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SealedTypesTests.java index 54ebb4c6827..b05afd1e176 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SealedTypesTests.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SealedTypesTests.java @@ -6476,59 +6476,6 @@ private class C {} "----------\n"); } - // https://github.com/eclipse-jdt/eclipse.jdt.core/issues/3039 - // [Sealed types] Broken program crashes the compiler - public void testIssue3039_2() { - runNegativeTest( - new String[] { - "X.java", - """ - public interface X { - - static Integer get(T object) { - return switch (object) { - case A ignored -> 42; - default -> 42; - }; - } - - public abstract sealed interface I2 permits , AB { - } - - - final class AB implements I2 {} - - } - """ - }, - "----------\n" + - "1. ERROR in X.java (at line 1)\n" + - " public interface X {\n" + - " ^\n" + - "Syntax error, insert \"}\" to complete InterfaceBody\n" + - "----------\n" + - "2. ERROR in X.java (at line 3)\n" + - " static Integer get(T object) {\n" + - " ^^\n" + - "I2 cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in X.java (at line 5)\n" + - " case A ignored -> 42;\n" + - " ^^^^^^^^^\n" + - "The Java feature 'Pattern Matching in Switch' is only available with source level 21 and above\n" + - "----------\n" + - "4. ERROR in X.java (at line 8)\n" + - " }\n" + - " ^\n" + - "Syntax error on token \"}\", delete this token\n" + - "----------\n" + - "5. ERROR in X.java (at line 10)\n" + - " public abstract sealed interface I2 permits , AB {\n" + - " ^^\n" + - "Syntax error on token \"I2\", permits expected after this token\n" + - "----------\n"); - } - // https://github.com/eclipse-jdt/eclipse.jdt.core/issues/3121 // [Sealed types] Regression in instanceof check for sealed generic classes public void testIssue3121() { diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionsYieldTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionsYieldTest.java index f8c3e1639d4..36b87838dd1 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionsYieldTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionsYieldTest.java @@ -5789,7 +5789,7 @@ public void testBug565844_07() { "1. ERROR in X.java (at line 5)\n" + " case AAABBB -> 1;\n" + " ^\n" + - "Syntax error on token \";\", case expected after this token\n" + + "Syntax error on token \";\", [ expected\n" + "----------\n" + "2. ERROR in X.java (at line 6)\n" + " (I)()->();\n" + @@ -5804,6 +5804,11 @@ public void testBug565844_07() { "4. ERROR in X.java (at line 6)\n" + " (I)()->();\n" + " ^\n" + + "Syntax error, insert \"]\" to complete ArrayAccess\n" + + "----------\n" + + "5. ERROR in X.java (at line 6)\n" + + " (I)()->();\n" + + " ^\n" + "Syntax error, insert \":\" to complete SwitchLabel\n" + "----------\n"); } @@ -8109,11 +8114,6 @@ public static void main(String[] args) { " default -> 1;\n" + " ^^^^^^^\n" + "Mixing of '->' and ':' case statement styles is not allowed within a switch\n" + - "----------\n" + - "2. ERROR in X.java (at line 6)\n" + - " case 1 : yield 2;\n" + - " ^^^^^^\n" + - "Mixing of '->' and ':' case statement styles is not allowed within a switch\n" + "----------\n"); } diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchPatternTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchPatternTest.java index 5d12c329386..5c5d73121f6 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchPatternTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchPatternTest.java @@ -4654,34 +4654,42 @@ public void testBug578553_2() { + " }\n" + "}", }, - """ - ---------- - 1. ERROR in X.java (at line 4) - case (Long l) when l.toString().equals("0") -> { - ^ - Syntax error on token "l", delete this token - ---------- - 2. ERROR in X.java (at line 4) - case (Long l) when l.toString().equals("0") -> { - ^^^^ - Syntax error, insert ":: IdentifierOrNew" to complete ReferenceExpression - ---------- - 3. ERROR in X.java (at line 4) - case (Long l) when l.toString().equals("0") -> { - ^^^^ - Syntax error, insert ":" to complete SwitchLabel - ---------- - 4. ERROR in X.java (at line 4) - case (Long l) when l.toString().equals("0") -> { - ^^ - Syntax error on token "->", ; expected - ---------- - 5. ERROR in X.java (at line 6) - case Long l1 when l1.toString().equals(l1.toString()) -> { - ^^^^ - Syntax error on token "when", , expected - ---------- - """); + "----------\n" + + "1. ERROR in X.java (at line 4)\n" + + " case (Long l) when l.toString().equals(\"0\") -> {\n" + + " ^\n" + + "Syntax error on token \"l\", delete this token\n" + + "----------\n" + + "2. ERROR in X.java (at line 4)\n" + + " case (Long l) when l.toString().equals(\"0\") -> {\n" + + " ^^^^\n" + + "Syntax error, insert \":: IdentifierOrNew\" to complete ReferenceExpression\n" + + "----------\n" + + "3. ERROR in X.java (at line 4)\n" + + " case (Long l) when l.toString().equals(\"0\") -> {\n" + + " ^^^^\n" + + "Syntax error, insert \":\" to complete SwitchLabel\n" + + "----------\n" + + "4. ERROR in X.java (at line 4)\n" + + " case (Long l) when l.toString().equals(\"0\") -> {\n" + + " ^^\n" + + "Syntax error on token \"->\", ; expected\n" + + "----------\n" + + "5. ERROR in X.java (at line 6)\n" + + " case Long l1 when l1.toString().equals(l1.toString()) -> {\n" + + " ^^^^\n" + + "Syntax error on token \"when\", -> expected\n" + + "----------\n" + + "6. ERROR in X.java (at line 6)\n" + + " case Long l1 when l1.toString().equals(l1.toString()) -> {\n" + + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + + "Syntax error on tokens, TypeElidedUnnamedFormalParameter expected instead\n" + + "----------\n" + + "7. ERROR in X.java (at line 8)\n" + + " }\n" + + " ^\n" + + "Syntax error, insert \";\" to complete SwitchRule\n" + + "----------\n"); } public void testBug578553_3() { runNegativeTest( @@ -4703,34 +4711,42 @@ public void testBug578553_3() { + " }\n" + "}", }, - """ - ---------- - 1. ERROR in X.java (at line 4) - case (Long l) when l.toString().equals("0") -> { - ^ - Syntax error on token "l", delete this token - ---------- - 2. ERROR in X.java (at line 4) - case (Long l) when l.toString().equals("0") -> { - ^^^^ - Syntax error, insert ":: IdentifierOrNew" to complete ReferenceExpression - ---------- - 3. ERROR in X.java (at line 4) - case (Long l) when l.toString().equals("0") -> { - ^^^^ - Syntax error, insert ":" to complete SwitchLabel - ---------- - 4. ERROR in X.java (at line 4) - case (Long l) when l.toString().equals("0") -> { - ^^ - Syntax error on token "->", ; expected - ---------- - 5. ERROR in X.java (at line 6) - case Long l1 when l.toString().equals(l1.toString()) -> { - ^^^^ - Syntax error on token "when", , expected - ---------- - """); + "----------\n" + + "1. ERROR in X.java (at line 4)\n" + + " case (Long l) when l.toString().equals(\"0\") -> {\n" + + " ^\n" + + "Syntax error on token \"l\", delete this token\n" + + "----------\n" + + "2. ERROR in X.java (at line 4)\n" + + " case (Long l) when l.toString().equals(\"0\") -> {\n" + + " ^^^^\n" + + "Syntax error, insert \":: IdentifierOrNew\" to complete ReferenceExpression\n" + + "----------\n" + + "3. ERROR in X.java (at line 4)\n" + + " case (Long l) when l.toString().equals(\"0\") -> {\n" + + " ^^^^\n" + + "Syntax error, insert \":\" to complete SwitchLabel\n" + + "----------\n" + + "4. ERROR in X.java (at line 4)\n" + + " case (Long l) when l.toString().equals(\"0\") -> {\n" + + " ^^\n" + + "Syntax error on token \"->\", ; expected\n" + + "----------\n" + + "5. ERROR in X.java (at line 6)\n" + + " case Long l1 when l.toString().equals(l1.toString()) -> {\n" + + " ^^^^\n" + + "Syntax error on token \"when\", -> expected\n" + + "----------\n" + + "6. ERROR in X.java (at line 6)\n" + + " case Long l1 when l.toString().equals(l1.toString()) -> {\n" + + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + + "Syntax error on tokens, TypeElidedUnnamedFormalParameter expected instead\n" + + "----------\n" + + "7. ERROR in X.java (at line 8)\n" + + " }\n" + + " ^\n" + + "Syntax error, insert \";\" to complete SwitchRule\n" + + "----------\n"); } public void testBug578553_4() { runNegativeTest( @@ -9241,4 +9257,41 @@ public static void main(String[] args) { "42"); } + // https://github.com/eclipse-jdt/eclipse.jdt.core/issues/3039 + // [Sealed types] Broken program crashes the compiler + public void testIssue3039_2() { + runNegativeTest( + new String[] { + "X.java", + """ + public interface X { + + static Integer get(T object) { + return switch (object) { + case A ignored -> 42; + default -> 42; + }; + } + + public abstract sealed interface I2 permits , AB { + } + + + final class AB implements I2 {} + + } + """ + }, + "----------\n" + + "1. ERROR in X.java (at line 5)\n" + + " case A ignored -> 42;\n" + + " ^\n" + + "A cannot be resolved to a type\n" + + "----------\n" + + "2. ERROR in X.java (at line 10)\n" + + " public abstract sealed interface I2 permits , AB {\n" + + " ^^\n" + + "Syntax error on token \"I2\", permits expected after this token\n" + + "----------\n"); + } } diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter14Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter14Test.java index 1cc06fa0964..21d43945968 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter14Test.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter14Test.java @@ -371,7 +371,7 @@ public void testBug531714_015() throws CoreException { "3. ERROR in /Foo/src/X.java (at line 14)\n" + " for (String s : switch(i) { case 1 -> ; default -> list; }) {\n" + " ^^\n" + - "Syntax error on token \"->\", Expression expected after this token\n" + + "Syntax error on token \"->\", : expected\n" + "----------\n" + "4. ERROR in /Foo/src/X.java (at line 18)\n" + " case 0 -> missing;\n" + diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java index f11ced185d6..bf1756b54e3 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java @@ -16302,6 +16302,7 @@ void when(Object methodCall) { * https://github.com/eclipse-jdt/eclipse.jdt/pull/1817 - [formatter] Align arrows on column in switch statements/expressions */ public void testGH1817a() { + setComplianceLevel(CompilerOptions.VERSION_14); this.formatterPrefs.align_arrows_in_switch_on_columns = true; String source = """ diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugs14SwitchExpressionTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugs14SwitchExpressionTests.java index 29cd8fc1206..c184c3c4f5e 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugs14SwitchExpressionTests.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugs14SwitchExpressionTests.java @@ -182,6 +182,42 @@ public void testBug542559_004() throws CoreException { ); IJavaProject javaProject = this.workingCopies[0].getJavaProject(); //assuming single project for all working copies String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true); + try { + javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.DISABLED); + search("switch_expr_field", FIELD, REFERENCES); + assertSearchResults( + "src/X.java int X.twice(int) [switch_expr_field] EXACT_MATCH\n" + + "src/X.java int X.twice(int) [switch_expr_field] POTENTIAL_MATCH" // altered recovery from syntax error results in potential match + ); + } finally { + javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old); + } +} + +/* + * java search reference for an integer in default block of switch expression + */ +public void testBug542559_004_1() throws CoreException { + this.workingCopies = new ICompilationUnit[1]; + this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java", + "public class X {\n" + + " int switch_expr_field = 10;\n" + + " int twice(int i) {\n" + + " int tw = switch (i) {\n" + + " case 0 -> switch_expr_field * 0;\n" + + " case 1 -> 2;\n" + + " default ->{ \n" + + " yield switch_expr_field*9; \n" + + " }};\n" + + " return tw;\n" + + " }\n" + + " public static void main(String... args) {\n" + + " System.out.print(new X().twice(3));\n" + + " }\n" + + "}\n" + ); + IJavaProject javaProject = this.workingCopies[0].getJavaProject(); //assuming single project for all working copies + String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true); try { javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.DISABLED); search("switch_expr_field", FIELD, REFERENCES); diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests12To15.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests12To15.java index e090e4eea14..b5f7b3856cb 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests12To15.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests12To15.java @@ -295,7 +295,7 @@ public void test009() throws JavaModelException { * which is referencing a local variable defined in the case block */ public void test010() throws JavaModelException { - this.wc = getWorkingCopy("/Resolve/src/X.java","public class X {\n" + + this.wc = getWorkingCopy("/Resolve15/src/X.java","public class X {\n" + " public static void foo(Num num_) {\n" + " switch (num_) {\n" + " case ONE, TWO, THREE -> {\n" + @@ -314,7 +314,7 @@ public void test010() throws JavaModelException { IJavaElement[] elements = this.wc.codeSelect(start, length); assertElementsEqual( "Unexpected elements", - "i_j [in foo(Num) [in X [in [Working copy] X.java [in [in src [in Resolve]]]]]]", + "i_j [in foo(Num) [in X [in [Working copy] X.java [in [in src [in Resolve15]]]]]]", elements ); } @@ -480,8 +480,10 @@ public void test017() throws JavaModelException { ); } public void test018() throws JavaModelException { - this.wc = getWorkingCopy("/Resolve/src/X.java", - "import java.util.function.*;\n" + + this.wc = getWorkingCopy("/Resolve15/src/X.java", + "interface Supplier {\n" + + " T get();\n" + + "}\n" + "interface IN0 {} \n" + "interface IN1 extends IN0 {} \n" + "interface IN2 extends IN0 {}\n" + @@ -502,7 +504,7 @@ public void test018() throws JavaModelException { IJavaElement[] elements = this.wc.codeSelect(start, length); assertElementsEqual( "Unexpected elements", - "n_1() [in X [in [Working copy] X.java [in [in src [in Resolve]]]]]", + "n_1() [in X [in [Working copy] X.java [in [in src [in Resolve15]]]]]", elements ); } diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java index b7bfa55e6f8..6d6e18e5236 100644 --- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java +++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java @@ -2437,8 +2437,8 @@ protected void consumeBinaryExpressionWithName(int op) { } } @Override -protected void consumeCaseLabel() { - super.consumeCaseLabel(); +protected void consumeSwitchLabels(boolean shouldConcat, boolean isSwitchRule) { + super.consumeSwitchLabels(shouldConcat, isSwitchRule); if(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) != K_SWITCH_LABEL) { pushOnElementStack(K_SWITCH_LABEL); } @@ -3920,12 +3920,15 @@ protected void consumeStatementLabel() { popElement(K_LABEL); super.consumeStatementLabel(); } + @Override -protected void consumeStatementSwitch() { - super.consumeStatementSwitch(); - if(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_SWITCH_LABEL) { - popElement(K_SWITCH_LABEL); - popElement(K_BLOCK_DELIMITER); +protected void consumeSwitchStatementOrExpression(boolean isStmt) { + super.consumeSwitchStatementOrExpression(isStmt); + if (isStmt) { + if(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_SWITCH_LABEL) { + popElement(K_SWITCH_LABEL); + popElement(K_BLOCK_DELIMITER); + } } } @Override @@ -4028,10 +4031,12 @@ protected void consumePushPosition() { } } @Override -protected void consumeSwitchLabeledBlock() { - popUntilElement(K_SWITCH_LABEL); - popElement(K_SWITCH_LABEL); - concatNodeLists(); +protected void consumeSwitchRule(SwitchRuleKind kind) { + super.consumeSwitchRule(kind); + if (kind == SwitchRuleKind.BLOCK) { + popUntilElement(K_SWITCH_LABEL); + popElement(K_SWITCH_LABEL); + } } @Override protected int fetchNextToken() throws InvalidInputException { diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java index 906ebd01e30..bad2a053a51 100644 --- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java +++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java @@ -858,17 +858,15 @@ protected void consumePostExpressionInWhile() { } @Override -protected void consumeStatementSwitch() { - super.consumeStatementSwitch(); - popUntilElement(K_INSIDE_STATEMENT_SWITCH); - popElement(K_INSIDE_STATEMENT_SWITCH); -} - -@Override -protected void consumeSwitchExpression() { - super.consumeSwitchExpression(); - popUntilElement(K_INSIDE_EXPRESSION_SWITCH); - popElement(K_INSIDE_EXPRESSION_SWITCH); +protected void consumeSwitchStatementOrExpression(boolean isStmt) { + super.consumeSwitchStatementOrExpression(isStmt); + if (isStmt) { + popUntilElement(K_INSIDE_STATEMENT_SWITCH); + popElement(K_INSIDE_STATEMENT_SWITCH); + } else { + popUntilElement(K_INSIDE_EXPRESSION_SWITCH); + popElement(K_INSIDE_EXPRESSION_SWITCH); + } } @Override @@ -960,10 +958,12 @@ protected void consumeInsideCastExpressionWithQualifiedGenerics() { super.consumeInsideCastExpressionWithQualifiedGenerics(); pushOnElementStack(K_CAST_STATEMENT); } + @Override -protected void consumeSwitchLabeledExpression() { - super.consumeSwitchLabeledExpression(); - popElement(K_SWITCH_EXPRESSION_DELIMITTER); +protected void consumeSwitchRule(SwitchRuleKind kind) { + super.consumeSwitchRule(kind); + if (kind == SwitchRuleKind.EXPRESSION) + popElement(K_SWITCH_EXPRESSION_DELIMITTER); } @Override @@ -1469,23 +1469,14 @@ protected void consumeToken(int token) { } } break; - case TokenNameARROW: - // TODO: Uncomment the line below - //if (this.options.sourceLevel < ClassFileConstants.JDK13) break; - // else FALL-THROUGH + case TokenNameCaseArrow: case TokenNameCOLON: if(topKnownElementKind(SELECTION_OR_ASSIST_PARSER) == K_BETWEEN_CASE_AND_COLONORARROW) { popElement(K_BETWEEN_CASE_AND_COLONORARROW); - if (token == TokenNameARROW) + if (token == TokenNameCaseArrow) pushOnElementStack(K_SWITCH_EXPRESSION_DELIMITTER); } break; - case TokenNameBeginCaseExpr: - if(topKnownElementKind(SELECTION_OR_ASSIST_PARSER) == K_BETWEEN_CASE_AND_COLONORARROW) { - popElement(K_BETWEEN_CASE_AND_COLONORARROW); - } - pushOnElementStack(K_SWITCH_EXPRESSION_DELIMITTER); - break; case TokenNamereturn: pushOnElementStack(K_INSIDE_RETURN_STATEMENT, this.bracketDepth); break; diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java index e4837404a7d..181c426398d 100644 --- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java +++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java @@ -565,10 +565,10 @@ && isTopLevelType()) { recordLastStatementIfNeeded(); } @Override -protected void consumeStatementSwitch() { - super.consumeStatementSwitch(); - /* recovery */ - recordLastStatementIfNeeded(); +protected void consumeSwitchStatementOrExpression(boolean isStmt) { + super.consumeSwitchStatementOrExpression(isStmt); + if (isStmt) /* recovery */ + recordLastStatementIfNeeded(); } @Override protected void consumeStatementSynchronized() { diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java index 44214a27da6..04a8a342720 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java @@ -140,7 +140,7 @@ private int translateTokenToTerminalSymbol(int nextToken) throws InvalidInputExc case TerminalTokens.TokenNameAT308 : nextToken = ITerminalSymbols.TokenNameAT; break; case TerminalTokens.TokenNameAT308DOTDOTDOT : nextToken = ITerminalSymbols.TokenNameAT; break; case TerminalTokens.TokenNameBeginCaseElement : nextToken = getNextToken(); break; - case TerminalTokens.TokenNameBeginCaseExpr : nextToken = getNextToken(); break; + case TerminalTokens.TokenNameCaseArrow : nextToken = ITerminalSymbols.TokenNameARROW; break; case TerminalTokens.TokenNameBeginIntersectionCast : nextToken = getNextToken(); break; case TerminalTokens.TokenNameBeginLambda : nextToken = getNextToken(); break; case TerminalTokens.TokenNameBeginTypeArguments : nextToken = getNextToken(); break;