Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 148041 Details for
Bug 287648
[1.8][compiler] Add support for JSR 308 - Type Annotations Specification
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Grammar + parser changes v0.7
jsr308-2409.patch (text/plain), 282.90 KB, created by
Srikanth Sankaran
on 2009-09-24 13:43:06 EDT
(
hide
)
Description:
Grammar + parser changes v0.7
Filename:
MIME Type:
Creator:
Srikanth Sankaran
Created:
2009-09-24 13:43:06 EDT
Size:
282.90 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java,v >retrieving revision 1.42 >diff -u -r1.42 ComplianceDiagnoseTest.java >--- src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java 27 Aug 2009 15:26:58 -0000 1.42 >+++ src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java 24 Sep 2009 17:14:15 -0000 >@@ -1456,21 +1456,21 @@ > expected13ProblemLog; > > String expected15ProblemLog = >- "----------\n" + >- "1. WARNING in X.java (at line 1)\n" + >- " public class X <T1 extends String, T2 extends Y {\n" + >- " ^^^^^^\n" + >- "The type parameter T1 should not be bounded by the final type String. Final types cannot be further extended\n" + >- "----------\n" + >- "2. ERROR in X.java (at line 1)\n" + >- " public class X <T1 extends String, T2 extends Y {\n" + >- " ^\n" + >- "Syntax error, insert \">\" to complete ReferenceType1\n" + >- "----------\n" + >- "3. ERROR in X.java (at line 1)\n" + >- " public class X <T1 extends String, T2 extends Y {\n" + >- " ^\n" + >- "Y cannot be resolved to a type\n" + >+ "----------\n" + >+ "1. WARNING in X.java (at line 1)\n" + >+ " public class X <T1 extends String, T2 extends Y {\n" + >+ " ^^^^^^\n" + >+ "The type parameter T1 should not be bounded by the final type String. Final types cannot be further extended\n" + >+ "----------\n" + >+ "2. ERROR in X.java (at line 1)\n" + >+ " public class X <T1 extends String, T2 extends Y {\n" + >+ " ^\n" + >+ "Syntax error, insert \"AdditionalBoundList1\" to complete TypeParameter1\n" + >+ "----------\n" + >+ "3. ERROR in X.java (at line 1)\n" + >+ " public class X <T1 extends String, T2 extends Y {\n" + >+ " ^\n" + >+ "Y cannot be resolved to a type\n" + > "----------\n"; > > runComplianceParserTest( >Index: src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java,v >retrieving revision 1.25 >diff -u -r1.25 ParserTest.java >--- src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java 3 Jul 2008 09:05:22 -0000 1.25 >+++ src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java 24 Sep 2009 17:14:16 -0000 >@@ -71,16 +71,21 @@ > " }\n" + > "}\n" > }, >- "----------\n" + >- "1. ERROR in X.java (at line 3)\n" + >- " throws new X\n" + >- " ^^^^^^\n" + >- "Syntax error on token \"throws\", throw expected\n" + >- "----------\n" + >- "2. ERROR in X.java (at line 3)\n" + >- " throws new X\n" + >- " ^\n" + >- "Syntax error, unexpected end of method\n" + >+ "----------\n" + >+ "1. ERROR in X.java (at line 3)\n" + >+ " throws new X\n" + >+ " ^^^^^^\n" + >+ "Syntax error on token \"throws\", throw expected\n" + >+ "----------\n" + >+ "2. ERROR in X.java (at line 3)\n" + >+ " throws new X\n" + >+ " ^\n" + >+ "Syntax error, insert \"Dimensions\" to complete Expression\n" + >+ "----------\n" + >+ "3. ERROR in X.java (at line 3)\n" + >+ " throws new X\n" + >+ " ^\n" + >+ "Syntax error, insert \";\" to complete BlockStatements\n" + > "----------\n" > ); > } >@@ -130,16 +135,21 @@ > " }\n" + > "}\n" > }, >- "----------\n" + >- "1. ERROR in X.java (at line 3)\n" + >- " throws new X\n" + >- " ^^^^^^\n" + >- "Syntax error on token \"throws\", throw expected\n" + >- "----------\n" + >- "2. ERROR in X.java (at line 3)\n" + >- " throws new X\n" + >- " ^\n" + >- "Syntax error, unexpected end of initializer\n" + >+ "----------\n" + >+ "1. ERROR in X.java (at line 3)\n" + >+ " throws new X\n" + >+ " ^^^^^^\n" + >+ "Syntax error on token \"throws\", throw expected\n" + >+ "----------\n" + >+ "2. ERROR in X.java (at line 3)\n" + >+ " throws new X\n" + >+ " ^\n" + >+ "Syntax error, insert \"Dimensions\" to complete Expression\n" + >+ "----------\n" + >+ "3. ERROR in X.java (at line 3)\n" + >+ " throws new X\n" + >+ " ^\n" + >+ "Syntax error, insert \";\" to complete BlockStatements\n" + > "----------\n" > ); > } >@@ -238,11 +248,11 @@ > " public void bar(){}\n" + > "}\n" > }, >- "----------\n" + >- "1. ERROR in X.java (at line 2)\n" + >- " public void foo(X, Object o, String s) {\n" + >- " ^\n" + >- "Syntax error on token \",\", . expected\n" + >+ "----------\n" + >+ "1. ERROR in X.java (at line 2)\n" + >+ " public void foo(X, Object o, String s) {\n" + >+ " ^\n" + >+ "Syntax error, insert \"VariableDeclaratorId\" to complete FormalParameterList\n" + > "----------\n" > ); > } >Index: src/org/eclipse/jdt/core/tests/compiler/parser/SyntaxErrorTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SyntaxErrorTest.java,v >retrieving revision 1.27 >diff -u -r1.27 SyntaxErrorTest.java >--- src/org/eclipse/jdt/core/tests/compiler/parser/SyntaxErrorTest.java 27 Jun 2008 16:04:46 -0000 1.27 >+++ src/org/eclipse/jdt/core/tests/compiler/parser/SyntaxErrorTest.java 24 Sep 2009 17:14:16 -0000 >@@ -166,17 +166,17 @@ > "1. ERROR in <parenthesis mismatch> (at line 3)\n" + > " [ arg1, \n" + > " ^\n" + >- "Syntax error on token \"[\", invalid Type\n" + >+ "Syntax error on token \"[\", boolean expected\n" + > "----------\n" + > "2. ERROR in <parenthesis mismatch> (at line 4)\n" + > " { arg2, ] \n" + > " ^\n" + >- "Syntax error on token \"{\", invalid Type\n" + >+ "Syntax error on token \"{\", boolean expected\n" + > "----------\n" + > "3. ERROR in <parenthesis mismatch> (at line 4)\n" + > " { arg2, ] \n" + > " ^\n" + >- "Syntax error on token \"]\", invalid Type\n" + >+ "Syntax error on token \"]\", boolean expected\n" + > "----------\n" + > "4. ERROR in <parenthesis mismatch> (at line 5)\n" + > " arg3, \n" + >@@ -273,7 +273,7 @@ > "1. ERROR in <test> (at line 3)\n"+ > " i; \n"+ > " ^\n"+ >- "Syntax error, insert \"AssignmentOperator Expression\" to complete Expression\n"+ >+ "Syntax error, insert \"VariableDeclarators\" to complete LocalVariableDeclaration\n" + > "----------\n"; > > String testName = "<test>"; >Index: src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java,v >retrieving revision 1.802 >diff -u -r1.802 GenericTypeTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 23 Sep 2009 17:03:38 -0000 1.802 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 24 Sep 2009 17:14:37 -0000 >@@ -1870,23 +1870,22 @@ > " A2 a2;\n" + > "}\n" > }, >- "----------\n" + >- "1. ERROR in test\\X1.java (at line 3)\n" + >- " public class X1<A1 extends X2<A2> {\n" + >- " ^^\n" + >- "A2 cannot be resolved to a type\n" + >- "----------\n" + >- "2. ERROR in test\\X1.java (at line 3)\n" + >- " public class X1<A1 extends X2<A2> {\n" + >- " ^\n" + >- "Syntax error, insert \">\" to complete ReferenceType1\n" + >- "----------\n" + >- "3. ERROR in test\\X1.java (at line 7)\n" + >- " class X2<A2 {\n" + >- " ^^\n" + >- "Syntax error on token \"A2\", > expected after this token\n" + >- "----------\n" >- ); >+ "----------\n" + >+ "1. ERROR in test\\X1.java (at line 3)\n" + >+ " public class X1<A1 extends X2<A2> {\n" + >+ " ^^\n" + >+ "A2 cannot be resolved to a type\n" + >+ "----------\n" + >+ "2. ERROR in test\\X1.java (at line 3)\n" + >+ " public class X1<A1 extends X2<A2> {\n" + >+ " ^\n" + >+ "Syntax error, insert \"AdditionalBoundList1\" to complete TypeParameter1\n" + >+ "----------\n" + >+ "3. ERROR in test\\X1.java (at line 7)\n" + >+ " class X2<A2 {\n" + >+ " ^^\n" + >+ "Syntax error, insert \">\" to complete TypeParameter1\n" + >+ "----------\n" ); > } > > // JSR14-V10[2.4]: Not terminated consecutive declaration >@@ -2311,26 +2310,26 @@ > "class X2<A extends X3<String> {}\n" + > "class X3<A {}\n" > }, >- "----------\n" + >- "1. ERROR in test\\X.java (at line 2)\n" + >- " public class X<A extends X1<X2<X3<String>>> {}\n" + >- " ^^^\n" + >- "Syntax error, insert \">\" to complete ReferenceType1\n" + >- "----------\n" + >- "2. ERROR in test\\X.java (at line 3)\n" + >- " class X1<A extends X2<X3<String>> {}\n" + >- " ^^\n" + >- "Syntax error, insert \">\" to complete ReferenceType1\n" + >- "----------\n" + >- "3. ERROR in test\\X.java (at line 4)\n" + >- " class X2<A extends X3<String> {}\n" + >- " ^\n" + >- "Syntax error, insert \">\" to complete ReferenceType1\n" + >- "----------\n" + >- "4. ERROR in test\\X.java (at line 5)\n" + >- " class X3<A {}\n" + >- " ^\n" + >- "Syntax error on token \"A\", > expected after this token\n" + >+ "----------\n" + >+ "1. ERROR in test\\X.java (at line 2)\n" + >+ " public class X<A extends X1<X2<X3<String>>> {}\n" + >+ " ^^^\n" + >+ "Syntax error, insert \"AdditionalBoundList1\" to complete TypeParameter1\n" + >+ "----------\n" + >+ "2. ERROR in test\\X.java (at line 3)\n" + >+ " class X1<A extends X2<X3<String>> {}\n" + >+ " ^^\n" + >+ "Syntax error, insert \"AdditionalBoundList1\" to complete TypeParameter1\n" + >+ "----------\n" + >+ "3. ERROR in test\\X.java (at line 4)\n" + >+ " class X2<A extends X3<String> {}\n" + >+ " ^\n" + >+ "Syntax error, insert \"AdditionalBoundList1\" to complete TypeParameter1\n" + >+ "----------\n" + >+ "4. ERROR in test\\X.java (at line 5)\n" + >+ " class X3<A {}\n" + >+ " ^\n" + >+ "Syntax error, insert \">\" to complete TypeParameter1\n" + > "----------\n" > ); > } >@@ -2398,16 +2397,16 @@ > "class X2<A extends X3<String>> {}\n" + > "class X3<A> {}\n" > }, >- "----------\n" + >- "1. ERROR in test\\X.java (at line 2)\n" + >- " public class X<A extends X1<X2<X3<String {}\n" + >- " ^^^^^^\n" + >- "Syntax error, insert \">>>\" to complete ReferenceType3\n" + >- "----------\n" + >- "2. ERROR in test\\X.java (at line 2)\n" + >- " public class X<A extends X1<X2<X3<String {}\n" + >- " ^^^^^^\n" + >- "Syntax error, insert \">\" to complete ReferenceType1\n" + >+ "----------\n" + >+ "1. ERROR in test\\X.java (at line 2)\n" + >+ " public class X<A extends X1<X2<X3<String {}\n" + >+ " ^^^^^^\n" + >+ "Syntax error, insert \">>>\" to complete ReferenceType3\n" + >+ "----------\n" + >+ "2. ERROR in test\\X.java (at line 2)\n" + >+ " public class X<A extends X1<X2<X3<String {}\n" + >+ " ^^^^^^\n" + >+ "Syntax error, insert \"AdditionalBoundList1\" to complete TypeParameter1\n" + > "----------\n"); > } > public void test0084() { >Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java,v >retrieving revision 1.51 >diff -u -r1.51 JavadocTestMixed.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java 27 Jun 2008 16:04:44 -0000 1.51 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java 24 Sep 2009 17:14:37 -0000 >@@ -14,7 +14,6 @@ > > import junit.framework.Test; > >-import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; > import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; > > public class JavadocTestMixed extends JavadocTest { >@@ -779,49 +778,27 @@ > + " return \"\";\n" > + " }\n" > + "}\n" }, >- this.complianceLevel < ClassFileConstants.JDK1_5 >- ? "----------\n" >- + "1. ERROR in test\\X.java (at line 23)\n" >- + " }\n" >- + " ^\n" >- + "Syntax error, insert \"}\" to complete ClassBody\n" >- + "----------\n" >- + "2. ERROR in test\\X.java (at line 26)\n" >- + " * @param list Valid param tag\n" >- + " ^^^^\n" >- + "Javadoc: Parameter list is not declared\n" >- + "----------\n" >- + "3. ERROR in test\\X.java (at line 33)\n" >- + " public String foo(java.util.Vector ) {\n" >- + " ^^^^^^\n" >- + "Syntax error on token \"Vector\", VariableDeclaratorId expected after this token\n" >- + "----------\n" >- + "4. ERROR in test\\X.java (at line 36)\n" >- + " }\n" >- + " ^\n" >- + "Syntax error on token \"}\", delete this token\n" >- + "----------\n" >- : "----------\n" >- + "1. ERROR in test\\X.java (at line 23)\n" >- + " }\n" >- + " ^\n" >- + "Syntax error, insert \"}\" to complete ClassBody\n" >- + "----------\n" >- + "2. ERROR in test\\X.java (at line 26)\n" >- + " * @param list Valid param tag\n" >- + " ^^^^\n" >- + "Javadoc: Parameter list is not declared\n" >- + "----------\n" >- + "3. ERROR in test\\X.java (at line 33)\n" >- + " public String foo(java.util.Vector ) {\n" >- + " ^\n" >- + "Syntax error on token \".\", ... expected\n" >- + "----------\n" >- + "4. ERROR in test\\X.java (at line 36)\n" >- + " }\n" >- + " ^\n" >- + "Syntax error on token \"}\", delete this token\n" >- + "----------\n"); >+ "----------\n" + >+ "1. ERROR in test\\X.java (at line 23)\n" + >+ " }\n" + >+ " ^\n" + >+ "Syntax error, insert \"}\" to complete ClassBody\n" + >+ "----------\n" + >+ "2. ERROR in test\\X.java (at line 26)\n" + >+ " * @param list Valid param tag\n" + >+ " ^^^^\n" + >+ "Javadoc: Parameter list is not declared\n" + >+ "----------\n" + >+ "3. ERROR in test\\X.java (at line 33)\n" + >+ " public String foo(java.util.Vector ) {\n" + >+ " ^^^^^^\n" + >+ "Syntax error, insert \"VariableDeclaratorId\" to complete FormalParameterList\n" + >+ "----------\n" + >+ "4. ERROR in test\\X.java (at line 36)\n" + >+ " }\n" + >+ " ^\n" + >+ "Syntax error on token \"}\", delete this token\n" + >+ "----------\n"); > } > > public void test040() { >Index: src/org/eclipse/jdt/core/tests/compiler/regression/CastTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CastTest.java,v >retrieving revision 1.49 >diff -u -r1.49 CastTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/CastTest.java 27 Aug 2009 15:26:58 -0000 1.49 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/CastTest.java 24 Sep 2009 17:14:16 -0000 >@@ -36,6 +36,10 @@ > return buildAllCompliancesTestSuite(testClass()); > } > >+static { >+ TESTS_NAMES = new String [] {"test029" }; >+} >+ > /* > * check extra checkcast (interface->same interface) > */ >Index: src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java,v >retrieving revision 1.28 >diff -u -r1.28 CompilerInvocationTests.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java 22 Sep 2009 14:56:48 -0000 1.28 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java 24 Sep 2009 17:14:18 -0000 >@@ -568,7 +568,9 @@ > expectedProblemAttributes.put("InvalidUsageOfAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX)); > expectedProblemAttributes.put("InvalidUsageOfEnumDeclarations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX)); > expectedProblemAttributes.put("InvalidUsageOfForeachStatements", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX)); >+ expectedProblemAttributes.put("InvalidUsageOfReceiverAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX)); > expectedProblemAttributes.put("InvalidUsageOfStaticImports", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX)); >+ expectedProblemAttributes.put("InvalidUsageOfTypeAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX)); > expectedProblemAttributes.put("InvalidUsageOfTypeArguments", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX)); > expectedProblemAttributes.put("InvalidUsageOfTypeParameters", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX)); > expectedProblemAttributes.put("InvalidUsageOfTypeParametersForAnnotationDeclaration", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX)); >@@ -661,6 +663,7 @@ > expectedProblemAttributes.put("MethodRequiresBody", new ProblemAttributes(CategorizedProblem.CAT_MEMBER)); > expectedProblemAttributes.put("MethodReturnsVoid", new ProblemAttributes(CategorizedProblem.CAT_MEMBER)); > expectedProblemAttributes.put("MethodVarargsArgumentNeedCast", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM)); >+ expectedProblemAttributes.put("misplacedTypeAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX)); > expectedProblemAttributes.put("MissingArgumentsForParameterizedMemberType", new ProblemAttributes(CategorizedProblem.CAT_TYPE)); > expectedProblemAttributes.put("MissingEnclosingInstance", new ProblemAttributes(CategorizedProblem.CAT_TYPE)); > expectedProblemAttributes.put("MissingEnclosingInstanceForConstructorCall", new ProblemAttributes(CategorizedProblem.CAT_TYPE)); >@@ -1199,7 +1202,9 @@ > expectedProblemAttributes.put("InvalidUsageOfAnnotations", SKIP); > expectedProblemAttributes.put("InvalidUsageOfEnumDeclarations", SKIP); > expectedProblemAttributes.put("InvalidUsageOfForeachStatements", SKIP); >+ expectedProblemAttributes.put("InvalidUsageOfReceiverAnnotations", SKIP); > expectedProblemAttributes.put("InvalidUsageOfStaticImports", SKIP); >+ expectedProblemAttributes.put("InvalidUsageOfTypeAnnotations", SKIP); > expectedProblemAttributes.put("InvalidUsageOfTypeArguments", SKIP); > expectedProblemAttributes.put("InvalidUsageOfTypeParameters", SKIP); > expectedProblemAttributes.put("InvalidUsageOfTypeParametersForAnnotationDeclaration", SKIP); >@@ -1292,6 +1297,7 @@ > expectedProblemAttributes.put("MethodRequiresBody", SKIP); > expectedProblemAttributes.put("MethodReturnsVoid", SKIP); > expectedProblemAttributes.put("MethodVarargsArgumentNeedCast", new ProblemAttributes(JavaCore.COMPILER_PB_VARARGS_ARGUMENT_NEED_CAST)); >+ expectedProblemAttributes.put("misplacedTypeAnnotations", SKIP); > expectedProblemAttributes.put("MissingArgumentsForParameterizedMemberType", SKIP); > expectedProblemAttributes.put("MissingEnclosingInstance", SKIP); > expectedProblemAttributes.put("MissingEnclosingInstanceForConstructorCall", SKIP); >#P org.eclipse.jdt.core.tests.builder >Index: src/org/eclipse/jdt/core/tests/builder/ErrorsTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/ErrorsTests.java,v >retrieving revision 1.29 >diff -u -r1.29 ErrorsTests.java >--- src/org/eclipse/jdt/core/tests/builder/ErrorsTests.java 27 Jun 2008 16:02:02 -0000 1.29 >+++ src/org/eclipse/jdt/core/tests/builder/ErrorsTests.java 24 Sep 2009 17:14:40 -0000 >@@ -166,7 +166,7 @@ > ); > fullBuild(); > Problem[] prob1 = env.getProblemsFor(classTest1); >- expectingSpecificProblemFor(classTest1, new Problem("p1", "Syntax error on token \"extends\", Type expected after this token", classTest1, 31, 38, CategorizedProblem.CAT_SYNTAX, IMarker.SEVERITY_ERROR)); >+ expectingSpecificProblemFor(classTest1, new Problem("p1", "Syntax error on token \"extends\", ClassType expected after this token", classTest1, 31, 38, CategorizedProblem.CAT_SYNTAX, IMarker.SEVERITY_ERROR)); > assertEquals(JavaBuilder.SOURCE_ID, prob1[0].getSourceId()); > } > >#P org.eclipse.jdt.core.tests >Index: Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/NegativeTest.java >=================================================================== >RCS file: /home/cvs/numbat/org.eclipse.jdt.core.tests/Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/NegativeTest.java,v >retrieving revision 1.328 >diff -u -r1.328 NegativeTest.java >--- Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/NegativeTest.java 17 Aug 2009 17:45:39 -0000 1.328 >+++ Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/NegativeTest.java 24 Sep 2009 17:16:20 -0000 >@@ -4812,7 +4812,7 @@ > "1. ERROR in p\\Example3.java (at line 10)\n" + > " int myVal = condition ? x = 7 : x = 3;\n" + > " ^\n" + >- "Syntax error on token \"=\", != expected\n" + >+ "Syntax error on token \"=\", <= expected\n" + > "----------\n" > ); > } >@@ -4939,21 +4939,21 @@ > " }\n" + > "}", > }, >- "----------\n" + >- "1. ERROR in p\\NA.java (at line 7)\n" + >- " (new Class1).run();\n" + >- " ^^^\n" + >- "Syntax error on token \"new\", delete this token\n" + >- "----------\n" + >- "2. ERROR in p\\NA.java (at line 8)\n" + >- " (new Class2).run();\n" + >- " ^^^\n" + >- "Syntax error on token \"new\", delete this token\n" + >- "----------\n" + >- "3. ERROR in p\\NA.java (at line 9)\n" + >- " (new Class3).run();\n" + >- " ^^^\n" + >- "Syntax error on token \"new\", delete this token\n" + >+ "----------\n" + >+ "1. ERROR in p\\NA.java (at line 7)\n" + >+ " (new Class1).run();\n" + >+ " ^^^^^^\n" + >+ "Syntax error, insert \"Dimensions\" to complete Expression\n" + >+ "----------\n" + >+ "2. ERROR in p\\NA.java (at line 8)\n" + >+ " (new Class2).run();\n" + >+ " ^^^^^^\n" + >+ "Syntax error, insert \"Dimensions\" to complete Expression\n" + >+ "----------\n" + >+ "3. ERROR in p\\NA.java (at line 9)\n" + >+ " (new Class3).run();\n" + >+ " ^^^^^^\n" + >+ "Syntax error, insert \"Dimensions\" to complete Expression\n" + > "----------\n" > ); > } >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/JavaSearchGenericTypeTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchGenericTypeTests.java,v >retrieving revision 1.25 >diff -u -r1.25 JavaSearchGenericTypeTests.java >--- src/org/eclipse/jdt/core/tests/model/JavaSearchGenericTypeTests.java 28 Apr 2009 17:49:27 -0000 1.25 >+++ src/org/eclipse/jdt/core/tests/model/JavaSearchGenericTypeTests.java 24 Sep 2009 17:16:32 -0000 >@@ -37,7 +37,7 @@ > static { > // org.eclipse.jdt.internal.core.search.matching.MatchLocator.PRINT_BUFFER = false; > // TESTS_PREFIX = "testArray"; >-// TESTS_NAMES = new String[] { "testParameterizedTypeMultipleArguments01" }; >+// TESTS_NAMES = new String[] { "testParameterizedArrayTypeSingleArgument01" }; > // TESTS_NUMBERS = new int[] { 8 }; > // TESTS_RANGE = new int[] { 6, -1 }; > } >Index: src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java,v >retrieving revision 1.166 >diff -u -r1.166 ASTConverterTestAST3_2.java >--- src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java 17 Aug 2009 17:45:43 -0000 1.166 >+++ src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java 24 Sep 2009 17:16:30 -0000 >@@ -7622,7 +7622,7 @@ > true); > assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); > CompilationUnit unit = (CompilationUnit) node; >- assertProblemsSize(unit, 1, "Syntax error, insert \"AssignmentOperator Expression\" to complete Expression"); >+ assertProblemsSize(unit, 1, "Syntax error, insert \"VariableDeclarators\" to complete LocalVariableDeclaration"); > node = getASTNode(unit, 0, 0, 0); > assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); > assertTrue("Not recovered", isRecovered(node)); >@@ -7731,9 +7731,8 @@ > CompilationUnit unit = (CompilationUnit) node; > assertProblemsSize( > unit, >- 2, >- "Object.equ cannot be resolved to a variable\n" + >- "Syntax error, insert \"AssignmentOperator Expression\" to complete Expression"); >+ 1, >+ "Syntax error, insert \"VariableDeclarators\" to complete LocalVariableDeclaration"); > node = getASTNode(unit, 0, 0); > assertEquals("Not a field declaration statement", ASTNode.INITIALIZER, node.getNodeType()); > Initializer initializer = (Initializer) node; >@@ -7999,75 +7998,83 @@ > "}"); > > assertASTResult( >- "===== AST =====\n" + >- "import java.nio.ByteBuffer;\n" + >- "import java.nio.CharBuffer;\n" + >- "import java.nio.charset.Charset;\n" + >- "import java.nio.charset.CharsetDecoder;\n" + >- "import java.nio.charset.CharsetEncoder;\n" + >- "import java.nio.charset.CoderResult;\n" + >- "public class TestCharset extends Charset {\n" + >- " public CharsetDecoder newDecoder(){\n" + >- " return new CharsetDecoder(this,2.0,2.0){\n" + >- " void CharsetDecoder(){\n" + >- " }\n" + >- " protected CoderResult decodeLoop( ByteBuffer in, CharBuffer out){\n" + >- " return null;\n" + >- " }\n" + >- " }\n" + >- ";\n" + >- " ;\n" + >- " }\n" + >- " public CharsetEncoder newEncoder(){\n" + >- " return null;\n" + >- " }\n" + >- "}\n" + >- "\n" + >- "===== Details =====\n" + >- "===== Problems =====\n" + >- "1. ERROR in /Converter/src/TestCharset.java (at line 1)\n" + >- " import java.nio.ByteBuffer;\n" + >- " ^^^^^^^^\n" + >- "The import java.nio cannot be resolved\n" + >- "2. ERROR in /Converter/src/TestCharset.java (at line 2)\n" + >- " import java.nio.CharBuffer;\n" + >- " ^^^^^^^^\n" + >- "The import java.nio cannot be resolved\n" + >- "3. ERROR in /Converter/src/TestCharset.java (at line 3)\n" + >- " import java.nio.charset.Charset;\n" + >- " ^^^^^^^^\n" + >- "The import java.nio cannot be resolved\n" + >- "4. ERROR in /Converter/src/TestCharset.java (at line 4)\n" + >- " import java.nio.charset.CharsetDecoder;\n" + >- " ^^^^^^^^\n" + >- "The import java.nio cannot be resolved\n" + >- "5. ERROR in /Converter/src/TestCharset.java (at line 5)\n" + >- " import java.nio.charset.CharsetEncoder;\n" + >- " ^^^^^^^^\n" + >- "The import java.nio cannot be resolved\n" + >- "6. ERROR in /Converter/src/TestCharset.java (at line 6)\n" + >- " import java.nio.charset.CoderResult;\n" + >- " ^^^^^^^^\n" + >- "The import java.nio cannot be resolved\n" + >- "7. ERROR in /Converter/src/TestCharset.java (at line 7)\n" + >- " public class TestCharset extends Charset {\n" + >- " ^^^^^^^\n" + >- "Charset cannot be resolved to a type\n" + >- "8. ERROR in /Converter/src/TestCharset.java (at line 8)\n" + >- " public CharsetDecoder newDecoder() {\n" + >- " ^^^^^^^^^^^^^^\n" + >- "CharsetDecoder cannot be resolved to a type\n" + >- "9. ERROR in /Converter/src/TestCharset.java (at line 9)\n" + >- " return new CharsetDecoder(this, 2.0, 2.0) {\n" + >- " ^^^^^^^^^^^^^^\n" + >- "CharsetDecoder cannot be resolved to a type\n" + >- "10. ERROR in /Converter/src/TestCharset.java (at line 10)\n" + >- " CharsetDecoder(CharSet\n" + >- " ^^^^^^^^^^^^^^^^^^^^^^\n" + >- "Syntax error on token(s), misplaced construct(s)\n" + >- "11. ERROR in /Converter/src/TestCharset.java (at line 17)\n" + >- " public CharsetEncoder newEncoder() {\n" + >- " ^^^^^^^^^^^^^^\n" + >+ "===== AST =====\n" + >+ "import java.nio.ByteBuffer;\n" + >+ "import java.nio.CharBuffer;\n" + >+ "import java.nio.charset.Charset;\n" + >+ "import java.nio.charset.CharsetDecoder;\n" + >+ "import java.nio.charset.CharsetEncoder;\n" + >+ "import java.nio.charset.CoderResult;\n" + >+ "public class TestCharset extends Charset {\n" + >+ " public CharsetDecoder newDecoder(){\n" + >+ " return new CharsetDecoder(this,2.0,2.0){\n" + >+ " void CharsetDecoder(){\n" + >+ " }\n" + >+ " protected CoderResult decodeLoop( ByteBuffer in, CharBuffer out){\n" + >+ " return null;\n" + >+ " }\n" + >+ " }\n" + >+ ";\n" + >+ " ;\n" + >+ " }\n" + >+ " public CharsetEncoder newEncoder(){\n" + >+ " return null;\n" + >+ " }\n" + >+ "}\n" + >+ "\n" + >+ "===== Details =====\n" + >+ "===== Problems =====\n" + >+ "1. ERROR in /Converter/src/TestCharset.java (at line 1)\n" + >+ " import java.nio.ByteBuffer;\n" + >+ " ^^^^^^^^\n" + >+ "The import java.nio cannot be resolved\n" + >+ "2. ERROR in /Converter/src/TestCharset.java (at line 2)\n" + >+ " import java.nio.CharBuffer;\n" + >+ " ^^^^^^^^\n" + >+ "The import java.nio cannot be resolved\n" + >+ "3. ERROR in /Converter/src/TestCharset.java (at line 3)\n" + >+ " import java.nio.charset.Charset;\n" + >+ " ^^^^^^^^\n" + >+ "The import java.nio cannot be resolved\n" + >+ "4. ERROR in /Converter/src/TestCharset.java (at line 4)\n" + >+ " import java.nio.charset.CharsetDecoder;\n" + >+ " ^^^^^^^^\n" + >+ "The import java.nio cannot be resolved\n" + >+ "5. ERROR in /Converter/src/TestCharset.java (at line 5)\n" + >+ " import java.nio.charset.CharsetEncoder;\n" + >+ " ^^^^^^^^\n" + >+ "The import java.nio cannot be resolved\n" + >+ "6. ERROR in /Converter/src/TestCharset.java (at line 6)\n" + >+ " import java.nio.charset.CoderResult;\n" + >+ " ^^^^^^^^\n" + >+ "The import java.nio cannot be resolved\n" + >+ "7. ERROR in /Converter/src/TestCharset.java (at line 7)\n" + >+ " public class TestCharset extends Charset {\n" + >+ " ^^^^^^^\n" + >+ "Charset cannot be resolved to a type\n" + >+ "8. ERROR in /Converter/src/TestCharset.java (at line 8)\n" + >+ " public CharsetDecoder newDecoder() {\n" + >+ " ^^^^^^^^^^^^^^\n" + >+ "CharsetDecoder cannot be resolved to a type\n" + >+ "9. ERROR in /Converter/src/TestCharset.java (at line 9)\n" + >+ " return new CharsetDecoder(this, 2.0, 2.0) {\n" + >+ " ^^^^^^^^^^^^^^\n" + >+ "CharsetDecoder cannot be resolved to a type\n" + >+ "10. ERROR in /Converter/src/TestCharset.java (at line 10)\n" + >+ " CharsetDecoder(CharSet\n" + >+ " ^^^^^^^\n" + >+ "Syntax error, insert \"VariableDeclaratorId\" to complete FormalParameter\n" + >+ "11. ERROR in /Converter/src/TestCharset.java (at line 10)\n" + >+ " CharsetDecoder(CharSet\n" + >+ " ^^^^^^^\n" + >+ "Syntax error, insert \")\" to complete ConstructorDeclaration\n" + >+ "12. ERROR in /Converter/src/TestCharset.java (at line 10)\n" + >+ " CharsetDecoder(CharSet\n" + >+ " ^^^^^^^\n" + >+ "Syntax error, insert \";\" to complete ClassBodyDeclarations\n" + >+ "13. ERROR in /Converter/src/TestCharset.java (at line 17)\n" + >+ " public CharsetEncoder newEncoder() {\n" + >+ " ^^^^^^^^^^^^^^\n" + > "CharsetEncoder cannot be resolved to a type\n", > result); > } >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java,v >retrieving revision 1.51 >diff -u -r1.51 ParameterizedSingleTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java 28 Apr 2009 16:53:03 -0000 1.51 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java 24 Sep 2009 17:16:39 -0000 >@@ -29,6 +29,10 @@ > this.originalSourceEnd = this.sourceEnd; > this.typeArguments = typeArguments; > } >+ public ParameterizedSingleTypeReference(char[] name, TypeReference[] typeArguments, int dim, Annotation[][] annotationsOnDimensions, long pos) { >+ this(name, typeArguments, dim, pos); >+ this.annotationsOnDimensions = annotationsOnDimensions; >+ } > public void checkBounds(Scope scope) { > if (this.resolvedType == null) return; > >@@ -48,6 +52,9 @@ > public TypeReference copyDims(int dim) { > return new ParameterizedSingleTypeReference(this.token, this.typeArguments, dim, (((long)this.sourceStart)<<32)+this.sourceEnd); > } >+ public TypeReference copyDims(int dim, Annotation [][] annotationsOnDims) { >+ return new ParameterizedSingleTypeReference(this.token, this.typeArguments, dim, annotationsOnDims, (((long)this.sourceStart)<<32)+this.sourceEnd); >+ } > > /** > * @return char[][] >@@ -81,6 +88,10 @@ > protected TypeBinding getTypeBinding(Scope scope) { > return null; // not supported here - combined with resolveType(...) > } >+ >+ public boolean isParametrizedTypeReference() { >+ return true; >+ } > > /* > * No need to check for reference to raw type per construction >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java,v >retrieving revision 1.32 >diff -u -r1.32 ArrayTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java 27 Jun 2008 16:03:55 -0000 1.32 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java 24 Sep 2009 17:16:39 -0000 >@@ -19,6 +19,7 @@ > > public class ArrayTypeReference extends SingleTypeReference { > public int dimensions; >+ public Annotation[][] annotationsOnDimensions; // jsr308 style type annotations on dimensions. > public int originalSourceEnd; > > /** >@@ -32,12 +33,22 @@ > super(source, pos); > this.originalSourceEnd = this.sourceEnd; > this.dimensions = dimensions ; >+ this.annotationsOnDimensions = null; >+ } >+ >+ public ArrayTypeReference(char[] source, int dimensions, Annotation[][] annotationsOnDimensions, long pos) { >+ this(source, dimensions, pos); >+ this.annotationsOnDimensions = annotationsOnDimensions; > } > > public int dimensions() { > > return this.dimensions; > } >+ >+ public Annotation[][] getAnnotationsOnDimensions() { >+ return this.annotationsOnDimensions; >+ } > /** > * @return char[][] > */ >Index: compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java,v >retrieving revision 1.48 >diff -u -r1.48 QualifiedTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java 27 Jun 2008 16:03:54 -0000 1.48 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java 24 Sep 2009 17:16:39 -0000 >@@ -33,6 +33,12 @@ > //warning : the new type ref has a null binding > return new ArrayQualifiedTypeReference(this.tokens, dim, this.sourcePositions); > } >+ >+ public TypeReference copyDims(int dim, Annotation[][] annotationsOnDimensions) { >+ //return a type reference copy of me with some dimensions >+ //warning : the new type ref has a null binding >+ return new ArrayQualifiedTypeReference(this.tokens, dim, annotationsOnDimensions, this.sourcePositions); >+ } > > protected TypeBinding findNextTypeBinding(int tokenIndex, Scope scope, PackageBinding packageBinding) { > LookupEnvironment env = scope.environment(); >Index: compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java,v >retrieving revision 1.41 >diff -u -r1.41 TypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java 27 Jun 2008 16:03:55 -0000 1.41 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java 24 Sep 2009 17:16:39 -0000 >@@ -31,7 +31,7 @@ > /* > * Answer a base type reference (can be an array of base type). > */ >-public static final TypeReference baseTypeReference(int baseType, int dim) { >+public static final TypeReference baseTypeReference(int baseType, int dim, Annotation [][] dimAnnotations) { > > if (dim == 0) { > switch (baseType) { >@@ -57,26 +57,29 @@ > } > switch (baseType) { > case (TypeIds.T_void) : >- return new ArrayTypeReference(TypeBinding.VOID.simpleName, dim, 0); >+ return new ArrayTypeReference(TypeBinding.VOID.simpleName, dim, dimAnnotations, 0); > case (TypeIds.T_boolean) : >- return new ArrayTypeReference(TypeBinding.BOOLEAN.simpleName, dim, 0); >+ return new ArrayTypeReference(TypeBinding.BOOLEAN.simpleName, dim, dimAnnotations, 0); > case (TypeIds.T_char) : >- return new ArrayTypeReference(TypeBinding.CHAR.simpleName, dim, 0); >+ return new ArrayTypeReference(TypeBinding.CHAR.simpleName, dim, dimAnnotations, 0); > case (TypeIds.T_float) : >- return new ArrayTypeReference(TypeBinding.FLOAT.simpleName, dim, 0); >+ return new ArrayTypeReference(TypeBinding.FLOAT.simpleName, dim, dimAnnotations, 0); > case (TypeIds.T_double) : >- return new ArrayTypeReference(TypeBinding.DOUBLE.simpleName, dim, 0); >+ return new ArrayTypeReference(TypeBinding.DOUBLE.simpleName, dim, dimAnnotations, 0); > case (TypeIds.T_byte) : >- return new ArrayTypeReference(TypeBinding.BYTE.simpleName, dim, 0); >+ return new ArrayTypeReference(TypeBinding.BYTE.simpleName, dim, dimAnnotations, 0); > case (TypeIds.T_short) : >- return new ArrayTypeReference(TypeBinding.SHORT.simpleName, dim, 0); >+ return new ArrayTypeReference(TypeBinding.SHORT.simpleName, dim, dimAnnotations, 0); > case (TypeIds.T_int) : >- return new ArrayTypeReference(TypeBinding.INT.simpleName, dim, 0); >+ return new ArrayTypeReference(TypeBinding.INT.simpleName, dim, dimAnnotations, 0); > default : //T_long >- return new ArrayTypeReference(TypeBinding.LONG.simpleName, dim, 0); >+ return new ArrayTypeReference(TypeBinding.LONG.simpleName, dim, dimAnnotations, 0); > } > } > >+// JSR308 type annotations... >+public Annotation[] annotations = null; >+ > // allows us to trap completion & selection nodes > public void aboutToResolve(Scope scope) { > // default implementation: do nothing >@@ -88,9 +91,13 @@ > // only parameterized type references have bounds > } > public abstract TypeReference copyDims(int dim); >+public abstract TypeReference copyDims(int dim, Annotation[][] annotationsOnDimensions); > public int dimensions() { > return 0; > } >+public Annotation[][] getAnnotationsOnDimensions() { >+ return null; >+} > > public abstract char[] getLastToken(); > >@@ -166,6 +173,10 @@ > return true; > } > >+public boolean isParametrizedTypeReference() { >+ return false; >+} >+ > protected void reportDeprecatedType(TypeBinding type, Scope scope) { > scope.problemReporter().deprecatedType(type, this); > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java,v >retrieving revision 1.32 >diff -u -r1.32 SingleTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java 27 Jun 2008 16:03:54 -0000 1.32 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java 24 Sep 2009 17:16:39 -0000 >@@ -33,6 +33,13 @@ > > return new ArrayTypeReference(this.token, dim,(((long)this.sourceStart)<<32)+this.sourceEnd); > } >+ >+ public TypeReference copyDims(int dim, Annotation[][] annotationsOnDimensions){ >+ //return a type reference copy of me with some dimensions >+ //warning : the new type ref has a null binding >+ >+ return new ArrayTypeReference(this.token, dim, annotationsOnDimensions, (((long)this.sourceStart)<<32)+this.sourceEnd); >+ } > > public char[] getLastToken() { > return this.token; >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java,v >retrieving revision 1.15 >diff -u -r1.15 JavadocImplicitTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java 27 Jun 2008 16:03:55 -0000 1.15 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java 24 Sep 2009 17:16:39 -0000 >@@ -30,6 +30,10 @@ > public TypeReference copyDims(int dim) { > return null; > } >+ >+ public TypeReference copyDims(int dim, Annotation[][] annotationsOnDimensions) { >+ return null; >+ } > > /* (non-Javadoc) > * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getTypeBinding(org.eclipse.jdt.internal.compiler.lookup.Scope) >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java,v >retrieving revision 1.55 >diff -u -r1.55 ParameterizedQualifiedTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java 28 Apr 2009 16:53:03 -0000 1.55 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java 24 Sep 2009 17:16:39 -0000 >@@ -34,6 +34,10 @@ > super(tokens, dim, positions); > this.typeArguments = typeArguments; > } >+ public ParameterizedQualifiedTypeReference(char[][] tokens, TypeReference[][] typeArguments, int dim, Annotation[][] annotationsOnDimensions, long[] positions) { >+ this(tokens, typeArguments, dim, positions); >+ this.annotationsOnDimensions = annotationsOnDimensions; >+ } > public void checkBounds(Scope scope) { > if (this.resolvedType == null) return; > >@@ -59,6 +63,13 @@ > public TypeReference copyDims(int dim){ > return new ParameterizedQualifiedTypeReference(this.tokens, this.typeArguments, dim, this.sourcePositions); > } >+ public TypeReference copyDims(int dim, Annotation[][] dimensionAnnotations){ >+ return new ParameterizedQualifiedTypeReference(this.tokens, this.typeArguments, dim, dimensionAnnotations, this.sourcePositions); >+ } >+ public boolean isParametrizedTypeReference() { >+ return true; >+ } >+ > > /** > * @return char[][] >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java,v >retrieving revision 1.32 >diff -u -r1.32 ArrayQualifiedTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java 7 Mar 2009 01:08:07 -0000 1.32 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java 24 Sep 2009 17:16:39 -0000 >@@ -17,17 +17,28 @@ > > public class ArrayQualifiedTypeReference extends QualifiedTypeReference { > int dimensions; >+ Annotation[][] annotationsOnDimensions; // jsr308 style type annotations on dimensions > > public ArrayQualifiedTypeReference(char[][] sources , int dim, long[] poss) { > > super( sources , poss); > this.dimensions = dim ; >+ this.annotationsOnDimensions = null; >+ } >+ >+ public ArrayQualifiedTypeReference(char[][] sources, int dim, Annotation[][] annotationsOnDimensions, long[] poss) { >+ this(sources, dim, poss); >+ this.annotationsOnDimensions = annotationsOnDimensions; > } > > public int dimensions() { > > return this.dimensions; > } >+ >+ public Annotation[][] getAnnotationsOnDimensions() { >+ return this.annotationsOnDimensions; >+ } > > /** > * @return char[][] >Index: compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java,v >retrieving revision 1.103 >diff -u -r1.103 AbstractMethodDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java 7 Mar 2009 01:08:07 -0000 1.103 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java 24 Sep 2009 17:16:39 -0000 >@@ -35,6 +35,7 @@ > public int modifiers; > public int modifiersSourceStart; > public Annotation[] annotations; >+ public Annotation[] receiverAnnotations; > public Argument[] arguments; > public TypeReference[] thrownExceptions; > public Statement[] statements; >@@ -403,6 +404,12 @@ > bindThrownExceptions(); > resolveJavadoc(); > resolveAnnotations(this.scope, this.annotations, this.binding); >+ // jsr308 >+ if (this.receiverAnnotations != null && this.scope.isStatic) { >+ int last = this.receiverAnnotations.length - 1; >+ this.scope.problemReporter().illegalReceiverAnnotations(this.receiverAnnotations[0], >+ this.receiverAnnotations[last]); >+ } > resolveStatements(); > // check @Deprecated annotation presence > if (this.binding != null >Index: codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java,v >retrieving revision 1.90 >diff -u -r1.90 AssistParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java 22 Jun 2009 14:00:52 -0000 1.90 >+++ codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java 24 Sep 2009 17:16:37 -0000 >@@ -889,13 +889,13 @@ > /* > * Build specific type reference nodes in case the cursor is located inside the type reference > */ >-protected TypeReference getTypeReference(int dim) { >+protected TypeReference getUnannotatedTypeReference(int dim) { > > int index; > > /* no need to take action if not inside completed identifiers */ > if ((index = indexOfAssistIdentifier(true)) < 0) { >- return super.getTypeReference(dim); >+ return super.getUnannotatedTypeReference(dim); > } > int length = this.identifierLengthStack[this.identifierLengthPtr]; > TypeReference reference; >@@ -1602,6 +1602,9 @@ > this.astLengthPtr = -1; > this.expressionPtr = -1; > this.expressionLengthPtr = -1; >+ this.unattachedAnnotationPtr = -1; >+ this.typeAnnotationLengthPtr = -1; >+ this.typeAnnotationPtr = -1; > this.identifierPtr = -1; > this.identifierLengthPtr = -1; > this.intPtr = -1; >Index: grammar/java.g >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/grammar/java.g,v >retrieving revision 1.10 >diff -u -r1.10 java.g >--- grammar/java.g 7 May 2009 08:49:43 -0000 1.10 >+++ grammar/java.g 24 Sep 2009 17:16:52 -0000 >@@ -178,8 +178,11 @@ > Goal ::= '>>' Initializer > -- error recovery > -- Modifiersopt is used to properly consume a header and exit the rule reduction at the end of the parse() method >-Goal ::= '>>>' Header1 Modifiersopt >-Goal ::= '!' Header2 Modifiersopt >+-- 1.7, we now use NonAnnotModifiersopt, since using Modifiersopt here pollutes the follow set of >+-- various non terminals and results in shift/reduce conflicts in various places. (e.g, ConstructorHeader >+-- cannot really have Modifiers in its follow set.) >+Goal ::= '>>>' Header1 NonAnnotModifiersopt >+Goal ::= '!' Header2 NonAnnotModifiersopt > Goal ::= '*' BlockStatements > Goal ::= '*' CatchHeader > -- JDOM >@@ -250,14 +253,17 @@ > > ClassOrInterface ::= Name > /.$putCase consumeClassOrInterfaceName(); $break ./ >-ClassOrInterface ::= GenericType '.' Name >-/.$putCase consumeClassOrInterface(); $break ./ >+ClassOrInterface ::= GenericTypeDotName > /:$readableName Type:/ > > GenericType ::= ClassOrInterface TypeArguments > /.$putCase consumeGenericType(); $break ./ > /:$readableName GenericType:/ > >+GenericTypeDotName ::= GenericType '.' Name >+/.$putCase consumeClassOrInterface(); $break ./ >+/:$readableName GenericTypeDotName:/ >+ > -- > -- These rules have been rewritten to avoid some conflicts introduced > -- by adding the 1.1 features >@@ -267,8 +273,7 @@ > -- ArrayType ::= ArrayType '[' ']' > -- > >-ArrayTypeWithTypeArgumentsName ::= GenericType '.' Name >-/.$putCase consumeArrayTypeWithTypeArgumentsName(); $break ./ >+ArrayTypeWithTypeArgumentsName ::= GenericTypeDotName > /:$readableName ArrayTypeWithTypeArgumentsName:/ > > ArrayType ::= PrimitiveType Dims >@@ -281,7 +286,10 @@ > /.$putCase consumeGenericTypeArrayType(); $break ./ > /:$readableName ArrayType:/ > >-ClassType -> ClassOrInterfaceType >+ClassType ::= ClassOrInterfaceType >+/.$putCase consumeZeroTypeAnnotations(); $break ./ >+ClassType ::= OneOrMoreAnnotations ClassOrInterfaceType >+/:$compliance 1.7:/ > /:$readableName ClassType:/ > > -------------------------------------------------------------- >@@ -422,11 +430,29 @@ > > --18.7 Only in the LALR(1) Grammar > >+NonAnnotModifiers -> NonAnnotModifier >+NonAnnotModifiers -> NonAnnotModifiers NonAnnotModifier >+/.$putCase consumeModifiers2(); $break ./ >+/:$readableName Modifiers:/ >+ > Modifiers -> Modifier > Modifiers ::= Modifiers Modifier > /.$putCase consumeModifiers2(); $break ./ > /:$readableName Modifiers:/ > >+NonAnnotModifier -> 'public' >+NonAnnotModifier -> 'protected' >+NonAnnotModifier -> 'private' >+NonAnnotModifier -> 'static' >+NonAnnotModifier -> 'abstract' >+NonAnnotModifier -> 'final' >+NonAnnotModifier -> 'native' >+NonAnnotModifier -> 'synchronized' >+NonAnnotModifier -> 'transient' >+NonAnnotModifier -> 'volatile' >+NonAnnotModifier -> 'strictfp' >+/:$readableName Modifier:/ >+ > Modifier -> 'public' > Modifier -> 'protected' > Modifier -> 'private' >@@ -483,7 +509,10 @@ > /.$putCase consumeInterfaceTypeList(); $break ./ > /:$readableName InterfaceTypeList:/ > >-InterfaceType ::= ClassOrInterfaceType >+InterfaceType ::= PushZeroTypeAnnotations ClassOrInterfaceType >+/.$putCase consumeInterfaceType(); $break ./ >+InterfaceType ::= OneOrMoreAnnotations ClassOrInterfaceType >+/:$compliance 1.7:/ > /.$putCase consumeInterfaceType(); $break ./ > /:$readableName InterfaceType:/ > >@@ -618,7 +647,10 @@ > /:$readableName MethodDeclaration:/ > > MethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '(' >-/.$putCase consumeMethodHeaderNameWithTypeParameters(false); $break ./ >+/.$putCase consumeMethodHeaderNameWithTypeParameters(false, false); $break ./ >+MethodHeaderName ::= Modifiersopt TypeParameters OneOrMoreAnnotations Type 'Identifier' '(' >+/.$putCase consumeMethodHeaderNameWithTypeParameters(false, true); $break ./ >+/:$compliance 1.7:/ > MethodHeaderName ::= Modifiersopt Type 'Identifier' '(' > /.$putCase consumeMethodHeaderName(false); $break ./ > /:$readableName MethodHeaderName:/ >@@ -628,7 +660,7 @@ > /:$readableName ):/ > /:$recovery_template ):/ > >-MethodHeaderExtendedDims ::= Dimsopt >+MethodHeaderExtendedDims ::= DimsoptAnnotsopt > /.$putCase consumeMethodHeaderExtendedDims(); $break ./ > /:$readableName MethodHeaderExtendedDims:/ > >@@ -636,7 +668,10 @@ > /.$putCase consumeMethodHeaderThrowsClause(); $break ./ > /:$readableName MethodHeaderThrowsClause:/ > >-ConstructorHeader ::= ConstructorHeaderName FormalParameterListopt MethodHeaderRightParen MethodHeaderThrowsClauseopt >+ConstructorHeader ::= ConstructorHeaderName FormalParameterListopt MethodHeaderRightParen PushZeroTypeAnnotations MethodHeaderThrowsClauseopt >+/.$putCase consumeConstructorHeader(); $break ./ >+ConstructorHeader ::= ConstructorHeaderName FormalParameterListopt MethodHeaderRightParen OneOrMoreAnnotations MethodHeaderThrowsClauseopt >+/:$compliance 1.7:/ > /.$putCase consumeConstructorHeader(); $break ./ > /:$readableName ConstructorDeclaration:/ > >@@ -651,10 +686,33 @@ > /.$putCase consumeFormalParameterList(); $break ./ > /:$readableName FormalParameterList:/ > >+PotentialNameArray -> $empty >+/.$putCase consumePotentialNameArrayType(); $break ./ >+/:$readableName PotentialNameArray:/ >+ > --1.1 feature >-FormalParameter ::= Modifiersopt Type VariableDeclaratorId >+--FormalParameter ::= Modifiersopt Type VariableDeclaratorId >+--FormalParameter ::= Modifiersopt Type '...' VariableDeclaratorId >+--The above rules have been rewritten by inlinng the type subgrammar >+--to avoid the conflicts resulting from jsr308 changes. >+FormalParameter ::= Modifiersopt PrimitiveType DimsoptAnnotsopt VariableDeclaratorId > /.$putCase consumeFormalParameter(false); $break ./ >-FormalParameter ::= Modifiersopt Type '...' VariableDeclaratorId >+FormalParameter ::= Modifiersopt PrimitiveType DimsoptAnnotsopt '...' VariableDeclaratorId >+/.$putCase consumeFormalParameter(true); $break ./ >+/:$compliance 1.5:/ >+FormalParameter ::= Modifiersopt Name DimsoptAnnotsopt PotentialNameArray VariableDeclaratorId >+/.$putCase consumeFormalParameter(false); $break ./ >+FormalParameter ::= Modifiersopt Name DimsoptAnnotsopt PotentialNameArray '...' VariableDeclaratorId >+/.$putCase consumeFormalParameter(true); $break ./ >+/:$compliance 1.5:/ >+FormalParameter ::= Modifiersopt GenericType DimsoptAnnotsopt VariableDeclaratorId >+/.$putCase consumeFormalParameter(false); $break ./ >+FormalParameter ::= Modifiersopt GenericType DimsoptAnnotsopt '...' VariableDeclaratorId >+/.$putCase consumeFormalParameter(true); $break ./ >+/:$compliance 1.5:/ >+FormalParameter ::= Modifiersopt GenericTypeDotName DimsoptAnnotsopt VariableDeclaratorId >+/.$putCase consumeFormalParameter(false); $break ./ >+FormalParameter ::= Modifiersopt GenericTypeDotName DimsoptAnnotsopt '...' VariableDeclaratorId > /.$putCase consumeFormalParameter(true); $break ./ > /:$readableName FormalParameter:/ > /:$compliance 1.5:/ >@@ -1217,38 +1275,93 @@ > /.$putCase consumeArgumentList(); $break ./ > /:$readableName ArgumentList:/ > >+-- ArrayCreationHeader is used only in recovery and the consume* method is a NOP. > ArrayCreationHeader ::= 'new' PrimitiveType DimWithOrWithOutExprs > /.$putCase consumeArrayCreationHeader(); $break ./ >+ArrayCreationHeader ::= 'new' OneOrMoreAnnotations PrimitiveType DimWithOrWithOutExprs >+/:$compliance 1.7:/ >+/.$putCase consumeArrayCreationHeader(); $break ./ > > ArrayCreationHeader ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs > /.$putCase consumeArrayCreationHeader(); $break ./ >+ArrayCreationHeader ::= 'new' OneOrMoreAnnotations ClassOrInterfaceType DimWithOrWithOutExprs >+/:$compliance 1.7:/ >+/.$putCase consumeArrayCreationHeader(); $break ./ > /:$readableName ArrayCreationHeader:/ > > ArrayCreationWithoutArrayInitializer ::= 'new' PrimitiveType DimWithOrWithOutExprs >-/.$putCase consumeArrayCreationExpressionWithoutInitializer(); $break ./ >+/.$putCase consumeArrayCreationExpressionWithoutInitializer(false); $break ./ >+ArrayCreationWithoutArrayInitializer ::= 'new' OneOrMoreAnnotations PrimitiveType DimWithOrWithOutExprs >+/:$compliance 1.7:/ >+/.$putCase consumeArrayCreationExpressionWithoutInitializer(true); $break ./ > /:$readableName ArrayCreationWithoutArrayInitializer:/ > > ArrayCreationWithArrayInitializer ::= 'new' PrimitiveType DimWithOrWithOutExprs ArrayInitializer >-/.$putCase consumeArrayCreationExpressionWithInitializer(); $break ./ >+/.$putCase consumeArrayCreationExpressionWithInitializer(false); $break ./ >+ArrayCreationWithArrayInitializer ::= 'new' OneOrMoreAnnotations PrimitiveType DimWithOrWithOutExprs ArrayInitializer >+/:$compliance 1.7:/ >+/.$putCase consumeArrayCreationExpressionWithInitializer(true); $break ./ > /:$readableName ArrayCreationWithArrayInitializer:/ > > ArrayCreationWithoutArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs >-/.$putCase consumeArrayCreationExpressionWithoutInitializer(); $break ./ >+/.$putCase consumeArrayCreationExpressionWithoutInitializer(false); $break ./ >+ArrayCreationWithoutArrayInitializer ::= 'new' OneOrMoreAnnotations ClassOrInterfaceType DimWithOrWithOutExprs >+/:$compliance 1.7:/ >+/.$putCase consumeArrayCreationExpressionWithoutInitializer(true); $break ./ > > ArrayCreationWithArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs ArrayInitializer >-/.$putCase consumeArrayCreationExpressionWithInitializer(); $break ./ >+/.$putCase consumeArrayCreationExpressionWithInitializer(false); $break ./ >+ArrayCreationWithArrayInitializer ::= 'new' OneOrMoreAnnotations ClassOrInterfaceType DimWithOrWithOutExprs ArrayInitializer >+/:$compliance 1.7:/ >+/.$putCase consumeArrayCreationExpressionWithInitializer(true); $break ./ > > DimWithOrWithOutExprs ::= DimWithOrWithOutExpr > DimWithOrWithOutExprs ::= DimWithOrWithOutExprs DimWithOrWithOutExpr > /.$putCase consumeDimWithOrWithOutExprs(); $break ./ > /:$readableName Dimensions:/ > >-DimWithOrWithOutExpr ::= '[' Expression ']' >-DimWithOrWithOutExpr ::= '[' ']' >-/. $putCase consumeDimWithOrWithOutExpr(); $break ./ >+DimWithOrWithOutExpr ::= '[' PushZeroTypeAnnotations Expression ']' >+DimWithOrWithOutExpr ::= OneOrMoreAnnotations '[' Expression ']' >+/:$compliance 1.7:/ >+DimWithOrWithOutExpr ::= '[' PushZeroTypeAnnotations ']' >+/. $putCase consumeDimWithOutExpr(); $break ./ >+DimWithOrWithOutExpr ::= OneOrMoreAnnotations '[' ']' >+/. $putCase consumeDimWithOutExpr(); $break ./ >+/:$compliance 1.7:/ > /:$readableName Dimension:/ > -- ----------------------------------------------- > >+-- jsr 308 >+ >+DimsoptAnnotsopt -> $empty >+/. $putCase consumeEmptyDimsoptAnnotsopt(); $break ./ >+/:$readableName AnnotationsDimensionsSequence:/ >+DimsoptAnnotsopt -> DimsAnnotLoop >+/. $putCase consumeDimsWithTrailingAnnotsopt(); $break ./ >+/:$readableName Dimensionsoptannotsopt:/ >+DimsAnnotLoop ::= OneDimOrAnnot >+DimsAnnotLoop ::= DimsAnnotLoop OneDimOrAnnot >+/:$readableName DimsAnnotLoop:/ >+ >+OneDimOrAnnot ::= Annotation >+/. $putCase consumeTypeAnnotation(true); $break ./ >+-- Complain if source level < 1.7 >+/:$compliance 1.7:/ >+OneDimOrAnnot -> '[' ']' >+/. $putCase consumeOneDimLoop(true); $break ./ >+-- Bump up dimensions && mark zero annotations. >+/:$readableName OneDimensionOrAnnotation:/ >+ >+OneOrMoreAnnotations ::= Annotation >+/. $putCase consumeTypeAnnotation(false); $break ./ >+-- Complain if source level < 1.7 >+/:$compliance 1.7:/ >+OneOrMoreAnnotations ::= OneOrMoreAnnotations Annotation >+/. $putCase consumeOneMoreTypeAnnotation(); $break ./ >+-- Complain if source level < 1.7 && adjust the expression length stack. >+/:$compliance 1.7:/ >+/:$readableName OneOrMoreAnnotations:/ >+ > Dims ::= DimsLoop > /. $putCase consumeDims(); $break ./ > /:$readableName Dimensions:/ >@@ -1256,8 +1369,14 @@ > DimsLoop ::= DimsLoop OneDimLoop > /:$readableName Dimensions:/ > OneDimLoop ::= '[' ']' >-/. $putCase consumeOneDimLoop(); $break ./ >+/. $putCase consumeOneDimLoop(false); $break ./ >+-- Bump up dimensions && mark zero annotations. > /:$readableName Dimension:/ >+OneDimLoop ::= OneOrMoreAnnotations '[' ']' >+/:$compliance 1.7:/ >+/. $putCase consumeOneDimLoopWithAnnotations(); $break ./ >+-- Bump up dimensions >+/:$readableName DimensionWithAnnotations:/ > > FieldAccess ::= Primary '.' 'Identifier' > /.$putCase consumeFieldAccess(false); $break ./ >@@ -1339,15 +1458,30 @@ > /:$readableName Expression:/ > > CastExpression ::= PushLPAREN PrimitiveType Dimsopt PushRPAREN InsideCastExpression UnaryExpression >-/.$putCase consumeCastExpressionWithPrimitiveType(); $break ./ >+/.$putCase consumeCastExpressionWithPrimitiveType(false); $break ./ >+CastExpression ::= PushLPAREN OneOrMoreAnnotations PrimitiveType Dimsopt PushRPAREN InsideCastExpression UnaryExpression >+/:$compliance 1.7:/ >+/.$putCase consumeCastExpressionWithPrimitiveType(true); $break ./ > CastExpression ::= PushLPAREN Name OnlyTypeArgumentsForCastExpression Dimsopt PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus >-/.$putCase consumeCastExpressionWithGenericsArray(); $break ./ >+/.$putCase consumeCastExpressionWithGenericsArray(false); $break ./ >+CastExpression ::= PushLPAREN OneOrMoreAnnotations Name OnlyTypeArgumentsForCastExpression Dimsopt PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus >+/:$compliance 1.7:/ >+/.$putCase consumeCastExpressionWithGenericsArray(true); $break ./ > CastExpression ::= PushLPAREN Name OnlyTypeArgumentsForCastExpression '.' ClassOrInterfaceType Dimsopt PushRPAREN InsideCastExpressionWithQualifiedGenerics UnaryExpressionNotPlusMinus >-/.$putCase consumeCastExpressionWithQualifiedGenericsArray(); $break ./ >+/.$putCase consumeCastExpressionWithQualifiedGenericsArray(false); $break ./ >+CastExpression ::= PushLPAREN OneOrMoreAnnotations Name OnlyTypeArgumentsForCastExpression '.' ClassOrInterfaceType Dimsopt PushRPAREN InsideCastExpressionWithQualifiedGenerics UnaryExpressionNotPlusMinus >+/:$compliance 1.7:/ >+/.$putCase consumeCastExpressionWithQualifiedGenericsArray(true); $break ./ > CastExpression ::= PushLPAREN Name PushRPAREN InsideCastExpressionLL1 UnaryExpressionNotPlusMinus >-/.$putCase consumeCastExpressionLL1(); $break ./ >+/.$putCase consumeCastExpressionLL1(false); $break ./ >+CastExpression ::= PushLPAREN OneOrMoreAnnotations Name PushRPAREN InsideCastExpressionLL1 UnaryExpressionNotPlusMinus >+/:$compliance 1.7:/ >+/.$putCase consumeCastExpressionLL1(true); $break ./ > CastExpression ::= PushLPAREN Name Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus >-/.$putCase consumeCastExpressionWithNameArray(); $break ./ >+/.$putCase consumeCastExpressionWithNameArray(false); $break ./ >+CastExpression ::= PushLPAREN OneOrMoreAnnotations Name Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus >+/:$compliance 1.7:/ >+/.$putCase consumeCastExpressionWithNameArray(true); $break ./ > /:$readableName CastExpression:/ > > OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments >@@ -1401,7 +1535,10 @@ > /:$readableName Expression:/ > > InstanceofExpression -> RelationalExpression >-InstanceofExpression ::= InstanceofExpression 'instanceof' ReferenceType >+InstanceofExpression ::= InstanceofExpression 'instanceof' PushZeroTypeAnnotations ReferenceType >+/.$putCase consumeInstanceOfExpression(); $break ./ >+InstanceofExpression ::= InstanceofExpression 'instanceof' OneOrMoreAnnotations ReferenceType >+/:$compliance 1.7:/ > /.$putCase consumeInstanceOfExpression(); $break ./ > /:$readableName Expression:/ > >@@ -1526,6 +1663,12 @@ > /.$putCase consumeClassBodyDeclarationsopt(); $break ./ > /:$readableName ClassBodyDeclarations:/ > >+NonAnnotModifiersopt ::= $empty >+/. $putCase consumeDefaultModifiers(); $break ./ >+NonAnnotModifiersopt ::= NonAnnotModifiers >+/.$putCase consumeModifiers(); $break ./ >+/:$readableName Modifiers:/ >+ > Modifiersopt ::= $empty > /. $putCase consumeDefaultModifiers(); $break ./ > Modifiersopt ::= Modifiers >@@ -1728,8 +1871,11 @@ > /:$compliance 1.5:/ > > TypeArgument ::= ReferenceType >-/.$putCase consumeTypeArgument(); $break ./ >+/.$putCase consumeTypeArgument(false); $break ./ > /:$compliance 1.5:/ >+TypeArgument ::= OneOrMoreAnnotations ReferenceType >+/:$compliance 1.7:/ >+/.$putCase consumeTypeArgument(true); $break ./ > TypeArgument -> Wildcard > /:$readableName TypeArgument:/ > /:$compliance 1.5:/ >@@ -1741,12 +1887,18 @@ > /:$compliance 1.5:/ > > ReferenceType1 ::= ReferenceType '>' >-/.$putCase consumeReferenceType1(); $break ./ >+/.$putCase consumeReferenceType1(false); $break ./ > /:$compliance 1.5:/ >+ReferenceType1 ::= OneOrMoreAnnotations ReferenceType '>' >+/:$compliance 1.7:/ >+/.$putCase consumeReferenceType1(true); $break ./ > ReferenceType1 ::= ClassOrInterface '<' TypeArgumentList2 >-/.$putCase consumeTypeArgumentReferenceType1(); $break ./ >-/:$readableName ReferenceType1:/ >+/.$putCase consumeTypeArgumentReferenceType1(false); $break ./ > /:$compliance 1.5:/ >+ReferenceType1 ::= OneOrMoreAnnotations ClassOrInterface '<' TypeArgumentList2 >+/:$compliance 1.7:/ >+/.$putCase consumeTypeArgumentReferenceType1(true); $break ./ >+/:$readableName ReferenceType1:/ > > TypeArgumentList2 -> TypeArgument2 > /:$compliance 1.5:/ >@@ -1762,12 +1914,18 @@ > /:$compliance 1.5:/ > > ReferenceType2 ::= ReferenceType '>>' >-/.$putCase consumeReferenceType2(); $break ./ >+/.$putCase consumeReferenceType2(false); $break ./ > /:$compliance 1.5:/ >+ReferenceType2 ::= OneOrMoreAnnotations ReferenceType '>>' >+/:$compliance 1.7:/ >+/.$putCase consumeReferenceType2(true); $break ./ > ReferenceType2 ::= ClassOrInterface '<' TypeArgumentList3 >-/.$putCase consumeTypeArgumentReferenceType2(); $break ./ >-/:$readableName ReferenceType2:/ >+/.$putCase consumeTypeArgumentReferenceType2(false); $break ./ > /:$compliance 1.5:/ >+ReferenceType2 ::= OneOrMoreAnnotations ClassOrInterface '<' TypeArgumentList3 >+/:$compliance 1.7:/ >+/.$putCase consumeTypeArgumentReferenceType2(true); $break ./ >+/:$readableName ReferenceType2:/ > > TypeArgumentList3 -> TypeArgument3 > TypeArgumentList3 ::= TypeArgumentList ',' TypeArgument3 >@@ -1781,9 +1939,12 @@ > /:$compliance 1.5:/ > > ReferenceType3 ::= ReferenceType '>>>' >-/.$putCase consumeReferenceType3(); $break ./ >-/:$readableName ReferenceType3:/ >+/.$putCase consumeReferenceType3(false); $break ./ > /:$compliance 1.5:/ >+ReferenceType3 ::= OneOrMoreAnnotations ReferenceType '>>>' >+/:$compliance 1.7:/ >+/.$putCase consumeReferenceType3(true); $break ./ >+/:$readableName ReferenceType3:/ > > Wildcard ::= '?' > /.$putCase consumeWildcard(); $break ./ >@@ -1794,12 +1955,18 @@ > /:$compliance 1.5:/ > > WildcardBounds ::= 'extends' ReferenceType >-/.$putCase consumeWildcardBoundsExtends(); $break ./ >+/.$putCase consumeWildcardBoundsExtends(false); $break ./ > /:$compliance 1.5:/ >+WildcardBounds ::= 'extends' OneOrMoreAnnotations ReferenceType >+/:$compliance 1.7:/ >+/.$putCase consumeWildcardBoundsExtends(true); $break ./ > WildcardBounds ::= 'super' ReferenceType >-/.$putCase consumeWildcardBoundsSuper(); $break ./ >-/:$readableName WildcardBounds:/ >+/.$putCase consumeWildcardBoundsSuper(false); $break ./ > /:$compliance 1.5:/ >+WildcardBounds ::= 'super' OneOrMoreAnnotations ReferenceType >+/:$compliance 1.7:/ >+/.$putCase consumeWildcardBoundsSuper(true); $break ./ >+/:$readableName WildcardBounds:/ > > Wildcard1 ::= '?' '>' > /.$putCase consumeWildcard1(); $break ./ >@@ -1849,10 +2016,16 @@ > /:$readableName WildcardBound3:/ > /:$compliance 1.5:/ > >-TypeParameterHeader ::= Identifier >+PushZeroTypeAnnotations ::= $empty >+/.$putCase consumeZeroTypeAnnotations(); $break ./ >+ >+TypeParameterHeader ::= PushZeroTypeAnnotations Identifier > /.$putCase consumeTypeParameterHeader(); $break ./ >-/:$readableName TypeParameter:/ > /:$compliance 1.5:/ >+TypeParameterHeader ::= OneOrMoreAnnotations Identifier >+/:$compliance 1.7:/ >+/.$putCase consumeTypeParameterHeader(); $break ./ >+/:$readableName TypeParameter:/ > > TypeParameters ::= '<' TypeParameterList1 > /.$putCase consumeTypeParameters(); $break ./ >@@ -1869,12 +2042,18 @@ > TypeParameter -> TypeParameterHeader > /:$compliance 1.5:/ > TypeParameter ::= TypeParameterHeader 'extends' ReferenceType >-/.$putCase consumeTypeParameterWithExtends(); $break ./ >+/.$putCase consumeTypeParameterWithExtends(false); $break ./ > /:$compliance 1.5:/ >+TypeParameter ::= TypeParameterHeader 'extends' OneOrMoreAnnotations ReferenceType >+/:$compliance 1.7:/ >+/.$putCase consumeTypeParameterWithExtends(true); $break ./ > TypeParameter ::= TypeParameterHeader 'extends' ReferenceType AdditionalBoundList >-/.$putCase consumeTypeParameterWithExtendsAndBounds(); $break ./ >-/:$readableName TypeParameter:/ >+/.$putCase consumeTypeParameterWithExtendsAndBounds(false); $break ./ > /:$compliance 1.5:/ >+TypeParameter ::= TypeParameterHeader 'extends' OneOrMoreAnnotations ReferenceType AdditionalBoundList >+/:$compliance 1.7:/ >+/.$putCase consumeTypeParameterWithExtendsAndBounds(true); $break ./ >+/:$readableName TypeParameter:/ > > AdditionalBoundList -> AdditionalBound > /:$compliance 1.5:/ >@@ -1883,9 +2062,12 @@ > /:$readableName AdditionalBoundList:/ > > AdditionalBound ::= '&' ReferenceType >-/.$putCase consumeAdditionalBound(); $break ./ >-/:$readableName AdditionalBound:/ >+/.$putCase consumeAdditionalBound(false); $break ./ > /:$compliance 1.5:/ >+AdditionalBound ::= '&' OneOrMoreAnnotations ReferenceType >+/:$compliance 1.7:/ >+/.$putCase consumeAdditionalBound(true); $break ./ >+/:$readableName AdditionalBound:/ > > TypeParameterList1 -> TypeParameter1 > /:$compliance 1.5:/ >@@ -1901,9 +2083,12 @@ > /.$putCase consumeTypeParameter1WithExtends(); $break ./ > /:$compliance 1.5:/ > TypeParameter1 ::= TypeParameterHeader 'extends' ReferenceType AdditionalBoundList1 >-/.$putCase consumeTypeParameter1WithExtendsAndBounds(); $break ./ >-/:$readableName TypeParameter1:/ >+/.$putCase consumeTypeParameter1WithExtendsAndBounds(false); $break ./ > /:$compliance 1.5:/ >+TypeParameter1 ::= TypeParameterHeader 'extends' OneOrMoreAnnotations ReferenceType AdditionalBoundList1 >+/:$compliance 1.7:/ >+/.$putCase consumeTypeParameter1WithExtendsAndBounds(true); $break ./ >+/:$readableName TypeParameter1:/ > > AdditionalBoundList1 -> AdditionalBound1 > /:$compliance 1.5:/ >@@ -2003,9 +2188,15 @@ > /:$readableName Expression:/ > > InstanceofExpression_NotName -> RelationalExpression_NotName >-InstanceofExpression_NotName ::= Name 'instanceof' ReferenceType >+InstanceofExpression_NotName ::= Name 'instanceof' PushZeroTypeAnnotations ReferenceType > /.$putCase consumeInstanceOfExpressionWithName(); $break ./ >-InstanceofExpression_NotName ::= InstanceofExpression_NotName 'instanceof' ReferenceType >+InstanceofExpression_NotName ::= Name 'instanceof' OneOrMoreAnnotations ReferenceType >+/:$compliance 1.7:/ >+/.$putCase consumeInstanceOfExpressionWithName(); $break ./ >+InstanceofExpression_NotName ::= InstanceofExpression_NotName 'instanceof' PushZeroTypeAnnotations ReferenceType >+/.$putCase consumeInstanceOfExpression(); $break ./ >+InstanceofExpression_NotName ::= InstanceofExpression_NotName 'instanceof' OneOrMoreAnnotations ReferenceType >+/:$compliance 1.7:/ > /.$putCase consumeInstanceOfExpression(); $break ./ > /:$readableName Expression:/ > >@@ -2118,7 +2309,7 @@ > /:$compliance 1.5:/ > > AnnotationMethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '(' >-/.$putCase consumeMethodHeaderNameWithTypeParameters(true); $break ./ >+/.$putCase consumeMethodHeaderNameWithTypeParameters(true, false); $break ./ > AnnotationMethodHeaderName ::= Modifiersopt Type 'Identifier' '(' > /.$putCase consumeMethodHeaderName(true); $break ./ > /:$readableName MethodHeaderName:/ >@@ -2260,8 +2451,11 @@ > -- 1.5 features : recovery rules -- > ----------------------------------- > RecoveryMethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '(' >-/.$putCase consumeRecoveryMethodHeaderNameWithTypeParameters(); $break ./ >+/.$putCase consumeRecoveryMethodHeaderNameWithTypeParameters(false); $break ./ > /:$compliance 1.5:/ >+RecoveryMethodHeaderName ::= Modifiersopt TypeParameters OneOrMoreAnnotations Type 'Identifier' '(' >+/.$putCase consumeRecoveryMethodHeaderNameWithTypeParameters(true); $break ./ >+/:$compliance 1.7:/ > RecoveryMethodHeaderName ::= Modifiersopt Type 'Identifier' '(' > /.$putCase consumeRecoveryMethodHeaderName(); $break ./ > /:$readableName MethodHeaderName:/ >@@ -2331,3 +2525,4 @@ > > $end > -- need a carriage return after the $end >+ >Index: model/org/eclipse/jdt/internal/compiler/DocumentElementParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/DocumentElementParser.java,v >retrieving revision 1.31 >diff -u -r1.31 DocumentElementParser.java >--- model/org/eclipse/jdt/internal/compiler/DocumentElementParser.java 23 Apr 2009 14:53:48 -0000 1.31 >+++ model/org/eclipse/jdt/internal/compiler/DocumentElementParser.java 24 Sep 2009 17:16:53 -0000 >@@ -433,11 +433,11 @@ > declaration.declarationSourceStart = this.intStack[this.intPtr--]; > declaration.modifiersSourceStart = this.intStack[this.intPtr--]; > declaration.modifiers = this.intStack[this.intPtr--]; >- type = getTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension >+ type = getUnannotatedTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension > pushOnAstStack(type); > } else { > // field declaration >- type = getTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension >+ type = getUnannotatedTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension > pushOnAstStack(type); > declaration.declarationSourceStart = this.intStack[this.intPtr--]; > declaration.modifiersSourceStart = this.intStack[this.intPtr--]; >@@ -560,7 +560,7 @@ > } > int firstDimensions = this.intStack[this.intPtr--]; > final int typeDimensions = firstDimensions + extendedDimensions; >- TypeReference type = getTypeReference(typeDimensions); >+ TypeReference type = getUnannotatedTypeReference(typeDimensions); > if (isVarArgs) { > type = copyDims(type, typeDimensions + 1); > if (extendedDimensions == 0) { >@@ -830,6 +830,17 @@ > // MethodHeaderExtendedDims ::= Dimsopt > // now we update the returnType of the method > MethodDeclaration md = (MethodDeclaration) this.astStack[this.astPtr]; >+ // jsr308 -- consume receiver annotations >+ md.receiverAnnotations = null; >+ int length; >+ if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) { >+ System.arraycopy( >+ this.typeAnnotationStack, >+ (this.typeAnnotationPtr -= length) + 1, >+ md.receiverAnnotations = new Annotation[length], >+ 0, >+ length); >+ } > int extendedDims = this.intStack[this.intPtr--]; > this.extendsDim = extendedDims; > if (extendedDims != 0) { >@@ -855,7 +866,7 @@ > this.selectorSourcePositions = this.identifierPositionStack[this.identifierPtr--]; > this.identifierLengthPtr--; > //type >- md.returnType = getTypeReference(this.typeDims = this.intStack[this.intPtr--]); >+ md.returnType = getUnannotatedTypeReference(this.typeDims = this.intStack[this.intPtr--]); > //modifiers > md.declarationSourceStart = this.intStack[this.intPtr--]; > md.modifiersSourceStart = this.intStack[this.intPtr--]; >@@ -1357,7 +1368,7 @@ > * This variable is a type reference and dim will be its dimensions. > * We don't have any side effect on the stacks' pointers. > */ >- >+ Annotation [][] annotationsOnDimensions = dim == 0 ? null : getAnnotationsOnDimensions(dim); > int length; > TypeReference ref; > if ((length = this.identifierLengthStack[localIdentifierLengthPtr]) == 1) { >@@ -1372,12 +1383,13 @@ > new ArrayTypeReference( > this.identifierStack[localIdentifierPtr], > dim, >+ annotationsOnDimensions, > this.identifierPositionStack[localIdentifierPtr--]); > ref.sourceEnd = this.endPosition; > } > } else { > if (length < 0) { //flag for precompiled type reference on base types >- ref = TypeReference.baseTypeReference(-length, dim); >+ ref = TypeReference.baseTypeReference(-length, dim, annotationsOnDimensions); > ref.sourceStart = this.intStack[this.localIntPtr--]; > if (dim == 0) { > ref.sourceEnd = this.intStack[this.localIntPtr--]; >@@ -1399,7 +1411,7 @@ > if (dim == 0) > ref = new QualifiedTypeReference(tokens, positions); > else >- ref = new ArrayQualifiedTypeReference(tokens, dim, positions); >+ ref = new ArrayQualifiedTypeReference(tokens, dim, annotationsOnDimensions, positions); > } > } > return ref; >Index: model/org/eclipse/jdt/internal/compiler/SourceElementParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementParser.java,v >retrieving revision 1.90 >diff -u -r1.90 SourceElementParser.java >--- model/org/eclipse/jdt/internal/compiler/SourceElementParser.java 28 Apr 2009 16:53:03 -0000 1.90 >+++ model/org/eclipse/jdt/internal/compiler/SourceElementParser.java 24 Sep 2009 17:16:53 -0000 >@@ -412,11 +412,11 @@ > } > } > >-protected void consumeMethodHeaderNameWithTypeParameters(boolean isAnnotationMethod) { >+protected void consumeMethodHeaderNameWithTypeParameters(boolean isAnnotationMethod, boolean hasTypeAnnotations) { > long selectorSourcePositions = this.identifierPositionStack[this.identifierPtr]; > int selectorSourceEnd = (int) selectorSourcePositions; > int currentAstPtr = this.astPtr; >- super.consumeMethodHeaderNameWithTypeParameters(isAnnotationMethod); >+ super.consumeMethodHeaderNameWithTypeParameters(isAnnotationMethod, hasTypeAnnotations); > if (this.astPtr > currentAstPtr) // if ast node was pushed on the ast stack > this.sourceEnds.put(this.astStack[this.astPtr], selectorSourceEnd); > rememberCategories(); >@@ -717,13 +717,16 @@ > return null; > } > } >-public TypeReference getTypeReference(int dim) { >+public TypeReference getUnannotatedTypeReference(int dim) { > /* build a Reference on a variable that may be qualified or not > * This variable is a type reference and dim will be its dimensions > */ >+ Annotation [][] annotationsOnDimensions = null; >+ TypeReference ref; > int length = this.identifierLengthStack[this.identifierLengthPtr--]; > if (length < 0) { //flag for precompiled type reference on base types >- TypeReference ref = TypeReference.baseTypeReference(-length, dim); >+ annotationsOnDimensions = getAnnotationsOnDimensions(dim); >+ ref = TypeReference.baseTypeReference(-length, dim, annotationsOnDimensions); > ref.sourceStart = this.intStack[this.intPtr--]; > if (dim == 0) { > ref.sourceEnd = this.intStack[this.intPtr--]; >@@ -734,12 +737,11 @@ > if (this.reportReferenceInfo){ > this.requestor.acceptTypeReference(ref.getParameterizedTypeName(), ref.sourceStart, ref.sourceEnd); > } >- return ref; > } else { > int numberOfIdentifiers = this.genericsIdentifiersLengthStack[this.genericsIdentifiersLengthPtr--]; > if (length != numberOfIdentifiers || this.genericsLengthStack[this.genericsLengthPtr] != 0) { > // generic type >- TypeReference ref = getTypeReferenceForGenericType(dim, length, numberOfIdentifiers); >+ ref = getTypeReferenceForGenericType(dim, length, numberOfIdentifiers); > if (this.reportReferenceInfo) { > if (length == 1 && numberOfIdentifiers == 1) { > ParameterizedSingleTypeReference parameterizedSingleTypeReference = (ParameterizedSingleTypeReference) ref; >@@ -749,30 +751,29 @@ > this.requestor.acceptTypeReference(parameterizedQualifiedTypeReference.tokens, parameterizedQualifiedTypeReference.sourceStart, parameterizedQualifiedTypeReference.sourceEnd); > } > } >- return ref; > } else if (length == 1) { > // single variable reference > this.genericsLengthPtr--; // pop the 0 > if (dim == 0) { >- SingleTypeReference ref = >+ ref = > new SingleTypeReference( > this.identifierStack[this.identifierPtr], > this.identifierPositionStack[this.identifierPtr--]); > if (this.reportReferenceInfo) { >- this.requestor.acceptTypeReference(ref.token, ref.sourceStart); >+ this.requestor.acceptTypeReference(((SingleTypeReference)ref).token, ref.sourceStart); > } >- return ref; > } else { >- ArrayTypeReference ref = >+ annotationsOnDimensions = getAnnotationsOnDimensions(dim); >+ ref = > new ArrayTypeReference( > this.identifierStack[this.identifierPtr], > dim, >+ annotationsOnDimensions, > this.identifierPositionStack[this.identifierPtr--]); > ref.sourceEnd = this.endPosition; > if (this.reportReferenceInfo) { >- this.requestor.acceptTypeReference(ref.token, ref.sourceStart); >+ this.requestor.acceptTypeReference(((ArrayTypeReference)ref).token, ref.sourceStart); > } >- return ref; > } > } else {//Qualified variable reference > this.genericsLengthPtr--; >@@ -787,22 +788,22 @@ > 0, > length); > if (dim == 0) { >- QualifiedTypeReference ref = new QualifiedTypeReference(tokens, positions); >+ ref = new QualifiedTypeReference(tokens, positions); > if (this.reportReferenceInfo) { >- this.requestor.acceptTypeReference(ref.tokens, ref.sourceStart, ref.sourceEnd); >+ this.requestor.acceptTypeReference(((QualifiedTypeReference)ref).tokens, ref.sourceStart, ref.sourceEnd); > } >- return ref; > } else { >- ArrayQualifiedTypeReference ref = >- new ArrayQualifiedTypeReference(tokens, dim, positions); >+ annotationsOnDimensions = getAnnotationsOnDimensions(dim); >+ ref = >+ new ArrayQualifiedTypeReference(tokens, dim, annotationsOnDimensions, positions); > ref.sourceEnd = this.endPosition; > if (this.reportReferenceInfo) { >- this.requestor.acceptTypeReference(ref.tokens, ref.sourceStart, ref.sourceEnd); >+ this.requestor.acceptTypeReference(((ArrayQualifiedTypeReference)ref).tokens, ref.sourceStart, ref.sourceEnd); > } >- return ref; > } > } > } >+ return ref; > } > public NameReference getUnspecifiedReference() { > /* build a (unspecified) NameReference which may be qualified*/ >Index: search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java,v >retrieving revision 1.85 >diff -u -r1.85 MatchLocatorParser.java >--- search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java 27 Jun 2008 16:04:00 -0000 1.85 >+++ search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java 24 Sep 2009 17:16:53 -0000 >@@ -194,8 +194,8 @@ > } > } > >-protected void consumeAdditionalBound() { >- super.consumeAdditionalBound(); >+protected void consumeAdditionalBound(boolean hasTypeAnnotations) { >+ super.consumeAdditionalBound(hasTypeAnnotations); > if ((this.patternFineGrain & IJavaSearchConstants.TYPE_VARIABLE_BOUND_TYPE_REFERENCE) != 0) { > TypeReference typeReference = (TypeReference) this.genericsStack[this.genericsPtr]; > this.patternLocator.match(typeReference, this.nodeSet); >@@ -209,8 +209,8 @@ > } > } > >-protected void consumeCastExpressionLL1() { >- super.consumeCastExpressionLL1(); >+protected void consumeCastExpressionLL1(boolean hasTypeAnnotations) { >+ super.consumeCastExpressionLL1(hasTypeAnnotations); > if ((this.patternFineGrain & IJavaSearchConstants.CAST_TYPE_REFERENCE) != 0) { > CastExpression castExpression = (CastExpression) this.expressionStack[this.expressionPtr]; > if (castExpression.type instanceof Reference) { >@@ -218,8 +218,8 @@ > } > } > } >-protected void consumeCastExpressionWithGenericsArray() { >- super.consumeCastExpressionWithGenericsArray(); >+protected void consumeCastExpressionWithGenericsArray(boolean hasTypeAnnotations) { >+ super.consumeCastExpressionWithGenericsArray(hasTypeAnnotations); > if ((this.patternFineGrain & IJavaSearchConstants.CAST_TYPE_REFERENCE) != 0) { > CastExpression castExpression = (CastExpression) this.expressionStack[this.expressionPtr]; > if (castExpression.type instanceof Reference) { >@@ -227,8 +227,8 @@ > } > } > } >-protected void consumeCastExpressionWithNameArray() { >- super.consumeCastExpressionWithNameArray(); >+protected void consumeCastExpressionWithNameArray(boolean hasTypeAnnotations) { >+ super.consumeCastExpressionWithNameArray(hasTypeAnnotations); > if ((this.patternFineGrain & IJavaSearchConstants.CAST_TYPE_REFERENCE) != 0) { > CastExpression castExpression = (CastExpression) this.expressionStack[this.expressionPtr]; > if (castExpression.type instanceof Reference) { >@@ -236,8 +236,8 @@ > } > } > } >-protected void consumeCastExpressionWithPrimitiveType() { >- super.consumeCastExpressionWithPrimitiveType(); >+protected void consumeCastExpressionWithPrimitiveType(boolean hasTypeAnnotations) { >+ super.consumeCastExpressionWithPrimitiveType(hasTypeAnnotations); > if ((this.patternFineGrain & IJavaSearchConstants.CAST_TYPE_REFERENCE) != 0) { > CastExpression castExpression = (CastExpression) this.expressionStack[this.expressionPtr]; > if (castExpression.type instanceof Reference) { >@@ -245,8 +245,8 @@ > } > } > } >-protected void consumeCastExpressionWithQualifiedGenericsArray() { >- super.consumeCastExpressionWithQualifiedGenericsArray(); >+protected void consumeCastExpressionWithQualifiedGenericsArray(boolean hasTypeAnnotations) { >+ super.consumeCastExpressionWithQualifiedGenericsArray(hasTypeAnnotations); > if ((this.patternFineGrain & IJavaSearchConstants.CAST_TYPE_REFERENCE) != 0) { > CastExpression castExpression = (CastExpression) this.expressionStack[this.expressionPtr]; > if (castExpression.type instanceof Reference) { >@@ -554,8 +554,8 @@ > } > } > >-protected void consumeTypeArgumentReferenceType1() { >- super.consumeTypeArgumentReferenceType1(); >+protected void consumeTypeArgumentReferenceType1(boolean hasTypeAnnotations) { >+ super.consumeTypeArgumentReferenceType1(hasTypeAnnotations); > if ((this.patternFineGrain & IJavaSearchConstants.TYPE_ARGUMENT_TYPE_REFERENCE) != 0) { > int length = this.genericsLengthStack[this.genericsLengthPtr]; > if (length == 1) { >@@ -578,8 +578,8 @@ > } > } > >-protected void consumeTypeArgumentReferenceType2() { >- super.consumeTypeArgumentReferenceType2(); >+protected void consumeTypeArgumentReferenceType2(boolean hasTypeAnnotations) { >+ super.consumeTypeArgumentReferenceType2(hasTypeAnnotations); > if ((this.patternFineGrain & IJavaSearchConstants.TYPE_ARGUMENT_TYPE_REFERENCE) != 0) { > int length = this.genericsLengthStack[this.genericsLengthPtr]; > if (length == 1) { >@@ -623,8 +623,8 @@ > } > } > >-protected void consumeTypeParameter1WithExtendsAndBounds() { >- super.consumeTypeParameter1WithExtendsAndBounds(); >+protected void consumeTypeParameter1WithExtendsAndBounds(boolean hasTypeAnnotations) { >+ super.consumeTypeParameter1WithExtendsAndBounds(hasTypeAnnotations); > if ((this.patternFineGrain & IJavaSearchConstants.TYPE_VARIABLE_BOUND_TYPE_REFERENCE) != 0) { > TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr]; > this.patternLocator.match(typeParameter.type, this.nodeSet); >@@ -636,16 +636,16 @@ > this.patternLocator.match((TypeParameter)this.genericsStack[this.genericsPtr], this.nodeSet); > } > >-protected void consumeTypeParameterWithExtends() { >- super.consumeTypeParameterWithExtends(); >+protected void consumeTypeParameterWithExtends(boolean hasTypeAnnotations) { >+ super.consumeTypeParameterWithExtends(hasTypeAnnotations); > if ((this.patternFineGrain & IJavaSearchConstants.TYPE_VARIABLE_BOUND_TYPE_REFERENCE) != 0) { > TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr]; > this.patternLocator.match(typeParameter.type, this.nodeSet); > } > } > >-protected void consumeTypeParameterWithExtendsAndBounds() { >- super.consumeTypeParameterWithExtendsAndBounds(); >+protected void consumeTypeParameterWithExtendsAndBounds(boolean hasTypeAnnotations) { >+ super.consumeTypeParameterWithExtendsAndBounds(hasTypeAnnotations); > if ((this.patternFineGrain & IJavaSearchConstants.TYPE_VARIABLE_BOUND_TYPE_REFERENCE) != 0) { > TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr]; > this.patternLocator.match(typeParameter.type, this.nodeSet); >@@ -705,16 +705,16 @@ > } > } > >-protected void consumeWildcardBoundsExtends() { >- super.consumeWildcardBoundsExtends(); >+protected void consumeWildcardBoundsExtends(boolean hasTypeAnnotations) { >+ super.consumeWildcardBoundsExtends(hasTypeAnnotations); > if ((this.patternFineGrain & IJavaSearchConstants.WILDCARD_BOUND_TYPE_REFERENCE) != 0) { > Wildcard wildcard = (Wildcard) this.genericsStack[this.genericsPtr]; > this.patternLocator.match(wildcard.bound, this.nodeSet); > } > } > >-protected void consumeWildcardBoundsSuper() { >- super.consumeWildcardBoundsSuper(); >+protected void consumeWildcardBoundsSuper(boolean hasTypeAnnotations) { >+ super.consumeWildcardBoundsSuper(hasTypeAnnotations); > if ((this.patternFineGrain & IJavaSearchConstants.WILDCARD_BOUND_TYPE_REFERENCE) != 0) { > Wildcard wildcard = (Wildcard) this.genericsStack[this.genericsPtr]; > this.patternLocator.match(wildcard.bound, this.nodeSet); >@@ -729,8 +729,8 @@ > this.nodeSet.addTrustedMatch(result, true); > return result; > } >-protected TypeReference getTypeReference(int dim) { >- TypeReference typeRef = super.getTypeReference(dim); >+protected TypeReference getUnannotatedTypeReference(int dim) { >+ TypeReference typeRef = super.getUnannotatedTypeReference(dim); > if (this.patternFineGrain == 0) { > this.patternLocator.match(typeRef, this.nodeSet); // NB: Don't check container since type reference can happen anywhere > } >Index: formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java,v >retrieving revision 1.218 >diff -u -r1.218 CodeFormatterVisitor.java >--- formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java 21 Aug 2009 08:28:20 -0000 1.218 >+++ formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java 24 Sep 2009 17:16:51 -0000 >@@ -166,8 +166,8 @@ > }; > private static final int[] CLOSING_GENERICS_EXPECTEDTOKENS = new int[] { > TerminalTokens.TokenNameRIGHT_SHIFT, >- TerminalTokens.TokenNameUNSIGNED_RIGHT_SHIFT, >- TerminalTokens.TokenNameGREATER >+ TerminalTokens.TokenNameGREATER, >+ TerminalTokens.TokenNameUNSIGNED_RIGHT_SHIFT > }; > private int chunkKind; > public int lastLocalDeclarationSourceStart; >Index: codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java,v >retrieving revision 1.30 >diff -u -r1.30 CompletionOnSingleTypeReference.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java 27 Jun 2008 16:03:58 -0000 1.30 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java 24 Sep 2009 17:16:35 -0000 >@@ -55,6 +55,12 @@ > public TypeReference copyDims(int dim){ > return this; > } >+/* >+ * No expansion of the completion reference into an array one >+ */ >+public TypeReference copyDims(int dim, Annotation[][] annotationsOnDimensions){ >+ return this; >+} > protected TypeBinding getTypeBinding(Scope scope) { > if (this.fieldTypeCompletionNode != null) { > throw new CompletionNodeFound(this.fieldTypeCompletionNode, scope); >Index: codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java,v >retrieving revision 1.208 >diff -u -r1.208 CompletionParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 7 May 2009 08:49:43 -0000 1.208 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 24 Sep 2009 17:16:36 -0000 >@@ -1280,7 +1280,8 @@ > if ((length = this.identifierLengthStack[this.identifierLengthPtr-1]) < 0) { > // build the primitive type node > int dim = isAfterArrayType() ? this.intStack[this.intPtr--] : 0; >- SingleTypeReference typeRef = (SingleTypeReference)TypeReference.baseTypeReference(-length, dim); >+ Annotation [][] annotationsOnDimensions = dim == 0 ? null : getAnnotationsOnDimensions(dim); >+ SingleTypeReference typeRef = (SingleTypeReference)TypeReference.baseTypeReference(-length, dim, annotationsOnDimensions); > typeRef.sourceStart = this.intStack[this.intPtr--]; > if (dim == 0) { > typeRef.sourceEnd = this.intStack[this.intPtr--]; >@@ -1951,12 +1952,12 @@ > if (checkLabelStatement()) return; > if (checkNameCompletion()) return; > } >-protected void consumeArrayCreationExpressionWithInitializer() { >- super.consumeArrayCreationExpressionWithInitializer(); >+protected void consumeArrayCreationExpressionWithInitializer(boolean hasTypeAnnotations) { >+ super.consumeArrayCreationExpressionWithInitializer(hasTypeAnnotations); > popElement(K_ARRAY_CREATION); > } >-protected void consumeArrayCreationExpressionWithoutInitializer() { >- super.consumeArrayCreationExpressionWithoutInitializer(); >+protected void consumeArrayCreationExpressionWithoutInitializer(boolean hasTypeAnnotations) { >+ super.consumeArrayCreationExpressionWithoutInitializer(hasTypeAnnotations); > popElement(K_ARRAY_CREATION); > } > protected void consumeArrayCreationHeader() { >@@ -1998,7 +1999,7 @@ > pushOnElementStack(K_SWITCH_LABEL); > } > } >-protected void consumeCastExpressionWithPrimitiveType() { >+protected void consumeCastExpressionWithPrimitiveType(boolean hasTypeAnnotations) { > popElement(K_CAST_STATEMENT); > > Expression exp, cast, castType; >@@ -2008,7 +2009,7 @@ > cast.sourceStart = castType.sourceStart - 1; > cast.sourceEnd = exp.sourceEnd; > } >-protected void consumeCastExpressionWithGenericsArray() { >+protected void consumeCastExpressionWithGenericsArray(boolean hasTypeAnnotations) { > popElement(K_CAST_STATEMENT); > > Expression exp, cast, castType; >@@ -2019,7 +2020,7 @@ > cast.sourceEnd = exp.sourceEnd; > } > >-protected void consumeCastExpressionWithQualifiedGenericsArray() { >+protected void consumeCastExpressionWithQualifiedGenericsArray(boolean hasTypeAnnotations) { > popElement(K_CAST_STATEMENT); > > Expression exp, cast, castType; >@@ -2029,7 +2030,7 @@ > cast.sourceStart = castType.sourceStart - 1; > cast.sourceEnd = exp.sourceEnd; > } >-protected void consumeCastExpressionWithNameArray() { >+protected void consumeCastExpressionWithNameArray(boolean hasTypeAnnotations) { > // CastExpression ::= PushLPAREN Name Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus > popElement(K_CAST_STATEMENT); > >@@ -2041,9 +2042,9 @@ > cast.sourceStart = castType.sourceStart - 1; > cast.sourceEnd = exp.sourceEnd; > } >-protected void consumeCastExpressionLL1() { >+protected void consumeCastExpressionLL1(boolean hasTypeAnnotations) { > popElement(K_CAST_STATEMENT); >- super.consumeCastExpressionLL1(); >+ super.consumeCastExpressionLL1(hasTypeAnnotations); > } > protected void consumeClassBodyDeclaration() { > popElement(K_BLOCK_DELIMITER); >@@ -2678,7 +2679,7 @@ > long selectorSource = this.identifierPositionStack[this.identifierPtr + 1]; > > //type >- TypeReference type = getTypeReference(this.intStack[this.intPtr--]); >+ TypeReference type = getUnannotatedTypeReference(this.intStack[this.intPtr--]); > ((CompletionOnSingleTypeReference)type).isCompletionNode = false; > //modifiers > int declarationSourceStart = this.intStack[this.intPtr--]; >@@ -2738,7 +2739,7 @@ > long selectorSource = this.identifierPositionStack[this.identifierPtr--]; > this.identifierLengthPtr--; > //type >- md.returnType = getTypeReference(this.intStack[this.intPtr--]); >+ md.returnType = getUnannotatedTypeReference(this.intStack[this.intPtr--]); > //modifiers > md.declarationSourceStart = this.intStack[this.intPtr--]; > md.modifiers = this.intStack[this.intPtr--]; >@@ -2782,11 +2783,11 @@ > } > } > } >-protected void consumeMethodHeaderNameWithTypeParameters( boolean isAnnotationMethod) { >+protected void consumeMethodHeaderNameWithTypeParameters( boolean isAnnotationMethod, boolean hasTypeAnnotations) { > long selectorSourcePositions = this.identifierPositionStack[this.identifierPtr]; > int selectorSourceEnd = (int) selectorSourcePositions; > int currentAstPtr = this.astPtr; >- super.consumeMethodHeaderNameWithTypeParameters(isAnnotationMethod); >+ super.consumeMethodHeaderNameWithTypeParameters(isAnnotationMethod, hasTypeAnnotations); > if (this.sourceEnds != null && this.astPtr > currentAstPtr) {// if ast node was pushed on the ast stack > this.sourceEnds.put(this.astStack[this.astPtr], selectorSourceEnd); > } >@@ -2866,8 +2867,8 @@ > this.hasUnusedModifiers = true; > } > } >-protected void consumeAdditionalBound() { >- super.consumeAdditionalBound(); >+protected void consumeAdditionalBound(boolean hasTypeAnnotations) { >+ super.consumeAdditionalBound(hasTypeAnnotations); > ASTNode node = this.genericsStack[this.genericsPtr]; > if (node instanceof CompletionOnSingleTypeReference) { > ((CompletionOnSingleTypeReference) node).setKind(CompletionOnQualifiedTypeReference.K_INTERFACE); >@@ -3707,24 +3708,24 @@ > protected void consumeRightParen() { > super.consumeRightParen(); > } >-protected void consumeReferenceType1() { >- super.consumeReferenceType1(); >+protected void consumeReferenceType1(boolean hasTypeAnnotations) { >+ super.consumeReferenceType1(hasTypeAnnotations); > popElement(K_BINARY_OPERATOR); > } >-protected void consumeReferenceType2() { >- super.consumeReferenceType2(); >+protected void consumeReferenceType2(boolean hasTypeAnnotations) { >+ super.consumeReferenceType2(hasTypeAnnotations); > popElement(K_BINARY_OPERATOR); > } >-protected void consumeReferenceType3() { >- super.consumeReferenceType3(); >+protected void consumeReferenceType3(boolean hasTypeAnnotations) { >+ super.consumeReferenceType3(hasTypeAnnotations); > popElement(K_BINARY_OPERATOR); > } >-protected void consumeTypeArgumentReferenceType1() { >- super.consumeTypeArgumentReferenceType1(); >+protected void consumeTypeArgumentReferenceType1(boolean hasTypeAnnotations) { >+ super.consumeTypeArgumentReferenceType1(hasTypeAnnotations); > popElement(K_BINARY_OPERATOR); > } >-protected void consumeTypeArgumentReferenceType2() { >- super.consumeTypeArgumentReferenceType2(); >+protected void consumeTypeArgumentReferenceType2(boolean hasTypeAnnotations) { >+ super.consumeTypeArgumentReferenceType2(hasTypeAnnotations); > popElement(K_BINARY_OPERATOR); > } > protected void consumeTypeArguments() { >@@ -3779,8 +3780,8 @@ > super.consumeTypeParameter1(); > popElement(K_BINARY_OPERATOR); > } >-protected void consumeTypeParameterWithExtends() { >- super.consumeTypeParameterWithExtends(); >+protected void consumeTypeParameterWithExtends(boolean hasTypeAnnotations) { >+ super.consumeTypeParameterWithExtends(hasTypeAnnotations); > if (this.assistNode != null && this.assistNodeParent == null) { > TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr]; > if (typeParameter != null && typeParameter.type == this.assistNode) >@@ -3788,8 +3789,8 @@ > } > popElement(K_EXTENDS_KEYWORD); > } >-protected void consumeTypeParameterWithExtendsAndBounds() { >- super.consumeTypeParameterWithExtendsAndBounds(); >+protected void consumeTypeParameterWithExtendsAndBounds(boolean hasTypeAnnotations) { >+ super.consumeTypeParameterWithExtendsAndBounds(hasTypeAnnotations); > if (this.assistNode != null && this.assistNodeParent == null) { > TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr]; > if (typeParameter != null && typeParameter.type == this.assistNode) >@@ -3806,8 +3807,8 @@ > } > popElement(K_EXTENDS_KEYWORD); > } >-protected void consumeTypeParameter1WithExtendsAndBounds() { >- super.consumeTypeParameter1WithExtendsAndBounds(); >+protected void consumeTypeParameter1WithExtendsAndBounds(boolean hasTypeAnnotations) { >+ super.consumeTypeParameter1WithExtendsAndBounds(hasTypeAnnotations); > if (this.assistNode != null && this.assistNodeParent == null) { > TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr]; > if (typeParameter != null && typeParameter.type == this.assistNode) >@@ -3855,8 +3856,8 @@ > super.consumeWildcard3(); > popElement(K_BINARY_OPERATOR); > } >-protected void consumeWildcardBoundsExtends() { >- super.consumeWildcardBoundsExtends(); >+protected void consumeWildcardBoundsExtends(boolean hasTypeAnnotations) { >+ super.consumeWildcardBoundsExtends(hasTypeAnnotations); > if (this.assistNode != null && this.assistNodeParent == null) { > Wildcard wildcard = (Wildcard) this.genericsStack[this.genericsPtr]; > if (wildcard != null && wildcard.bound == this.assistNode) >Index: codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java,v >retrieving revision 1.29 >diff -u -r1.29 CompletionOnQualifiedTypeReference.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java 16 Jan 2009 14:29:29 -0000 1.29 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java 24 Sep 2009 17:16:35 -0000 >@@ -55,6 +55,9 @@ > public TypeReference copyDims(int dim){ > return this; > } >+public TypeReference copyDims(int dim, Annotation[][] annotationsOnDimensions){ >+ return this; >+} > protected TypeBinding getTypeBinding(Scope scope) { > // it can be a package, type or member type > Binding binding = scope.parent.getTypeOrPackage(this.tokens); // step up from the ClassScope >Index: compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java,v >retrieving revision 1.406 >diff -u -r1.406 Parser.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java 26 Aug 2009 22:56:29 -0000 1.406 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java 24 Sep 2009 17:16:45 -0000 >@@ -11,7 +11,12 @@ > *******************************************************************************/ > package org.eclipse.jdt.internal.compiler.parser; > >-import java.io.*; >+import java.io.BufferedInputStream; >+import java.io.BufferedWriter; >+import java.io.File; >+import java.io.FileWriter; >+import java.io.IOException; >+import java.io.InputStream; > import java.util.ArrayList; > import java.util.Collections; > import java.util.Iterator; >@@ -24,14 +29,102 @@ > import org.eclipse.jdt.core.compiler.InvalidInputException; > import org.eclipse.jdt.internal.compiler.ASTVisitor; > import org.eclipse.jdt.internal.compiler.CompilationResult; >-import org.eclipse.jdt.internal.compiler.ast.*; >+import org.eclipse.jdt.internal.compiler.ast.AND_AND_Expression; >+import org.eclipse.jdt.internal.compiler.ast.ASTNode; >+import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration; >+import org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration; >+import org.eclipse.jdt.internal.compiler.ast.AllocationExpression; >+import org.eclipse.jdt.internal.compiler.ast.Annotation; >+import org.eclipse.jdt.internal.compiler.ast.AnnotationMethodDeclaration; >+import org.eclipse.jdt.internal.compiler.ast.Argument; >+import org.eclipse.jdt.internal.compiler.ast.ArrayAllocationExpression; >+import org.eclipse.jdt.internal.compiler.ast.ArrayInitializer; >+import org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference; >+import org.eclipse.jdt.internal.compiler.ast.ArrayReference; >+import org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference; >+import org.eclipse.jdt.internal.compiler.ast.AssertStatement; >+import org.eclipse.jdt.internal.compiler.ast.Assignment; >+import org.eclipse.jdt.internal.compiler.ast.BinaryExpression; >+import org.eclipse.jdt.internal.compiler.ast.Block; >+import org.eclipse.jdt.internal.compiler.ast.BreakStatement; >+import org.eclipse.jdt.internal.compiler.ast.CaseStatement; >+import org.eclipse.jdt.internal.compiler.ast.CastExpression; >+import org.eclipse.jdt.internal.compiler.ast.CharLiteral; >+import org.eclipse.jdt.internal.compiler.ast.ClassLiteralAccess; >+import org.eclipse.jdt.internal.compiler.ast.CombinedBinaryExpression; >+import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; >+import org.eclipse.jdt.internal.compiler.ast.CompoundAssignment; >+import org.eclipse.jdt.internal.compiler.ast.ConditionalExpression; >+import org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration; >+import org.eclipse.jdt.internal.compiler.ast.ContinueStatement; >+import org.eclipse.jdt.internal.compiler.ast.DoStatement; >+import org.eclipse.jdt.internal.compiler.ast.DoubleLiteral; >+import org.eclipse.jdt.internal.compiler.ast.EmptyStatement; >+import org.eclipse.jdt.internal.compiler.ast.EqualExpression; >+import org.eclipse.jdt.internal.compiler.ast.ExplicitConstructorCall; >+import org.eclipse.jdt.internal.compiler.ast.Expression; >+import org.eclipse.jdt.internal.compiler.ast.FalseLiteral; >+import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration; >+import org.eclipse.jdt.internal.compiler.ast.FieldReference; >+import org.eclipse.jdt.internal.compiler.ast.FloatLiteral; >+import org.eclipse.jdt.internal.compiler.ast.ForStatement; >+import org.eclipse.jdt.internal.compiler.ast.ForeachStatement; >+import org.eclipse.jdt.internal.compiler.ast.IfStatement; >+import org.eclipse.jdt.internal.compiler.ast.ImportReference; >+import org.eclipse.jdt.internal.compiler.ast.Initializer; >+import org.eclipse.jdt.internal.compiler.ast.InstanceOfExpression; >+import org.eclipse.jdt.internal.compiler.ast.IntLiteral; >+import org.eclipse.jdt.internal.compiler.ast.IntLiteralMinValue; >+import org.eclipse.jdt.internal.compiler.ast.Javadoc; >+import org.eclipse.jdt.internal.compiler.ast.LabeledStatement; >+import org.eclipse.jdt.internal.compiler.ast.LocalDeclaration; >+import org.eclipse.jdt.internal.compiler.ast.LongLiteral; >+import org.eclipse.jdt.internal.compiler.ast.LongLiteralMinValue; >+import org.eclipse.jdt.internal.compiler.ast.MarkerAnnotation; >+import org.eclipse.jdt.internal.compiler.ast.MemberValuePair; >+import org.eclipse.jdt.internal.compiler.ast.MessageSend; >+import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; >+import org.eclipse.jdt.internal.compiler.ast.NameReference; >+import org.eclipse.jdt.internal.compiler.ast.NormalAnnotation; >+import org.eclipse.jdt.internal.compiler.ast.NullLiteral; >+import org.eclipse.jdt.internal.compiler.ast.OR_OR_Expression; >+import org.eclipse.jdt.internal.compiler.ast.OperatorIds; >+import org.eclipse.jdt.internal.compiler.ast.ParameterizedQualifiedTypeReference; >+import org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference; >+import org.eclipse.jdt.internal.compiler.ast.PostfixExpression; >+import org.eclipse.jdt.internal.compiler.ast.PrefixExpression; >+import org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression; >+import org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference; >+import org.eclipse.jdt.internal.compiler.ast.QualifiedSuperReference; >+import org.eclipse.jdt.internal.compiler.ast.QualifiedThisReference; >+import org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference; >+import org.eclipse.jdt.internal.compiler.ast.Reference; >+import org.eclipse.jdt.internal.compiler.ast.ReturnStatement; >+import org.eclipse.jdt.internal.compiler.ast.SingleMemberAnnotation; >+import org.eclipse.jdt.internal.compiler.ast.SingleNameReference; >+import org.eclipse.jdt.internal.compiler.ast.SingleTypeReference; >+import org.eclipse.jdt.internal.compiler.ast.Statement; >+import org.eclipse.jdt.internal.compiler.ast.StringLiteral; >+import org.eclipse.jdt.internal.compiler.ast.SuperReference; >+import org.eclipse.jdt.internal.compiler.ast.SwitchStatement; >+import org.eclipse.jdt.internal.compiler.ast.SynchronizedStatement; >+import org.eclipse.jdt.internal.compiler.ast.ThisReference; >+import org.eclipse.jdt.internal.compiler.ast.ThrowStatement; >+import org.eclipse.jdt.internal.compiler.ast.TrueLiteral; >+import org.eclipse.jdt.internal.compiler.ast.TryStatement; >+import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; >+import org.eclipse.jdt.internal.compiler.ast.TypeParameter; >+import org.eclipse.jdt.internal.compiler.ast.TypeReference; >+import org.eclipse.jdt.internal.compiler.ast.UnaryExpression; >+import org.eclipse.jdt.internal.compiler.ast.WhileStatement; >+import org.eclipse.jdt.internal.compiler.ast.Wildcard; > import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; > import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; > import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; > import org.eclipse.jdt.internal.compiler.impl.ReferenceContext; >+import org.eclipse.jdt.internal.compiler.lookup.Binding; > import org.eclipse.jdt.internal.compiler.lookup.BlockScope; > import org.eclipse.jdt.internal.compiler.lookup.ClassScope; >-import org.eclipse.jdt.internal.compiler.lookup.Binding; > import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers; > import org.eclipse.jdt.internal.compiler.lookup.MethodScope; > import org.eclipse.jdt.internal.compiler.lookup.TypeIds; >@@ -64,7 +157,10 @@ > private static final String ERROR_TOKEN = "$error" ; //$NON-NLS-1$ > //expression stack > protected final static int ExpressionStackIncrement = 100; >- >+ >+ // annotation stack >+ protected final static int TypeAnnotationStackIncrement = 100; >+ > protected final static int GenericsStackIncrement = 10; > > private final static String FILEPREFIX = "parser"; //$NON-NLS-1$ >@@ -786,7 +882,25 @@ > protected int[] expressionLengthStack; > protected int expressionPtr; > protected Expression[] expressionStack = new Expression[ExpressionStackIncrement]; >+ protected int unattachedAnnotationPtr; // used for figuring out whether some set of annotations are annotating a dimension or not. > public int firstToken ; // handle for multiple parsing goals >+ >+ /* jsr308 -- Type annotation management, we now maintain type annotations in a separate stack >+ as otherwise they get interspersed with other expressions and some of the code is not prepared >+ to handle such interleaving and will look ugly if changed. >+ >+ See consumeArrayCreationExpressionWithoutInitializer for example. >+ >+ See that annotations gets pushed into expression stack the moment an annotation is discovered and >+ get moved to the new type annotations stack only later when the annotation is recognized to be a >+ type annotation. Where ambiguities exist (i.e 1.7 annotation occurs in a place sanctioned for an >+ 1.5 type annotation, the annotation continues to stay in the expression stack, but in these case >+ interleaving is not an issue. >+ */ >+ protected int typeAnnotationPtr; >+ protected int typeAnnotationLengthPtr; >+ protected Annotation [] typeAnnotationStack = new Annotation[TypeAnnotationStackIncrement]; >+ protected int [] typeAnnotationLengthStack; > // generics management > protected int genericsIdentifiersLengthPtr; > protected int[] genericsIdentifiersLengthStack = new int[GenericsStackIncrement]; >@@ -877,6 +991,7 @@ > initializeScanner(); > this.astLengthStack = new int[50]; > this.expressionLengthStack = new int[30]; >+ this.typeAnnotationLengthStack = new int[30]; > this.intStack = new int[50]; > this.identifierStack = new char[30][]; > this.identifierLengthStack = new int[30]; >@@ -1271,8 +1386,8 @@ > > this.astLengthStack[this.astLengthPtr - 1] += this.astLengthStack[this.astLengthPtr--]; > } >-protected void consumeAdditionalBound() { >- pushOnGenericsStack(getTypeReference(this.intStack[this.intPtr--])); >+protected void consumeAdditionalBound(boolean hasTypeAnnotations) { >+ pushOnGenericsStack(hasTypeAnnotations ? getTypeReference(this.intStack[this.intPtr--]) : getUnannotatedTypeReference(this.intStack[this.intPtr--])); > } > protected void consumeAdditionalBound1() { > // nothing to be done. >@@ -1581,7 +1696,7 @@ > } > exp.sourceEnd = this.endStatementPosition; > } >-protected void consumeArrayCreationExpressionWithInitializer() { >+protected void consumeArrayCreationExpressionWithInitializer(boolean hasTypeAnnotations) { > // ArrayCreationWithArrayInitializer ::= 'new' PrimitiveType DimWithOrWithOutExprs ArrayInitializer > // ArrayCreationWithArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs ArrayInitializer > >@@ -1590,7 +1705,7 @@ > this.expressionLengthPtr -- ; > arrayAllocation.initializer = (ArrayInitializer) this.expressionStack[this.expressionPtr--]; > >- arrayAllocation.type = getTypeReference(0); >+ arrayAllocation.type = hasTypeAnnotations ? getTypeReference(0) : getUnannotatedTypeReference(0); > arrayAllocation.type.bits |= ASTNode.IgnoreRawTypeCheck; // no need to worry about raw type usage > length = (this.expressionLengthStack[this.expressionLengthPtr--]); > this.expressionPtr -= length ; >@@ -1608,13 +1723,13 @@ > } > pushOnExpressionStack(arrayAllocation); > } >-protected void consumeArrayCreationExpressionWithoutInitializer() { >+protected void consumeArrayCreationExpressionWithoutInitializer(boolean hasTypeAnnotations) { > // ArrayCreationWithoutArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs > // ArrayCreationWithoutArrayInitializer ::= 'new' PrimitiveType DimWithOrWithOutExprs > > int length; > ArrayAllocationExpression arrayAllocation = new ArrayAllocationExpression(); >- arrayAllocation.type = getTypeReference(0); >+ arrayAllocation.type = hasTypeAnnotations ? getTypeReference(0) : getUnannotatedTypeReference(0); > arrayAllocation.type.bits |= ASTNode.IgnoreRawTypeCheck; // no need to worry about raw type usage > length = (this.expressionLengthStack[this.expressionLengthPtr--]); > this.expressionPtr -= length ; >@@ -2016,7 +2131,7 @@ > } > pushOnAstStack(caseStatement); > } >-protected void consumeCastExpressionLL1() { >+protected void consumeCastExpressionLL1(boolean hasTypeAnnotations) { > //CastExpression ::= '(' Expression ')' InsideCastExpressionLL1 UnaryExpressionNotPlusMinus > // Expression is used in order to make the grammar LL1 > >@@ -2027,12 +2142,12 @@ > this.expressionStack[this.expressionPtr] = > cast = new CastExpression( > exp=this.expressionStack[this.expressionPtr+1] , >- getTypeReference(this.expressionStack[this.expressionPtr])); >+ getTypeReference(this.expressionStack[this.expressionPtr])); // TODO (Srikanth) > this.expressionLengthPtr -- ; > updateSourcePosition(cast); > cast.sourceEnd=exp.sourceEnd; > } >-protected void consumeCastExpressionWithGenericsArray() { >+protected void consumeCastExpressionWithGenericsArray(boolean hasTypeAnnotations) { > // CastExpression ::= PushLPAREN Name TypeArguments Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus > > Expression exp, cast, castType; >@@ -2041,13 +2156,13 @@ > int dim = this.intStack[this.intPtr--]; > pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]); > >- this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType = getTypeReference(dim)); >+ this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType = hasTypeAnnotations ? getTypeReference(dim) : getUnannotatedTypeReference(dim)); > this.intPtr--; > castType.sourceEnd = end - 1; > castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1; > cast.sourceEnd = exp.sourceEnd; > } >-protected void consumeCastExpressionWithNameArray() { >+protected void consumeCastExpressionWithNameArray(boolean hasTypeAnnotations) { > // CastExpression ::= PushLPAREN Name Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus > > Expression exp, cast, castType; >@@ -2057,12 +2172,12 @@ > pushOnGenericsLengthStack(0); > pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]); > >- this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType = getTypeReference(this.intStack[this.intPtr--])); >+ this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType = hasTypeAnnotations ? getTypeReference(this.intStack[this.intPtr--]) : getUnannotatedTypeReference(this.intStack[this.intPtr--])); > castType.sourceEnd = end - 1; > castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1; > cast.sourceEnd = exp.sourceEnd; > } >-protected void consumeCastExpressionWithPrimitiveType() { >+protected void consumeCastExpressionWithPrimitiveType(boolean hasTypeAnnotations) { > // CastExpression ::= PushLPAREN PrimitiveType Dimsopt PushRPAREN InsideCastExpression UnaryExpression > > //this.intStack : posOfLeftParen dim posOfRightParen >@@ -2071,18 +2186,18 @@ > > Expression exp, cast, castType; > int end = this.intStack[this.intPtr--]; >- this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType = getTypeReference(this.intStack[this.intPtr--])); >+ this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType = hasTypeAnnotations ? getTypeReference(this.intStack[this.intPtr--]) : getUnannotatedTypeReference(this.intStack[this.intPtr--])); > castType.sourceEnd = end - 1; > castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1; > cast.sourceEnd = exp.sourceEnd; > } >-protected void consumeCastExpressionWithQualifiedGenericsArray() { >+protected void consumeCastExpressionWithQualifiedGenericsArray(boolean hasTypeAnnotations) { > // CastExpression ::= PushLPAREN Name OnlyTypeArguments '.' ClassOrInterfaceType Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus > Expression exp, cast, castType; > int end = this.intStack[this.intPtr--]; > > int dim = this.intStack[this.intPtr--]; >- TypeReference rightSide = getTypeReference(0); >+ TypeReference rightSide = hasTypeAnnotations ? getTypeReference(0) : getUnannotatedTypeReference(0); > > ParameterizedQualifiedTypeReference qualifiedParameterizedTypeReference = computeQualifiedGenericsFromRightSide(rightSide, dim); > this.intPtr--; >@@ -2610,6 +2725,19 @@ > > AbstractMethodDeclaration method = (AbstractMethodDeclaration)this.astStack[this.astPtr]; > >+ // jsr308 -- consume receiver annotations >+ method.receiverAnnotations = null; >+ int length; >+ if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) { >+ System.arraycopy( >+ this.typeAnnotationStack, >+ (this.typeAnnotationPtr -= length) + 1, >+ method.receiverAnnotations = new Annotation[length], >+ 0, >+ length); >+ } >+ >+ > if (this.currentToken == TokenNameLBRACE){ > method.bodyStart = this.scanner.currentPosition; > } >@@ -2768,8 +2896,10 @@ > pushOnIntStack(this.dimensions); > this.dimensions = 0; > } >-protected void consumeDimWithOrWithOutExpr() { >- // DimWithOrWithOutExpr ::= '[' ']' >+ >+protected void consumeDimWithOutExpr() { >+ // DimWithOrWithOutExpr ::= '[' ']' >+ // DimWithOrWithOutExpr ::= OneOrMoreAnnotations '[' ']' > pushOnExpressionStack(null); > > if(this.currentElement != null && this.currentToken == TokenNameLBRACE) { >@@ -2959,7 +3089,7 @@ > this.intPtr-=2; > } > >- type = getTypeReference(this.intStack[this.intPtr--] + extraDims); // type dimension >+ type = getUnannotatedTypeReference(this.intStack[this.intPtr--] + extraDims); // type dimension // TODO (Srikanth) > > // consume annotations > int length; >@@ -3100,14 +3230,14 @@ > 0, > length); > } >- type = getTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension >+ type = getUnannotatedTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension > if (declaration.declarationSourceStart == -1) { > // this is true if there is no modifiers for the local variable declaration > declaration.declarationSourceStart = type.sourceStart; > } > pushOnAstStack(type); > } else { >- type = getTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension >+ type = getUnannotatedTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension > pushOnAstStack(type); > declaration.declarationSourceStart = this.intStack[this.intPtr--]; > declaration.modifiers = this.intStack[this.intPtr--]; >@@ -3774,10 +3904,45 @@ > endOfEllipsis = this.intStack[this.intPtr--]; > } > int firstDimensions = this.intStack[this.intPtr--]; >- final int typeDimensions = firstDimensions + extendedDimensions; >- TypeReference type = getTypeReference(typeDimensions); >+ TypeReference type = getUnannotatedTypeReference(extendedDimensions); >+ Annotation [] varArgsAnnotations = null; >+ int length; >+ if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) { >+ System.arraycopy( >+ this.typeAnnotationStack, >+ (this.typeAnnotationPtr -= length) + 1, >+ varArgsAnnotations = new Annotation[length], >+ 0, >+ length); >+ } >+ final int typeDimensions = firstDimensions + extendedDimensions + (isVarArgs ? 1 : 0); >+ >+ // jsr308 type annotations management >+ Annotation[][] annotationsOnFirstDimensions = firstDimensions == 0 ? null : getAnnotationsOnDimensions(firstDimensions); >+ Annotation [][] annotationsOnExtendedDimensions = extendedDimensions == 0 ? null : type.getAnnotationsOnDimensions(); >+ Annotation [][] annotationsOnAllDimensions = null; >+ if (annotationsOnFirstDimensions != null || annotationsOnExtendedDimensions != null || varArgsAnnotations != null) { >+ // Merge the three into one. >+ annotationsOnAllDimensions = new Annotation[typeDimensions][]; >+ int index; >+ for (index = 0; index < firstDimensions; index++) { >+ annotationsOnAllDimensions[index] = annotationsOnFirstDimensions == null ? null : annotationsOnFirstDimensions[index]; >+ } >+ // copy over the annotations on extended dimensions... >+ for (int j = 0; j < extendedDimensions; j++, index++) { >+ annotationsOnAllDimensions[index] = annotationsOnExtendedDimensions == null ? null : annotationsOnExtendedDimensions[j]; >+ } >+ // copy over the varargs annotations, never mind that varargs and extended dimensions don't coexist. >+ if (isVarArgs) { >+ annotationsOnAllDimensions[index] = varArgsAnnotations; >+ } >+ } >+ >+ if (typeDimensions != extendedDimensions) { >+ type = copyDims(type, typeDimensions, annotationsOnAllDimensions); >+ type.sourceEnd = type.isParametrizedTypeReference() ? this.endStatementPosition : this.endPosition; >+ } > if (isVarArgs) { >- type = copyDims(type, typeDimensions + 1); > if (extendedDimensions == 0) { > type.sourceEnd = endOfEllipsis; > } >@@ -3793,7 +3958,7 @@ > this.intStack[this.intPtr + 1] & ~ClassFileConstants.AccDeprecated); // modifiers > arg.declarationSourceStart = modifierPositions; > // consume annotations >- int length; >+ > if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) { > System.arraycopy( > this.expressionStack, >@@ -3817,8 +3982,38 @@ > extendedDimensions > 0) { > problemReporter().illegalExtendedDimensions(arg); > } >+ } else { >+ // The grammar allows trailing annotations in FormalParameter as in >+ // "int @NonNull[] @Misplaced parameter" in order to allow for constructs such as >+ // "Object @NonNull[] @Correct ... objects" -- we prune these here. >+ if (varArgsAnnotations != null) { >+ problemReporter().misplacedTypeAnnotations(varArgsAnnotations[0], >+ varArgsAnnotations[varArgsAnnotations.length-1]); >+ } > } > } >+protected Annotation[][] getAnnotationsOnDimensions(int dimensionsCount) { >+ Annotation [][] dimensionsAnnotations = null; >+ if (dimensionsCount > 0) { >+ for (int i = 0; i < dimensionsCount; i++) { >+ Annotation [] annotations = null; >+ int length; >+ if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) { >+ System.arraycopy( >+ this.typeAnnotationStack, >+ (this.typeAnnotationPtr -= length) + 1, >+ annotations = new Annotation[length], >+ 0, >+ length); >+ if (dimensionsAnnotations == null) { >+ dimensionsAnnotations = new Annotation[dimensionsCount][]; >+ } >+ dimensionsAnnotations[dimensionsCount - i - 1] = annotations; >+ } >+ } >+ } >+ return dimensionsAnnotations; >+} > protected void consumeFormalParameterList() { > // FormalParameterList ::= FormalParameterList ',' FormalParameter > optimizedConcatNodeLists(); >@@ -4407,6 +4602,17 @@ > // MethodHeaderExtendedDims ::= Dimsopt > // now we update the returnType of the method > MethodDeclaration md = (MethodDeclaration) this.astStack[this.astPtr]; >+ // jsr308 -- consume receiver annotations >+ md.receiverAnnotations = null; >+ int length; >+ if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) { >+ System.arraycopy( >+ this.typeAnnotationStack, >+ (this.typeAnnotationPtr -= length) + 1, >+ md.receiverAnnotations = new Annotation[length], >+ 0, >+ length); >+ } > int extendedDims = this.intStack[this.intPtr--]; > if(md.isAnnotationMethod()) { > ((AnnotationMethodDeclaration)md).extendedDimensions = extendedDims; >@@ -4442,7 +4648,7 @@ > long selectorSource = this.identifierPositionStack[this.identifierPtr--]; > this.identifierLengthPtr--; > //type >- md.returnType = getTypeReference(this.intStack[this.intPtr--]); >+ md.returnType = getUnannotatedTypeReference(this.intStack[this.intPtr--]); > //modifiers > md.declarationSourceStart = this.intStack[this.intPtr--]; > md.modifiers = this.intStack[this.intPtr--]; >@@ -4482,7 +4688,7 @@ > } > } > } >-protected void consumeMethodHeaderNameWithTypeParameters(boolean isAnnotationMethod) { >+protected void consumeMethodHeaderNameWithTypeParameters(boolean isAnnotationMethod, boolean hasTypeAnnotations) { > // MethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '(' > // AnnotationMethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '(' > // RecoveryMethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '(' >@@ -4499,7 +4705,7 @@ > long selectorSource = this.identifierPositionStack[this.identifierPtr--]; > this.identifierLengthPtr--; > //type >- md.returnType = getTypeReference(this.intStack[this.intPtr--]); >+ md.returnType = hasTypeAnnotations ? getTypeReference(this.intStack[this.intPtr--]) : getUnannotatedTypeReference(this.intStack[this.intPtr--]); > > // consume type parameters > int length = this.genericsLengthStack[this.genericsLengthPtr--]; >@@ -4721,6 +4927,30 @@ > protected void consumeModifiers2() { > this.expressionLengthStack[this.expressionLengthPtr - 1] += this.expressionLengthStack[this.expressionLengthPtr--]; > } >+ >+protected void consumeOneMoreTypeAnnotation() { >+ // OneOrMoreAnnotations ::= OneOrMoreAnnotations Annotation >+ this.expressionLengthPtr --; >+ Annotation annotation = (Annotation) this.expressionStack[this.expressionPtr--]; >+ pushOnTypeAnnotationStack(annotation); >+ this.typeAnnotationLengthStack[--this.typeAnnotationLengthPtr]++; >+ if(!this.statementRecoveryActivated && >+ this.options.sourceLevel < ClassFileConstants.JDK1_7 && >+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) { >+ problemReporter().invalidUsageOfTypeAnnotations(annotation); >+ } >+} >+ >+protected void consumePotentialNameArrayType () { >+ >+ // FormalParameter ::= Modifiersopt Name DimsoptAnnotsopt PotentialNameArray VariableDeclaratorId >+ // FormalParameter ::= Modifiersopt Name DimsoptAnnotsopt PotentialNameArray '...' VariableDeclaratorId >+ // PotentialNameArray -> $empty >+ // Dimensions including lack of have been pushed appropriately by action attached to DimsoptAnnotsopt >+ pushOnGenericsLengthStack(0); // handle type arguments >+ pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]); >+} >+ > protected void consumeNameArrayType() { > pushOnGenericsLengthStack(0); // handle type arguments > pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]); >@@ -4784,9 +5014,21 @@ > } > this.recordStringLiterals = true; > } >-protected void consumeOneDimLoop() { >+protected void consumeOneDimLoop(boolean expressionStackMayHaveAnnotations) { > // OneDimLoop ::= '[' ']' >+ // OneDimOrAnnot -> '[' ']' > this.dimensions++; >+ if (!expressionStackMayHaveAnnotations || this.unattachedAnnotationPtr == -1 ) { >+ pushOnTypeAnnotationLengthStack(0); // no annotations for the current dimension. >+ } else { >+ this.unattachedAnnotationPtr = -1; // Leave type annotation stacks they are. >+ } >+} >+protected void consumeOneDimLoopWithAnnotations() { >+ // OneDimLoop ::= OneOrMoreAnnotations '[' ']' >+ this.dimensions++; >+ // Top of expression stack contains annotations of length specified >+ // by top of expression length stack that apply to this dimension. > } > protected void consumeOnlySynchronized() { > // OnlySynchronized ::= 'synchronized' >@@ -4956,7 +5198,7 @@ > pushOnGenericsLengthStack(0); > > pushOnExpressionStack( >- new ClassLiteralAccess(this.intStack[this.intPtr--], getTypeReference(this.intStack[this.intPtr--]))); >+ new ClassLiteralAccess(this.intStack[this.intPtr--], getUnannotatedTypeReference(this.intStack[this.intPtr--]))); > } > protected void consumePrimaryNoNewArrayName() { > // PrimaryNoNewArray ::= Name '.' 'class' >@@ -4965,7 +5207,7 @@ > // handle type arguments > pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]); > pushOnGenericsLengthStack(0); >- TypeReference typeReference = getTypeReference(0); >+ TypeReference typeReference = getUnannotatedTypeReference(0); // TODO (Srikanth) needs fix > > pushOnExpressionStack( > new ClassLiteralAccess(this.intStack[this.intPtr--], typeReference)); >@@ -4975,7 +5217,7 @@ > // handle type arguments > pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]); > pushOnGenericsLengthStack(0); >- TypeReference typeReference = getTypeReference(0); >+ TypeReference typeReference = getUnannotatedTypeReference(0); > > pushOnExpressionStack( > new QualifiedSuperReference( >@@ -4989,7 +5231,7 @@ > pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]); > pushOnGenericsLengthStack(0); // handle type arguments > >- TypeReference typeReference = getTypeReference(0); >+ TypeReference typeReference = getUnannotatedTypeReference(0); // javac complains on annotations here. > > pushOnExpressionStack( > new QualifiedThisReference( >@@ -5001,13 +5243,13 @@ > // PrimaryNoNewArray ::= PrimitiveType Dims '.' 'class' > this.intPtr--; // remove the class start position > pushOnExpressionStack( >- new ClassLiteralAccess(this.intStack[this.intPtr--], getTypeReference(this.intStack[this.intPtr--]))); >+ new ClassLiteralAccess(this.intStack[this.intPtr--], getUnannotatedTypeReference(this.intStack[this.intPtr--]))); > } > protected void consumePrimaryNoNewArrayPrimitiveType() { > // PrimaryNoNewArray ::= PrimitiveType '.' 'class' > this.intPtr--; // remove the class start position > pushOnExpressionStack( >- new ClassLiteralAccess(this.intStack[this.intPtr--], getTypeReference(0))); >+ new ClassLiteralAccess(this.intStack[this.intPtr--], getUnannotatedTypeReference(0))); > } > protected void consumePrimaryNoNewArrayThis() { > // PrimaryNoNewArray ::= 'this' >@@ -5077,7 +5319,7 @@ > } > consumeMethodHeaderName(isAnnotationMethod); > } >-protected void consumeRecoveryMethodHeaderNameWithTypeParameters() { >+protected void consumeRecoveryMethodHeaderNameWithTypeParameters(boolean hasTypeAnnotations) { > // this method is call only inside recovery > boolean isAnnotationMethod = false; > if(this.currentElement instanceof RecoveredType) { >@@ -5088,7 +5330,7 @@ > isAnnotationMethod = (recoveredType.typeDeclaration.modifiers & ClassFileConstants.AccAnnotation) != 0; > } > } >- consumeMethodHeaderNameWithTypeParameters(isAnnotationMethod); >+ consumeMethodHeaderNameWithTypeParameters(isAnnotationMethod, hasTypeAnnotations); > } > protected void consumeReduceImports() { > // Consume imports >@@ -5106,14 +5348,14 @@ > protected void consumeReferenceType() { > pushOnIntStack(0); // handle array type > } >-protected void consumeReferenceType1() { >- pushOnGenericsStack(getTypeReference(this.intStack[this.intPtr--])); >+protected void consumeReferenceType1(boolean hasTypeAnnotations) { >+ pushOnGenericsStack(hasTypeAnnotations ? getTypeReference(this.intStack[this.intPtr--]) : getUnannotatedTypeReference(this.intStack[this.intPtr--])); > } >-protected void consumeReferenceType2() { >- pushOnGenericsStack(getTypeReference(this.intStack[this.intPtr--])); >+protected void consumeReferenceType2(boolean hasTypeAnnotations) { >+ pushOnGenericsStack(hasTypeAnnotations ? getTypeReference(this.intStack[this.intPtr--]) : getUnannotatedTypeReference(this.intStack[this.intPtr--])); > } >-protected void consumeReferenceType3() { >- pushOnGenericsStack(getTypeReference(this.intStack[this.intPtr--])); >+protected void consumeReferenceType3(boolean hasTypeAnnotations) { >+ pushOnGenericsStack(hasTypeAnnotations ? getTypeReference(this.intStack[this.intPtr--]) : getUnannotatedTypeReference(this.intStack[this.intPtr--])); > } > protected void consumeRestoreDiet() { > // RestoreDiet ::= $empty >@@ -5138,1674 +5380,1909 @@ > consumeClassOrInterfaceName(); > break; > >- case 49 : if (DEBUG) { System.out.println("ClassOrInterface ::= GenericType DOT Name"); } //$NON-NLS-1$ >- consumeClassOrInterface(); >- break; >- > case 50 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface TypeArguments"); } //$NON-NLS-1$ > consumeGenericType(); > break; > >- case 51 : if (DEBUG) { System.out.println("ArrayTypeWithTypeArgumentsName ::= GenericType DOT Name"); } //$NON-NLS-1$ >- consumeArrayTypeWithTypeArgumentsName(); >+ case 51 : if (DEBUG) { System.out.println("GenericTypeDotName ::= GenericType DOT Name"); } //$NON-NLS-1$ >+ consumeClassOrInterface(); > break; > >- case 52 : if (DEBUG) { System.out.println("ArrayType ::= PrimitiveType Dims"); } //$NON-NLS-1$ >+ case 53 : if (DEBUG) { System.out.println("ArrayType ::= PrimitiveType Dims"); } //$NON-NLS-1$ > consumePrimitiveArrayType(); > break; > >- case 53 : if (DEBUG) { System.out.println("ArrayType ::= Name Dims"); } //$NON-NLS-1$ >+ case 54 : if (DEBUG) { System.out.println("ArrayType ::= Name Dims"); } //$NON-NLS-1$ > consumeNameArrayType(); > break; > >- case 54 : if (DEBUG) { System.out.println("ArrayType ::= ArrayTypeWithTypeArgumentsName Dims"); } //$NON-NLS-1$ >+ case 55 : if (DEBUG) { System.out.println("ArrayType ::= ArrayTypeWithTypeArgumentsName Dims"); } //$NON-NLS-1$ > consumeGenericTypeNameArrayType(); > break; > >- case 55 : if (DEBUG) { System.out.println("ArrayType ::= GenericType Dims"); } //$NON-NLS-1$ >+ case 56 : if (DEBUG) { System.out.println("ArrayType ::= GenericType Dims"); } //$NON-NLS-1$ > consumeGenericTypeArrayType(); > break; > >- case 60 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT SimpleName"); } //$NON-NLS-1$ >+ case 57 : if (DEBUG) { System.out.println("ClassType ::= ClassOrInterfaceType"); } //$NON-NLS-1$ >+ consumeZeroTypeAnnotations(); >+ break; >+ >+ case 62 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT SimpleName"); } //$NON-NLS-1$ > consumeQualifiedName(); > break; > >- case 61 : if (DEBUG) { System.out.println("CompilationUnit ::= EnterCompilationUnit..."); } //$NON-NLS-1$ >+ case 63 : if (DEBUG) { System.out.println("CompilationUnit ::= EnterCompilationUnit..."); } //$NON-NLS-1$ > consumeCompilationUnit(); > break; > >- case 62 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration"); } //$NON-NLS-1$ >+ case 64 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration"); } //$NON-NLS-1$ > consumeInternalCompilationUnit(); > break; > >- case 63 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$ >+ case 65 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$ > consumeInternalCompilationUnit(); > break; > >- case 64 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$ >+ case 66 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$ > consumeInternalCompilationUnitWithTypes(); > break; > >- case 65 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$ >+ case 67 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$ > consumeInternalCompilationUnitWithTypes(); > break; > >- case 66 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$ >+ case 68 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$ > consumeInternalCompilationUnit(); > break; > >- case 67 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= TypeDeclarations"); } //$NON-NLS-1$ >+ case 69 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= TypeDeclarations"); } //$NON-NLS-1$ > consumeInternalCompilationUnitWithTypes(); > break; > >- case 68 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$ >+ case 70 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$ > consumeInternalCompilationUnitWithTypes(); > break; > >- case 69 : if (DEBUG) { System.out.println("InternalCompilationUnit ::="); } //$NON-NLS-1$ >+ case 71 : if (DEBUG) { System.out.println("InternalCompilationUnit ::="); } //$NON-NLS-1$ > consumeEmptyInternalCompilationUnit(); > break; > >- case 70 : if (DEBUG) { System.out.println("ReduceImports ::="); } //$NON-NLS-1$ >+ case 72 : if (DEBUG) { System.out.println("ReduceImports ::="); } //$NON-NLS-1$ > consumeReduceImports(); > break; > >- case 71 : if (DEBUG) { System.out.println("EnterCompilationUnit ::="); } //$NON-NLS-1$ >+ case 73 : if (DEBUG) { System.out.println("EnterCompilationUnit ::="); } //$NON-NLS-1$ > consumeEnterCompilationUnit(); > break; > >- case 87 : if (DEBUG) { System.out.println("CatchHeader ::= catch LPAREN FormalParameter RPAREN..."); } //$NON-NLS-1$ >+ case 89 : if (DEBUG) { System.out.println("CatchHeader ::= catch LPAREN FormalParameter RPAREN..."); } //$NON-NLS-1$ > consumeCatchHeader(); > break; > >- case 89 : if (DEBUG) { System.out.println("ImportDeclarations ::= ImportDeclarations..."); } //$NON-NLS-1$ >+ case 91 : if (DEBUG) { System.out.println("ImportDeclarations ::= ImportDeclarations..."); } //$NON-NLS-1$ > consumeImportDeclarations(); > break; > >- case 91 : if (DEBUG) { System.out.println("TypeDeclarations ::= TypeDeclarations TypeDeclaration"); } //$NON-NLS-1$ >+ case 93 : if (DEBUG) { System.out.println("TypeDeclarations ::= TypeDeclarations TypeDeclaration"); } //$NON-NLS-1$ > consumeTypeDeclarations(); > break; > >- case 92 : if (DEBUG) { System.out.println("PackageDeclaration ::= PackageDeclarationName SEMICOLON"); } //$NON-NLS-1$ >+ case 94 : if (DEBUG) { System.out.println("PackageDeclaration ::= PackageDeclarationName SEMICOLON"); } //$NON-NLS-1$ > consumePackageDeclaration(); > break; > >- case 93 : if (DEBUG) { System.out.println("PackageDeclarationName ::= Modifiers package..."); } //$NON-NLS-1$ >+ case 95 : if (DEBUG) { System.out.println("PackageDeclarationName ::= Modifiers package..."); } //$NON-NLS-1$ > consumePackageDeclarationNameWithModifiers(); > break; > >- case 94 : if (DEBUG) { System.out.println("PackageDeclarationName ::= PackageComment package Name"); } //$NON-NLS-1$ >+ case 96 : if (DEBUG) { System.out.println("PackageDeclarationName ::= PackageComment package Name"); } //$NON-NLS-1$ > consumePackageDeclarationName(); > break; > >- case 95 : if (DEBUG) { System.out.println("PackageComment ::="); } //$NON-NLS-1$ >+ case 97 : if (DEBUG) { System.out.println("PackageComment ::="); } //$NON-NLS-1$ > consumePackageComment(); > break; > >- case 100 : if (DEBUG) { System.out.println("SingleTypeImportDeclaration ::=..."); } //$NON-NLS-1$ >+ case 102 : if (DEBUG) { System.out.println("SingleTypeImportDeclaration ::=..."); } //$NON-NLS-1$ > consumeImportDeclaration(); > break; > >- case 101 : if (DEBUG) { System.out.println("SingleTypeImportDeclarationName ::= import Name"); } //$NON-NLS-1$ >+ case 103 : if (DEBUG) { System.out.println("SingleTypeImportDeclarationName ::= import Name"); } //$NON-NLS-1$ > consumeSingleTypeImportDeclarationName(); > break; > >- case 102 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclaration ::=..."); } //$NON-NLS-1$ >+ case 104 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclaration ::=..."); } //$NON-NLS-1$ > consumeImportDeclaration(); > break; > >- case 103 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclarationName ::= import Name DOT..."); } //$NON-NLS-1$ >+ case 105 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclarationName ::= import Name DOT..."); } //$NON-NLS-1$ > consumeTypeImportOnDemandDeclarationName(); > break; > >- case 106 : if (DEBUG) { System.out.println("TypeDeclaration ::= SEMICOLON"); } //$NON-NLS-1$ >+ case 108 : if (DEBUG) { System.out.println("TypeDeclaration ::= SEMICOLON"); } //$NON-NLS-1$ > consumeEmptyTypeDeclaration(); > break; > >- case 110 : if (DEBUG) { System.out.println("Modifiers ::= Modifiers Modifier"); } //$NON-NLS-1$ >+ case 112 : if (DEBUG) { System.out.println("NonAnnotModifiers ::= NonAnnotModifiers NonAnnotModifier"); } //$NON-NLS-1$ > consumeModifiers2(); > break; > >- case 122 : if (DEBUG) { System.out.println("Modifier ::= Annotation"); } //$NON-NLS-1$ >+ case 114 : if (DEBUG) { System.out.println("Modifiers ::= Modifiers Modifier"); } //$NON-NLS-1$ >+ consumeModifiers2(); >+ break; >+ >+ case 137 : if (DEBUG) { System.out.println("Modifier ::= Annotation"); } //$NON-NLS-1$ > consumeAnnotationAsModifier(); > break; > >- case 123 : if (DEBUG) { System.out.println("ClassDeclaration ::= ClassHeader ClassBody"); } //$NON-NLS-1$ >+ case 138 : if (DEBUG) { System.out.println("ClassDeclaration ::= ClassHeader ClassBody"); } //$NON-NLS-1$ > consumeClassDeclaration(); > break; > >- case 124 : if (DEBUG) { System.out.println("ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt..."); } //$NON-NLS-1$ >+ case 139 : if (DEBUG) { System.out.println("ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt..."); } //$NON-NLS-1$ > consumeClassHeader(); > break; > >- case 125 : if (DEBUG) { System.out.println("ClassHeaderName ::= ClassHeaderName1 TypeParameters"); } //$NON-NLS-1$ >+ case 140 : if (DEBUG) { System.out.println("ClassHeaderName ::= ClassHeaderName1 TypeParameters"); } //$NON-NLS-1$ > consumeTypeHeaderNameWithTypeParameters(); > break; > >- case 127 : if (DEBUG) { System.out.println("ClassHeaderName1 ::= Modifiersopt class Identifier"); } //$NON-NLS-1$ >+ case 142 : if (DEBUG) { System.out.println("ClassHeaderName1 ::= Modifiersopt class Identifier"); } //$NON-NLS-1$ > consumeClassHeaderName1(); > break; > >- case 128 : if (DEBUG) { System.out.println("ClassHeaderExtends ::= extends ClassType"); } //$NON-NLS-1$ >+ case 143 : if (DEBUG) { System.out.println("ClassHeaderExtends ::= extends ClassType"); } //$NON-NLS-1$ > consumeClassHeaderExtends(); > break; > >- case 129 : if (DEBUG) { System.out.println("ClassHeaderImplements ::= implements InterfaceTypeList"); } //$NON-NLS-1$ >+ case 144 : if (DEBUG) { System.out.println("ClassHeaderImplements ::= implements InterfaceTypeList"); } //$NON-NLS-1$ > consumeClassHeaderImplements(); > break; > >- case 131 : if (DEBUG) { System.out.println("InterfaceTypeList ::= InterfaceTypeList COMMA..."); } //$NON-NLS-1$ >+ case 146 : if (DEBUG) { System.out.println("InterfaceTypeList ::= InterfaceTypeList COMMA..."); } //$NON-NLS-1$ > consumeInterfaceTypeList(); > break; > >- case 132 : if (DEBUG) { System.out.println("InterfaceType ::= ClassOrInterfaceType"); } //$NON-NLS-1$ >+ case 147 : if (DEBUG) { System.out.println("InterfaceType ::= PushZeroTypeAnnotations..."); } //$NON-NLS-1$ >+ consumeInterfaceType(); >+ break; >+ >+ case 148 : if (DEBUG) { System.out.println("InterfaceType ::= OneOrMoreAnnotations..."); } //$NON-NLS-1$ > consumeInterfaceType(); > break; > >- case 135 : if (DEBUG) { System.out.println("ClassBodyDeclarations ::= ClassBodyDeclarations..."); } //$NON-NLS-1$ >+ case 151 : if (DEBUG) { System.out.println("ClassBodyDeclarations ::= ClassBodyDeclarations..."); } //$NON-NLS-1$ > consumeClassBodyDeclarations(); > break; > >- case 139 : if (DEBUG) { System.out.println("ClassBodyDeclaration ::= Diet NestedMethod..."); } //$NON-NLS-1$ >+ case 155 : if (DEBUG) { System.out.println("ClassBodyDeclaration ::= Diet NestedMethod..."); } //$NON-NLS-1$ > consumeClassBodyDeclaration(); > break; > >- case 140 : if (DEBUG) { System.out.println("Diet ::="); } //$NON-NLS-1$ >+ case 156 : if (DEBUG) { System.out.println("Diet ::="); } //$NON-NLS-1$ > consumeDiet(); > break; > >- case 141 : if (DEBUG) { System.out.println("Initializer ::= Diet NestedMethod CreateInitializer..."); } //$NON-NLS-1$ >+ case 157 : if (DEBUG) { System.out.println("Initializer ::= Diet NestedMethod CreateInitializer..."); } //$NON-NLS-1$ > consumeClassBodyDeclaration(); > break; > >- case 142 : if (DEBUG) { System.out.println("CreateInitializer ::="); } //$NON-NLS-1$ >+ case 158 : if (DEBUG) { System.out.println("CreateInitializer ::="); } //$NON-NLS-1$ > consumeCreateInitializer(); > break; > >- case 149 : if (DEBUG) { System.out.println("ClassMemberDeclaration ::= SEMICOLON"); } //$NON-NLS-1$ >+ case 165 : if (DEBUG) { System.out.println("ClassMemberDeclaration ::= SEMICOLON"); } //$NON-NLS-1$ > consumeEmptyTypeDeclaration(); > break; > >- case 152 : if (DEBUG) { System.out.println("FieldDeclaration ::= Modifiersopt Type..."); } //$NON-NLS-1$ >+ case 168 : if (DEBUG) { System.out.println("FieldDeclaration ::= Modifiersopt Type..."); } //$NON-NLS-1$ > consumeFieldDeclaration(); > break; > >- case 154 : if (DEBUG) { System.out.println("VariableDeclarators ::= VariableDeclarators COMMA..."); } //$NON-NLS-1$ >+ case 170 : if (DEBUG) { System.out.println("VariableDeclarators ::= VariableDeclarators COMMA..."); } //$NON-NLS-1$ > consumeVariableDeclarators(); > break; > >- case 157 : if (DEBUG) { System.out.println("EnterVariable ::="); } //$NON-NLS-1$ >+ case 173 : if (DEBUG) { System.out.println("EnterVariable ::="); } //$NON-NLS-1$ > consumeEnterVariable(); > break; > >- case 158 : if (DEBUG) { System.out.println("ExitVariableWithInitialization ::="); } //$NON-NLS-1$ >+ case 174 : if (DEBUG) { System.out.println("ExitVariableWithInitialization ::="); } //$NON-NLS-1$ > consumeExitVariableWithInitialization(); > break; > >- case 159 : if (DEBUG) { System.out.println("ExitVariableWithoutInitialization ::="); } //$NON-NLS-1$ >+ case 175 : if (DEBUG) { System.out.println("ExitVariableWithoutInitialization ::="); } //$NON-NLS-1$ > consumeExitVariableWithoutInitialization(); > break; > >- case 160 : if (DEBUG) { System.out.println("ForceNoDiet ::="); } //$NON-NLS-1$ >+ case 176 : if (DEBUG) { System.out.println("ForceNoDiet ::="); } //$NON-NLS-1$ > consumeForceNoDiet(); > break; > >- case 161 : if (DEBUG) { System.out.println("RestoreDiet ::="); } //$NON-NLS-1$ >+ case 177 : if (DEBUG) { System.out.println("RestoreDiet ::="); } //$NON-NLS-1$ > consumeRestoreDiet(); > break; > >- case 166 : if (DEBUG) { System.out.println("MethodDeclaration ::= MethodHeader MethodBody"); } //$NON-NLS-1$ >+ case 182 : if (DEBUG) { System.out.println("MethodDeclaration ::= MethodHeader MethodBody"); } //$NON-NLS-1$ > // set to true to consume a method with a body > consumeMethodDeclaration(true); > break; > >- case 167 : if (DEBUG) { System.out.println("AbstractMethodDeclaration ::= MethodHeader SEMICOLON"); } //$NON-NLS-1$ >+ case 183 : if (DEBUG) { System.out.println("AbstractMethodDeclaration ::= MethodHeader SEMICOLON"); } //$NON-NLS-1$ > // set to false to consume a method without body > consumeMethodDeclaration(false); > break; > >- case 168 : if (DEBUG) { System.out.println("MethodHeader ::= MethodHeaderName FormalParameterListopt"); } //$NON-NLS-1$ >+ case 184 : if (DEBUG) { System.out.println("MethodHeader ::= MethodHeaderName FormalParameterListopt"); } //$NON-NLS-1$ > consumeMethodHeader(); > break; > >- case 169 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt TypeParameters Type..."); } //$NON-NLS-1$ >- consumeMethodHeaderNameWithTypeParameters(false); >+ case 185 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt TypeParameters Type..."); } //$NON-NLS-1$ >+ consumeMethodHeaderNameWithTypeParameters(false, false); >+ break; >+ >+ case 186 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt TypeParameters..."); } //$NON-NLS-1$ >+ consumeMethodHeaderNameWithTypeParameters(false, true); > break; > >- case 170 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt Type Identifier LPAREN"); } //$NON-NLS-1$ >+ case 187 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt Type Identifier LPAREN"); } //$NON-NLS-1$ > consumeMethodHeaderName(false); > break; > >- case 171 : if (DEBUG) { System.out.println("MethodHeaderRightParen ::= RPAREN"); } //$NON-NLS-1$ >+ case 188 : if (DEBUG) { System.out.println("MethodHeaderRightParen ::= RPAREN"); } //$NON-NLS-1$ > consumeMethodHeaderRightParen(); > break; > >- case 172 : if (DEBUG) { System.out.println("MethodHeaderExtendedDims ::= Dimsopt"); } //$NON-NLS-1$ >+ case 189 : if (DEBUG) { System.out.println("MethodHeaderExtendedDims ::= DimsoptAnnotsopt"); } //$NON-NLS-1$ > consumeMethodHeaderExtendedDims(); > break; > >- case 173 : if (DEBUG) { System.out.println("MethodHeaderThrowsClause ::= throws ClassTypeList"); } //$NON-NLS-1$ >+ case 190 : if (DEBUG) { System.out.println("MethodHeaderThrowsClause ::= throws ClassTypeList"); } //$NON-NLS-1$ > consumeMethodHeaderThrowsClause(); > break; > >- case 174 : if (DEBUG) { System.out.println("ConstructorHeader ::= ConstructorHeaderName..."); } //$NON-NLS-1$ >+ case 191 : if (DEBUG) { System.out.println("ConstructorHeader ::= ConstructorHeaderName..."); } //$NON-NLS-1$ > consumeConstructorHeader(); > break; > >- case 175 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt TypeParameters..."); } //$NON-NLS-1$ >+ case 192 : if (DEBUG) { System.out.println("ConstructorHeader ::= ConstructorHeaderName..."); } //$NON-NLS-1$ >+ consumeConstructorHeader(); >+ break; >+ >+ case 193 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt TypeParameters..."); } //$NON-NLS-1$ > consumeConstructorHeaderNameWithTypeParameters(); > break; > >- case 176 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt Identifier LPAREN"); } //$NON-NLS-1$ >+ case 194 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt Identifier LPAREN"); } //$NON-NLS-1$ > consumeConstructorHeaderName(); > break; > >- case 178 : if (DEBUG) { System.out.println("FormalParameterList ::= FormalParameterList COMMA..."); } //$NON-NLS-1$ >+ case 196 : if (DEBUG) { System.out.println("FormalParameterList ::= FormalParameterList COMMA..."); } //$NON-NLS-1$ > consumeFormalParameterList(); > break; > >- case 179 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type..."); } //$NON-NLS-1$ >+ case 197 : if (DEBUG) { System.out.println("PotentialNameArray ::="); } //$NON-NLS-1$ >+ consumePotentialNameArrayType(); >+ break; >+ >+ case 198 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt PrimitiveType..."); } //$NON-NLS-1$ >+ consumeFormalParameter(false); >+ break; >+ >+ case 199 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt PrimitiveType..."); } //$NON-NLS-1$ >+ consumeFormalParameter(true); >+ break; >+ >+ case 200 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Name DimsoptAnnotsopt"); } //$NON-NLS-1$ > consumeFormalParameter(false); > break; > >- case 180 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type ELLIPSIS..."); } //$NON-NLS-1$ >+ case 201 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Name DimsoptAnnotsopt"); } //$NON-NLS-1$ > consumeFormalParameter(true); > break; > >- case 182 : if (DEBUG) { System.out.println("ClassTypeList ::= ClassTypeList COMMA ClassTypeElt"); } //$NON-NLS-1$ >+ case 202 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt GenericType..."); } //$NON-NLS-1$ >+ consumeFormalParameter(false); >+ break; >+ >+ case 203 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt GenericType..."); } //$NON-NLS-1$ >+ consumeFormalParameter(true); >+ break; >+ >+ case 204 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt GenericTypeDotName..."); } //$NON-NLS-1$ >+ consumeFormalParameter(false); >+ break; >+ >+ case 205 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt GenericTypeDotName..."); } //$NON-NLS-1$ >+ consumeFormalParameter(true); >+ break; >+ >+ case 207 : if (DEBUG) { System.out.println("ClassTypeList ::= ClassTypeList COMMA ClassTypeElt"); } //$NON-NLS-1$ > consumeClassTypeList(); > break; > >- case 183 : if (DEBUG) { System.out.println("ClassTypeElt ::= ClassType"); } //$NON-NLS-1$ >+ case 208 : if (DEBUG) { System.out.println("ClassTypeElt ::= ClassType"); } //$NON-NLS-1$ > consumeClassTypeElt(); > break; > >- case 184 : if (DEBUG) { System.out.println("MethodBody ::= NestedMethod LBRACE BlockStatementsopt..."); } //$NON-NLS-1$ >+ case 209 : if (DEBUG) { System.out.println("MethodBody ::= NestedMethod LBRACE BlockStatementsopt..."); } //$NON-NLS-1$ > consumeMethodBody(); > break; > >- case 185 : if (DEBUG) { System.out.println("NestedMethod ::="); } //$NON-NLS-1$ >+ case 210 : if (DEBUG) { System.out.println("NestedMethod ::="); } //$NON-NLS-1$ > consumeNestedMethod(); > break; > >- case 186 : if (DEBUG) { System.out.println("StaticInitializer ::= StaticOnly Block"); } //$NON-NLS-1$ >+ case 211 : if (DEBUG) { System.out.println("StaticInitializer ::= StaticOnly Block"); } //$NON-NLS-1$ > consumeStaticInitializer(); > break; > >- case 187 : if (DEBUG) { System.out.println("StaticOnly ::= static"); } //$NON-NLS-1$ >+ case 212 : if (DEBUG) { System.out.println("StaticOnly ::= static"); } //$NON-NLS-1$ > consumeStaticOnly(); > break; > >- case 188 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader MethodBody"); } //$NON-NLS-1$ >+ case 213 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader MethodBody"); } //$NON-NLS-1$ > consumeConstructorDeclaration() ; > break; > >- case 189 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader SEMICOLON"); } //$NON-NLS-1$ >+ case 214 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader SEMICOLON"); } //$NON-NLS-1$ > consumeInvalidConstructorDeclaration() ; > break; > >- case 190 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= this LPAREN..."); } //$NON-NLS-1$ >+ case 215 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= this LPAREN..."); } //$NON-NLS-1$ > consumeExplicitConstructorInvocation(0, THIS_CALL); > break; > >- case 191 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments this"); } //$NON-NLS-1$ >+ case 216 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments this"); } //$NON-NLS-1$ > consumeExplicitConstructorInvocationWithTypeArguments(0,THIS_CALL); > break; > >- case 192 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= super LPAREN..."); } //$NON-NLS-1$ >+ case 217 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= super LPAREN..."); } //$NON-NLS-1$ > consumeExplicitConstructorInvocation(0,SUPER_CALL); > break; > >- case 193 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments..."); } //$NON-NLS-1$ >+ case 218 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments..."); } //$NON-NLS-1$ > consumeExplicitConstructorInvocationWithTypeArguments(0,SUPER_CALL); > break; > >- case 194 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT super..."); } //$NON-NLS-1$ >+ case 219 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT super..."); } //$NON-NLS-1$ > consumeExplicitConstructorInvocation(1, SUPER_CALL); > break; > >- case 195 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); } //$NON-NLS-1$ >+ case 220 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); } //$NON-NLS-1$ > consumeExplicitConstructorInvocationWithTypeArguments(1, SUPER_CALL); > break; > >- case 196 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT super LPAREN"); } //$NON-NLS-1$ >+ case 221 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT super LPAREN"); } //$NON-NLS-1$ > consumeExplicitConstructorInvocation(2, SUPER_CALL); > break; > >- case 197 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); } //$NON-NLS-1$ >+ case 222 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); } //$NON-NLS-1$ > consumeExplicitConstructorInvocationWithTypeArguments(2, SUPER_CALL); > break; > >- case 198 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT this..."); } //$NON-NLS-1$ >+ case 223 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT this..."); } //$NON-NLS-1$ > consumeExplicitConstructorInvocation(1, THIS_CALL); > break; > >- case 199 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); } //$NON-NLS-1$ >+ case 224 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); } //$NON-NLS-1$ > consumeExplicitConstructorInvocationWithTypeArguments(1, THIS_CALL); > break; > >- case 200 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT this LPAREN"); } //$NON-NLS-1$ >+ case 225 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT this LPAREN"); } //$NON-NLS-1$ > consumeExplicitConstructorInvocation(2, THIS_CALL); > break; > >- case 201 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); } //$NON-NLS-1$ >+ case 226 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); } //$NON-NLS-1$ > consumeExplicitConstructorInvocationWithTypeArguments(2, THIS_CALL); > break; > >- case 202 : if (DEBUG) { System.out.println("InterfaceDeclaration ::= InterfaceHeader InterfaceBody"); } //$NON-NLS-1$ >+ case 227 : if (DEBUG) { System.out.println("InterfaceDeclaration ::= InterfaceHeader InterfaceBody"); } //$NON-NLS-1$ > consumeInterfaceDeclaration(); > break; > >- case 203 : if (DEBUG) { System.out.println("InterfaceHeader ::= InterfaceHeaderName..."); } //$NON-NLS-1$ >+ case 228 : if (DEBUG) { System.out.println("InterfaceHeader ::= InterfaceHeaderName..."); } //$NON-NLS-1$ > consumeInterfaceHeader(); > break; > >- case 204 : if (DEBUG) { System.out.println("InterfaceHeaderName ::= InterfaceHeaderName1..."); } //$NON-NLS-1$ >+ case 229 : if (DEBUG) { System.out.println("InterfaceHeaderName ::= InterfaceHeaderName1..."); } //$NON-NLS-1$ > consumeTypeHeaderNameWithTypeParameters(); > break; > >- case 206 : if (DEBUG) { System.out.println("InterfaceHeaderName1 ::= Modifiersopt interface..."); } //$NON-NLS-1$ >+ case 231 : if (DEBUG) { System.out.println("InterfaceHeaderName1 ::= Modifiersopt interface..."); } //$NON-NLS-1$ > consumeInterfaceHeaderName1(); > break; > >- case 207 : if (DEBUG) { System.out.println("InterfaceHeaderExtends ::= extends InterfaceTypeList"); } //$NON-NLS-1$ >+ case 232 : if (DEBUG) { System.out.println("InterfaceHeaderExtends ::= extends InterfaceTypeList"); } //$NON-NLS-1$ > consumeInterfaceHeaderExtends(); > break; > >- case 210 : if (DEBUG) { System.out.println("InterfaceMemberDeclarations ::=..."); } //$NON-NLS-1$ >+ case 235 : if (DEBUG) { System.out.println("InterfaceMemberDeclarations ::=..."); } //$NON-NLS-1$ > consumeInterfaceMemberDeclarations(); > break; > >- case 211 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= SEMICOLON"); } //$NON-NLS-1$ >+ case 236 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= SEMICOLON"); } //$NON-NLS-1$ > consumeEmptyTypeDeclaration(); > break; > >- case 213 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= MethodHeader MethodBody"); } //$NON-NLS-1$ >+ case 238 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= MethodHeader MethodBody"); } //$NON-NLS-1$ > consumeInvalidMethodDeclaration(); > break; > >- case 214 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); } //$NON-NLS-1$ >+ case 239 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); } //$NON-NLS-1$ > consumeInvalidConstructorDeclaration(true); > break; > >- case 215 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); } //$NON-NLS-1$ >+ case 240 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); } //$NON-NLS-1$ > consumeInvalidConstructorDeclaration(false); > break; > >- case 223 : if (DEBUG) { System.out.println("PushLeftBrace ::="); } //$NON-NLS-1$ >+ case 248 : if (DEBUG) { System.out.println("PushLeftBrace ::="); } //$NON-NLS-1$ > consumePushLeftBrace(); > break; > >- case 224 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace ,opt RBRACE"); } //$NON-NLS-1$ >+ case 249 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace ,opt RBRACE"); } //$NON-NLS-1$ > consumeEmptyArrayInitializer(); > break; > >- case 225 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$ >+ case 250 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$ > consumeArrayInitializer(); > break; > >- case 226 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$ >+ case 251 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$ > consumeArrayInitializer(); > break; > >- case 228 : if (DEBUG) { System.out.println("VariableInitializers ::= VariableInitializers COMMA..."); } //$NON-NLS-1$ >+ case 253 : if (DEBUG) { System.out.println("VariableInitializers ::= VariableInitializers COMMA..."); } //$NON-NLS-1$ > consumeVariableInitializers(); > break; > >- case 229 : if (DEBUG) { System.out.println("Block ::= OpenBlock LBRACE BlockStatementsopt RBRACE"); } //$NON-NLS-1$ >+ case 254 : if (DEBUG) { System.out.println("Block ::= OpenBlock LBRACE BlockStatementsopt RBRACE"); } //$NON-NLS-1$ > consumeBlock(); > break; > >- case 230 : if (DEBUG) { System.out.println("OpenBlock ::="); } //$NON-NLS-1$ >+ case 255 : if (DEBUG) { System.out.println("OpenBlock ::="); } //$NON-NLS-1$ > consumeOpenBlock() ; > break; > >- case 232 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatements BlockStatement"); } //$NON-NLS-1$ >+ case 257 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatements BlockStatement"); } //$NON-NLS-1$ > consumeBlockStatements() ; > break; > >- case 236 : if (DEBUG) { System.out.println("BlockStatement ::= InterfaceDeclaration"); } //$NON-NLS-1$ >+ case 261 : if (DEBUG) { System.out.println("BlockStatement ::= InterfaceDeclaration"); } //$NON-NLS-1$ > consumeInvalidInterfaceDeclaration(); > break; > >- case 237 : if (DEBUG) { System.out.println("BlockStatement ::= AnnotationTypeDeclaration"); } //$NON-NLS-1$ >+ case 262 : if (DEBUG) { System.out.println("BlockStatement ::= AnnotationTypeDeclaration"); } //$NON-NLS-1$ > consumeInvalidAnnotationTypeDeclaration(); > break; > >- case 238 : if (DEBUG) { System.out.println("BlockStatement ::= EnumDeclaration"); } //$NON-NLS-1$ >+ case 263 : if (DEBUG) { System.out.println("BlockStatement ::= EnumDeclaration"); } //$NON-NLS-1$ > consumeInvalidEnumDeclaration(); > break; > >- case 239 : if (DEBUG) { System.out.println("LocalVariableDeclarationStatement ::=..."); } //$NON-NLS-1$ >+ case 264 : if (DEBUG) { System.out.println("LocalVariableDeclarationStatement ::=..."); } //$NON-NLS-1$ > consumeLocalVariableDeclarationStatement(); > break; > >- case 240 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Type PushModifiers..."); } //$NON-NLS-1$ >+ case 265 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Type PushModifiers..."); } //$NON-NLS-1$ > consumeLocalVariableDeclaration(); > break; > >- case 241 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Modifiers Type..."); } //$NON-NLS-1$ >+ case 266 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Modifiers Type..."); } //$NON-NLS-1$ > consumeLocalVariableDeclaration(); > break; > >- case 242 : if (DEBUG) { System.out.println("PushModifiers ::="); } //$NON-NLS-1$ >+ case 267 : if (DEBUG) { System.out.println("PushModifiers ::="); } //$NON-NLS-1$ > consumePushModifiers(); > break; > >- case 243 : if (DEBUG) { System.out.println("PushModifiersForHeader ::="); } //$NON-NLS-1$ >+ case 268 : if (DEBUG) { System.out.println("PushModifiersForHeader ::="); } //$NON-NLS-1$ > consumePushModifiersForHeader(); > break; > >- case 244 : if (DEBUG) { System.out.println("PushRealModifiers ::="); } //$NON-NLS-1$ >+ case 269 : if (DEBUG) { System.out.println("PushRealModifiers ::="); } //$NON-NLS-1$ > consumePushRealModifiers(); > break; > >- case 270 : if (DEBUG) { System.out.println("EmptyStatement ::= SEMICOLON"); } //$NON-NLS-1$ >+ case 295 : if (DEBUG) { System.out.println("EmptyStatement ::= SEMICOLON"); } //$NON-NLS-1$ > consumeEmptyStatement(); > break; > >- case 271 : if (DEBUG) { System.out.println("LabeledStatement ::= Label COLON Statement"); } //$NON-NLS-1$ >+ case 296 : if (DEBUG) { System.out.println("LabeledStatement ::= Label COLON Statement"); } //$NON-NLS-1$ > consumeStatementLabel() ; > break; > >- case 272 : if (DEBUG) { System.out.println("LabeledStatementNoShortIf ::= Label COLON..."); } //$NON-NLS-1$ >+ case 297 : if (DEBUG) { System.out.println("LabeledStatementNoShortIf ::= Label COLON..."); } //$NON-NLS-1$ > consumeStatementLabel() ; > break; > >- case 273 : if (DEBUG) { System.out.println("Label ::= Identifier"); } //$NON-NLS-1$ >+ case 298 : if (DEBUG) { System.out.println("Label ::= Identifier"); } //$NON-NLS-1$ > consumeLabel() ; > break; > >- case 274 : if (DEBUG) { System.out.println("ExpressionStatement ::= StatementExpression SEMICOLON"); } //$NON-NLS-1$ >+ case 299 : if (DEBUG) { System.out.println("ExpressionStatement ::= StatementExpression SEMICOLON"); } //$NON-NLS-1$ > consumeExpressionStatement(); > break; > >- case 283 : if (DEBUG) { System.out.println("IfThenStatement ::= if LPAREN Expression RPAREN..."); } //$NON-NLS-1$ >+ case 308 : if (DEBUG) { System.out.println("IfThenStatement ::= if LPAREN Expression RPAREN..."); } //$NON-NLS-1$ > consumeStatementIfNoElse(); > break; > >- case 284 : if (DEBUG) { System.out.println("IfThenElseStatement ::= if LPAREN Expression RPAREN..."); } //$NON-NLS-1$ >+ case 309 : if (DEBUG) { System.out.println("IfThenElseStatement ::= if LPAREN Expression RPAREN..."); } //$NON-NLS-1$ > consumeStatementIfWithElse(); > break; > >- case 285 : if (DEBUG) { System.out.println("IfThenElseStatementNoShortIf ::= if LPAREN Expression..."); } //$NON-NLS-1$ >+ case 310 : if (DEBUG) { System.out.println("IfThenElseStatementNoShortIf ::= if LPAREN Expression..."); } //$NON-NLS-1$ > consumeStatementIfWithElse(); > break; > >- case 286 : if (DEBUG) { System.out.println("SwitchStatement ::= switch LPAREN Expression RPAREN..."); } //$NON-NLS-1$ >+ case 311 : if (DEBUG) { System.out.println("SwitchStatement ::= switch LPAREN Expression RPAREN..."); } //$NON-NLS-1$ > consumeStatementSwitch() ; > break; > >- case 287 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE RBRACE"); } //$NON-NLS-1$ >+ case 312 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE RBRACE"); } //$NON-NLS-1$ > consumeEmptySwitchBlock() ; > break; > >- case 290 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE SwitchBlockStatements..."); } //$NON-NLS-1$ >+ case 315 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE SwitchBlockStatements..."); } //$NON-NLS-1$ > consumeSwitchBlock() ; > break; > >- case 292 : if (DEBUG) { System.out.println("SwitchBlockStatements ::= SwitchBlockStatements..."); } //$NON-NLS-1$ >+ case 317 : if (DEBUG) { System.out.println("SwitchBlockStatements ::= SwitchBlockStatements..."); } //$NON-NLS-1$ > consumeSwitchBlockStatements() ; > break; > >- case 293 : if (DEBUG) { System.out.println("SwitchBlockStatement ::= SwitchLabels BlockStatements"); } //$NON-NLS-1$ >+ case 318 : if (DEBUG) { System.out.println("SwitchBlockStatement ::= SwitchLabels BlockStatements"); } //$NON-NLS-1$ > consumeSwitchBlockStatement() ; > break; > >- case 295 : if (DEBUG) { System.out.println("SwitchLabels ::= SwitchLabels SwitchLabel"); } //$NON-NLS-1$ >+ case 320 : if (DEBUG) { System.out.println("SwitchLabels ::= SwitchLabels SwitchLabel"); } //$NON-NLS-1$ > consumeSwitchLabels() ; > break; > >- case 296 : if (DEBUG) { System.out.println("SwitchLabel ::= case ConstantExpression COLON"); } //$NON-NLS-1$ >+ case 321 : if (DEBUG) { System.out.println("SwitchLabel ::= case ConstantExpression COLON"); } //$NON-NLS-1$ > consumeCaseLabel(); > break; > >- case 297 : if (DEBUG) { System.out.println("SwitchLabel ::= default COLON"); } //$NON-NLS-1$ >+ case 322 : if (DEBUG) { System.out.println("SwitchLabel ::= default COLON"); } //$NON-NLS-1$ > consumeDefaultLabel(); > break; > >- case 298 : if (DEBUG) { System.out.println("WhileStatement ::= while LPAREN Expression RPAREN..."); } //$NON-NLS-1$ >+ case 323 : if (DEBUG) { System.out.println("WhileStatement ::= while LPAREN Expression RPAREN..."); } //$NON-NLS-1$ > consumeStatementWhile() ; > break; > >- case 299 : if (DEBUG) { System.out.println("WhileStatementNoShortIf ::= while LPAREN Expression..."); } //$NON-NLS-1$ >+ case 324 : if (DEBUG) { System.out.println("WhileStatementNoShortIf ::= while LPAREN Expression..."); } //$NON-NLS-1$ > consumeStatementWhile() ; > break; > >- case 300 : if (DEBUG) { System.out.println("DoStatement ::= do Statement while LPAREN Expression..."); } //$NON-NLS-1$ >+ case 325 : if (DEBUG) { System.out.println("DoStatement ::= do Statement while LPAREN Expression..."); } //$NON-NLS-1$ > consumeStatementDo() ; > break; > >- case 301 : if (DEBUG) { System.out.println("ForStatement ::= for LPAREN ForInitopt SEMICOLON..."); } //$NON-NLS-1$ >+ case 326 : if (DEBUG) { System.out.println("ForStatement ::= for LPAREN ForInitopt SEMICOLON..."); } //$NON-NLS-1$ > consumeStatementFor() ; > break; > >- case 302 : if (DEBUG) { System.out.println("ForStatementNoShortIf ::= for LPAREN ForInitopt..."); } //$NON-NLS-1$ >+ case 327 : if (DEBUG) { System.out.println("ForStatementNoShortIf ::= for LPAREN ForInitopt..."); } //$NON-NLS-1$ > consumeStatementFor() ; > break; > >- case 303 : if (DEBUG) { System.out.println("ForInit ::= StatementExpressionList"); } //$NON-NLS-1$ >+ case 328 : if (DEBUG) { System.out.println("ForInit ::= StatementExpressionList"); } //$NON-NLS-1$ > consumeForInit() ; > break; > >- case 307 : if (DEBUG) { System.out.println("StatementExpressionList ::= StatementExpressionList..."); } //$NON-NLS-1$ >+ case 332 : if (DEBUG) { System.out.println("StatementExpressionList ::= StatementExpressionList..."); } //$NON-NLS-1$ > consumeStatementExpressionList() ; > break; > >- case 308 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression SEMICOLON"); } //$NON-NLS-1$ >+ case 333 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression SEMICOLON"); } //$NON-NLS-1$ > consumeSimpleAssertStatement() ; > break; > >- case 309 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression COLON Expression"); } //$NON-NLS-1$ >+ case 334 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression COLON Expression"); } //$NON-NLS-1$ > consumeAssertStatement() ; > break; > >- case 310 : if (DEBUG) { System.out.println("BreakStatement ::= break SEMICOLON"); } //$NON-NLS-1$ >+ case 335 : if (DEBUG) { System.out.println("BreakStatement ::= break SEMICOLON"); } //$NON-NLS-1$ > consumeStatementBreak() ; > break; > >- case 311 : if (DEBUG) { System.out.println("BreakStatement ::= break Identifier SEMICOLON"); } //$NON-NLS-1$ >+ case 336 : if (DEBUG) { System.out.println("BreakStatement ::= break Identifier SEMICOLON"); } //$NON-NLS-1$ > consumeStatementBreakWithLabel() ; > break; > >- case 312 : if (DEBUG) { System.out.println("ContinueStatement ::= continue SEMICOLON"); } //$NON-NLS-1$ >+ case 337 : if (DEBUG) { System.out.println("ContinueStatement ::= continue SEMICOLON"); } //$NON-NLS-1$ > consumeStatementContinue() ; > break; > >- case 313 : if (DEBUG) { System.out.println("ContinueStatement ::= continue Identifier SEMICOLON"); } //$NON-NLS-1$ >+ case 338 : if (DEBUG) { System.out.println("ContinueStatement ::= continue Identifier SEMICOLON"); } //$NON-NLS-1$ > consumeStatementContinueWithLabel() ; > break; > >- case 314 : if (DEBUG) { System.out.println("ReturnStatement ::= return Expressionopt SEMICOLON"); } //$NON-NLS-1$ >+ case 339 : if (DEBUG) { System.out.println("ReturnStatement ::= return Expressionopt SEMICOLON"); } //$NON-NLS-1$ > consumeStatementReturn() ; > break; > >- case 315 : if (DEBUG) { System.out.println("ThrowStatement ::= throw Expression SEMICOLON"); } //$NON-NLS-1$ >+ case 340 : if (DEBUG) { System.out.println("ThrowStatement ::= throw Expression SEMICOLON"); } //$NON-NLS-1$ > consumeStatementThrow(); > break; > >- case 316 : if (DEBUG) { System.out.println("SynchronizedStatement ::= OnlySynchronized LPAREN..."); } //$NON-NLS-1$ >+ case 341 : if (DEBUG) { System.out.println("SynchronizedStatement ::= OnlySynchronized LPAREN..."); } //$NON-NLS-1$ > consumeStatementSynchronized(); > break; > >- case 317 : if (DEBUG) { System.out.println("OnlySynchronized ::= synchronized"); } //$NON-NLS-1$ >+ case 342 : if (DEBUG) { System.out.println("OnlySynchronized ::= synchronized"); } //$NON-NLS-1$ > consumeOnlySynchronized(); > break; > >- case 318 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catches"); } //$NON-NLS-1$ >+ case 343 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catches"); } //$NON-NLS-1$ > consumeStatementTry(false); > break; > >- case 319 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catchesopt Finally"); } //$NON-NLS-1$ >+ case 344 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catchesopt Finally"); } //$NON-NLS-1$ > consumeStatementTry(true); > break; > >- case 321 : if (DEBUG) { System.out.println("ExitTryBlock ::="); } //$NON-NLS-1$ >+ case 346 : if (DEBUG) { System.out.println("ExitTryBlock ::="); } //$NON-NLS-1$ > consumeExitTryBlock(); > break; > >- case 323 : if (DEBUG) { System.out.println("Catches ::= Catches CatchClause"); } //$NON-NLS-1$ >+ case 348 : if (DEBUG) { System.out.println("Catches ::= Catches CatchClause"); } //$NON-NLS-1$ > consumeCatches(); > break; > >- case 324 : if (DEBUG) { System.out.println("CatchClause ::= catch LPAREN FormalParameter RPAREN..."); } //$NON-NLS-1$ >+ case 349 : if (DEBUG) { System.out.println("CatchClause ::= catch LPAREN FormalParameter RPAREN..."); } //$NON-NLS-1$ > consumeStatementCatch() ; > break; > >- case 326 : if (DEBUG) { System.out.println("PushLPAREN ::= LPAREN"); } //$NON-NLS-1$ >+ case 351 : if (DEBUG) { System.out.println("PushLPAREN ::= LPAREN"); } //$NON-NLS-1$ > consumeLeftParen(); > break; > >- case 327 : if (DEBUG) { System.out.println("PushRPAREN ::= RPAREN"); } //$NON-NLS-1$ >+ case 352 : if (DEBUG) { System.out.println("PushRPAREN ::= RPAREN"); } //$NON-NLS-1$ > consumeRightParen(); > break; > >- case 332 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= this"); } //$NON-NLS-1$ >+ case 357 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= this"); } //$NON-NLS-1$ > consumePrimaryNoNewArrayThis(); > break; > >- case 333 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Expression_NotName..."); } //$NON-NLS-1$ >+ case 358 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Expression_NotName..."); } //$NON-NLS-1$ > consumePrimaryNoNewArray(); > break; > >- case 334 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Name PushRPAREN"); } //$NON-NLS-1$ >+ case 359 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Name PushRPAREN"); } //$NON-NLS-1$ > consumePrimaryNoNewArrayWithName(); > break; > >- case 337 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT this"); } //$NON-NLS-1$ >+ case 362 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT this"); } //$NON-NLS-1$ > consumePrimaryNoNewArrayNameThis(); > break; > >- case 338 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT super"); } //$NON-NLS-1$ >+ case 363 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT super"); } //$NON-NLS-1$ > consumePrimaryNoNewArrayNameSuper(); > break; > >- case 339 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT class"); } //$NON-NLS-1$ >+ case 364 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT class"); } //$NON-NLS-1$ > consumePrimaryNoNewArrayName(); > break; > >- case 340 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name Dims DOT class"); } //$NON-NLS-1$ >+ case 365 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name Dims DOT class"); } //$NON-NLS-1$ > consumePrimaryNoNewArrayArrayType(); > break; > >- case 341 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType Dims DOT class"); } //$NON-NLS-1$ >+ case 366 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType Dims DOT class"); } //$NON-NLS-1$ > consumePrimaryNoNewArrayPrimitiveArrayType(); > break; > >- case 342 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType DOT class"); } //$NON-NLS-1$ >+ case 367 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType DOT class"); } //$NON-NLS-1$ > consumePrimaryNoNewArrayPrimitiveType(); > break; > >- case 345 : if (DEBUG) { System.out.println("AllocationHeader ::= new ClassType LPAREN..."); } //$NON-NLS-1$ >+ case 370 : if (DEBUG) { System.out.println("AllocationHeader ::= new ClassType LPAREN..."); } //$NON-NLS-1$ > consumeAllocationHeader(); > break; > >- case 346 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new..."); } //$NON-NLS-1$ >+ case 371 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new..."); } //$NON-NLS-1$ > consumeClassInstanceCreationExpressionWithTypeArguments(); > break; > >- case 347 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new ClassType LPAREN"); } //$NON-NLS-1$ >+ case 372 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new ClassType LPAREN"); } //$NON-NLS-1$ > consumeClassInstanceCreationExpression(); > break; > >- case 348 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); } //$NON-NLS-1$ >+ case 373 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); } //$NON-NLS-1$ > consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ; > break; > >- case 349 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); } //$NON-NLS-1$ >+ case 374 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); } //$NON-NLS-1$ > consumeClassInstanceCreationExpressionQualified() ; > break; > >- case 350 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); } //$NON-NLS-1$ >+ case 375 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); } //$NON-NLS-1$ > consumeClassInstanceCreationExpressionQualified() ; > break; > >- case 351 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); } //$NON-NLS-1$ >+ case 376 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); } //$NON-NLS-1$ > consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ; > break; > >- case 352 : if (DEBUG) { System.out.println("ClassInstanceCreationExpressionName ::= Name DOT"); } //$NON-NLS-1$ >+ case 377 : if (DEBUG) { System.out.println("ClassInstanceCreationExpressionName ::= Name DOT"); } //$NON-NLS-1$ > consumeClassInstanceCreationExpressionName() ; > break; > >- case 353 : if (DEBUG) { System.out.println("UnqualifiedClassBodyopt ::="); } //$NON-NLS-1$ >+ case 378 : if (DEBUG) { System.out.println("UnqualifiedClassBodyopt ::="); } //$NON-NLS-1$ > consumeClassBodyopt(); > break; > >- case 355 : if (DEBUG) { System.out.println("UnqualifiedEnterAnonymousClassBody ::="); } //$NON-NLS-1$ >+ case 380 : if (DEBUG) { System.out.println("UnqualifiedEnterAnonymousClassBody ::="); } //$NON-NLS-1$ > consumeEnterAnonymousClassBody(false); > break; > >- case 356 : if (DEBUG) { System.out.println("QualifiedClassBodyopt ::="); } //$NON-NLS-1$ >+ case 381 : if (DEBUG) { System.out.println("QualifiedClassBodyopt ::="); } //$NON-NLS-1$ > consumeClassBodyopt(); > break; > >- case 358 : if (DEBUG) { System.out.println("QualifiedEnterAnonymousClassBody ::="); } //$NON-NLS-1$ >+ case 383 : if (DEBUG) { System.out.println("QualifiedEnterAnonymousClassBody ::="); } //$NON-NLS-1$ > consumeEnterAnonymousClassBody(true); > break; > >- case 360 : if (DEBUG) { System.out.println("ArgumentList ::= ArgumentList COMMA Expression"); } //$NON-NLS-1$ >+ case 385 : if (DEBUG) { System.out.println("ArgumentList ::= ArgumentList COMMA Expression"); } //$NON-NLS-1$ > consumeArgumentList(); > break; > >- case 361 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new PrimitiveType..."); } //$NON-NLS-1$ >+ case 386 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new PrimitiveType..."); } //$NON-NLS-1$ >+ consumeArrayCreationHeader(); >+ break; >+ >+ case 387 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new OneOrMoreAnnotations..."); } //$NON-NLS-1$ >+ consumeArrayCreationHeader(); >+ break; >+ >+ case 388 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new ClassOrInterfaceType..."); } //$NON-NLS-1$ > consumeArrayCreationHeader(); > break; > >- case 362 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new ClassOrInterfaceType..."); } //$NON-NLS-1$ >+ case 389 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new OneOrMoreAnnotations..."); } //$NON-NLS-1$ > consumeArrayCreationHeader(); > break; > >- case 363 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$ >- consumeArrayCreationExpressionWithoutInitializer(); >+ case 390 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$ >+ consumeArrayCreationExpressionWithoutInitializer(false); >+ break; >+ >+ case 391 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$ >+ consumeArrayCreationExpressionWithoutInitializer(true); >+ break; >+ >+ case 392 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new PrimitiveType"); } //$NON-NLS-1$ >+ consumeArrayCreationExpressionWithInitializer(false); >+ break; >+ >+ case 393 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new..."); } //$NON-NLS-1$ >+ consumeArrayCreationExpressionWithInitializer(true); > break; > >- case 364 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new PrimitiveType"); } //$NON-NLS-1$ >- consumeArrayCreationExpressionWithInitializer(); >+ case 394 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$ >+ consumeArrayCreationExpressionWithoutInitializer(false); > break; > >- case 365 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$ >- consumeArrayCreationExpressionWithoutInitializer(); >+ case 395 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$ >+ consumeArrayCreationExpressionWithoutInitializer(true); > break; > >- case 366 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new..."); } //$NON-NLS-1$ >- consumeArrayCreationExpressionWithInitializer(); >+ case 396 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new..."); } //$NON-NLS-1$ >+ consumeArrayCreationExpressionWithInitializer(false); > break; > >- case 368 : if (DEBUG) { System.out.println("DimWithOrWithOutExprs ::= DimWithOrWithOutExprs..."); } //$NON-NLS-1$ >+ case 397 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new..."); } //$NON-NLS-1$ >+ consumeArrayCreationExpressionWithInitializer(true); >+ break; >+ >+ case 399 : if (DEBUG) { System.out.println("DimWithOrWithOutExprs ::= DimWithOrWithOutExprs..."); } //$NON-NLS-1$ > consumeDimWithOrWithOutExprs(); > break; > >- case 370 : if (DEBUG) { System.out.println("DimWithOrWithOutExpr ::= LBRACKET RBRACKET"); } //$NON-NLS-1$ >- consumeDimWithOrWithOutExpr(); >+ case 402 : if (DEBUG) { System.out.println("DimWithOrWithOutExpr ::= LBRACKET..."); } //$NON-NLS-1$ >+ consumeDimWithOutExpr(); >+ break; >+ >+ case 403 : if (DEBUG) { System.out.println("DimWithOrWithOutExpr ::= OneOrMoreAnnotations LBRACKET"); } //$NON-NLS-1$ >+ consumeDimWithOutExpr(); > break; > >- case 371 : if (DEBUG) { System.out.println("Dims ::= DimsLoop"); } //$NON-NLS-1$ >+ case 404 : if (DEBUG) { System.out.println("DimsoptAnnotsopt ::="); } //$NON-NLS-1$ >+ consumeEmptyDimsoptAnnotsopt(); >+ break; >+ >+ case 405 : if (DEBUG) { System.out.println("DimsoptAnnotsopt -> DimsAnnotLoop"); } //$NON-NLS-1$ >+ consumeDimsWithTrailingAnnotsopt(); >+ break; >+ >+ case 408 : if (DEBUG) { System.out.println("OneDimOrAnnot ::= Annotation"); } //$NON-NLS-1$ >+ consumeTypeAnnotation(true); >+ break; >+ >+ case 409 : if (DEBUG) { System.out.println("OneDimOrAnnot ::= LBRACKET RBRACKET"); } //$NON-NLS-1$ >+ consumeOneDimLoop(true); >+ break; >+ >+ case 410 : if (DEBUG) { System.out.println("OneOrMoreAnnotations ::= Annotation"); } //$NON-NLS-1$ >+ consumeTypeAnnotation(false); >+ break; >+ >+ case 411 : if (DEBUG) { System.out.println("OneOrMoreAnnotations ::= OneOrMoreAnnotations..."); } //$NON-NLS-1$ >+ consumeOneMoreTypeAnnotation(); >+ break; >+ >+ case 412 : if (DEBUG) { System.out.println("Dims ::= DimsLoop"); } //$NON-NLS-1$ > consumeDims(); > break; > >- case 374 : if (DEBUG) { System.out.println("OneDimLoop ::= LBRACKET RBRACKET"); } //$NON-NLS-1$ >- consumeOneDimLoop(); >+ case 415 : if (DEBUG) { System.out.println("OneDimLoop ::= LBRACKET RBRACKET"); } //$NON-NLS-1$ >+ consumeOneDimLoop(false); > break; > >- case 375 : if (DEBUG) { System.out.println("FieldAccess ::= Primary DOT Identifier"); } //$NON-NLS-1$ >+ case 416 : if (DEBUG) { System.out.println("OneDimLoop ::= OneOrMoreAnnotations LBRACKET RBRACKET"); } //$NON-NLS-1$ >+ consumeOneDimLoopWithAnnotations(); >+ break; >+ >+ case 417 : if (DEBUG) { System.out.println("FieldAccess ::= Primary DOT Identifier"); } //$NON-NLS-1$ > consumeFieldAccess(false); > break; > >- case 376 : if (DEBUG) { System.out.println("FieldAccess ::= super DOT Identifier"); } //$NON-NLS-1$ >+ case 418 : if (DEBUG) { System.out.println("FieldAccess ::= super DOT Identifier"); } //$NON-NLS-1$ > consumeFieldAccess(true); > break; > >- case 377 : if (DEBUG) { System.out.println("MethodInvocation ::= Name LPAREN ArgumentListopt RPAREN"); } //$NON-NLS-1$ >+ case 419 : if (DEBUG) { System.out.println("MethodInvocation ::= Name LPAREN ArgumentListopt RPAREN"); } //$NON-NLS-1$ > consumeMethodInvocationName(); > break; > >- case 378 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT OnlyTypeArguments..."); } //$NON-NLS-1$ >+ case 420 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT OnlyTypeArguments..."); } //$NON-NLS-1$ > consumeMethodInvocationNameWithTypeArguments(); > break; > >- case 379 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT OnlyTypeArguments..."); } //$NON-NLS-1$ >+ case 421 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT OnlyTypeArguments..."); } //$NON-NLS-1$ > consumeMethodInvocationPrimaryWithTypeArguments(); > break; > >- case 380 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT Identifier LPAREN..."); } //$NON-NLS-1$ >+ case 422 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT Identifier LPAREN..."); } //$NON-NLS-1$ > consumeMethodInvocationPrimary(); > break; > >- case 381 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT OnlyTypeArguments..."); } //$NON-NLS-1$ >+ case 423 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT OnlyTypeArguments..."); } //$NON-NLS-1$ > consumeMethodInvocationSuperWithTypeArguments(); > break; > >- case 382 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT Identifier LPAREN..."); } //$NON-NLS-1$ >+ case 424 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT Identifier LPAREN..."); } //$NON-NLS-1$ > consumeMethodInvocationSuper(); > break; > >- case 383 : if (DEBUG) { System.out.println("ArrayAccess ::= Name LBRACKET Expression RBRACKET"); } //$NON-NLS-1$ >+ case 425 : if (DEBUG) { System.out.println("ArrayAccess ::= Name LBRACKET Expression RBRACKET"); } //$NON-NLS-1$ > consumeArrayAccess(true); > break; > >- case 384 : if (DEBUG) { System.out.println("ArrayAccess ::= PrimaryNoNewArray LBRACKET Expression..."); } //$NON-NLS-1$ >+ case 426 : if (DEBUG) { System.out.println("ArrayAccess ::= PrimaryNoNewArray LBRACKET Expression..."); } //$NON-NLS-1$ > consumeArrayAccess(false); > break; > >- case 385 : if (DEBUG) { System.out.println("ArrayAccess ::= ArrayCreationWithArrayInitializer..."); } //$NON-NLS-1$ >+ case 427 : if (DEBUG) { System.out.println("ArrayAccess ::= ArrayCreationWithArrayInitializer..."); } //$NON-NLS-1$ > consumeArrayAccess(false); > break; > >- case 387 : if (DEBUG) { System.out.println("PostfixExpression ::= Name"); } //$NON-NLS-1$ >+ case 429 : if (DEBUG) { System.out.println("PostfixExpression ::= Name"); } //$NON-NLS-1$ > consumePostfixExpression(); > break; > >- case 390 : if (DEBUG) { System.out.println("PostIncrementExpression ::= PostfixExpression PLUS_PLUS"); } //$NON-NLS-1$ >+ case 432 : if (DEBUG) { System.out.println("PostIncrementExpression ::= PostfixExpression PLUS_PLUS"); } //$NON-NLS-1$ > consumeUnaryExpression(OperatorIds.PLUS,true); > break; > >- case 391 : if (DEBUG) { System.out.println("PostDecrementExpression ::= PostfixExpression..."); } //$NON-NLS-1$ >+ case 433 : if (DEBUG) { System.out.println("PostDecrementExpression ::= PostfixExpression..."); } //$NON-NLS-1$ > consumeUnaryExpression(OperatorIds.MINUS,true); > break; > >- case 392 : if (DEBUG) { System.out.println("PushPosition ::="); } //$NON-NLS-1$ >+ case 434 : if (DEBUG) { System.out.println("PushPosition ::="); } //$NON-NLS-1$ > consumePushPosition(); > break; > >- case 395 : if (DEBUG) { System.out.println("UnaryExpression ::= PLUS PushPosition UnaryExpression"); } //$NON-NLS-1$ >+ case 437 : if (DEBUG) { System.out.println("UnaryExpression ::= PLUS PushPosition UnaryExpression"); } //$NON-NLS-1$ > consumeUnaryExpression(OperatorIds.PLUS); > break; > >- case 396 : if (DEBUG) { System.out.println("UnaryExpression ::= MINUS PushPosition UnaryExpression"); } //$NON-NLS-1$ >+ case 438 : if (DEBUG) { System.out.println("UnaryExpression ::= MINUS PushPosition UnaryExpression"); } //$NON-NLS-1$ > consumeUnaryExpression(OperatorIds.MINUS); > break; > >- case 398 : if (DEBUG) { System.out.println("PreIncrementExpression ::= PLUS_PLUS PushPosition..."); } //$NON-NLS-1$ >+ case 440 : if (DEBUG) { System.out.println("PreIncrementExpression ::= PLUS_PLUS PushPosition..."); } //$NON-NLS-1$ > consumeUnaryExpression(OperatorIds.PLUS,false); > break; > >- case 399 : if (DEBUG) { System.out.println("PreDecrementExpression ::= MINUS_MINUS PushPosition..."); } //$NON-NLS-1$ >+ case 441 : if (DEBUG) { System.out.println("PreDecrementExpression ::= MINUS_MINUS PushPosition..."); } //$NON-NLS-1$ > consumeUnaryExpression(OperatorIds.MINUS,false); > break; > >- case 401 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= TWIDDLE PushPosition..."); } //$NON-NLS-1$ >+ case 443 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= TWIDDLE PushPosition..."); } //$NON-NLS-1$ > consumeUnaryExpression(OperatorIds.TWIDDLE); > break; > >- case 402 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= NOT PushPosition..."); } //$NON-NLS-1$ >+ case 444 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= NOT PushPosition..."); } //$NON-NLS-1$ > consumeUnaryExpression(OperatorIds.NOT); > break; > >- case 404 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN PrimitiveType Dimsopt..."); } //$NON-NLS-1$ >- consumeCastExpressionWithPrimitiveType(); >+ case 446 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN PrimitiveType Dimsopt..."); } //$NON-NLS-1$ >+ consumeCastExpressionWithPrimitiveType(false); > break; > >- case 405 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); } //$NON-NLS-1$ >- consumeCastExpressionWithGenericsArray(); >+ case 447 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN OneOrMoreAnnotations..."); } //$NON-NLS-1$ >+ consumeCastExpressionWithPrimitiveType(true); > break; > >- case 406 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); } //$NON-NLS-1$ >- consumeCastExpressionWithQualifiedGenericsArray(); >+ case 448 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); } //$NON-NLS-1$ >+ consumeCastExpressionWithGenericsArray(false); > break; > >- case 407 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name PushRPAREN..."); } //$NON-NLS-1$ >- consumeCastExpressionLL1(); >+ case 449 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN OneOrMoreAnnotations Name"); } //$NON-NLS-1$ >+ consumeCastExpressionWithGenericsArray(true); > break; > >- case 408 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name Dims PushRPAREN..."); } //$NON-NLS-1$ >- consumeCastExpressionWithNameArray(); >+ case 450 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); } //$NON-NLS-1$ >+ consumeCastExpressionWithQualifiedGenericsArray(false); > break; > >- case 409 : if (DEBUG) { System.out.println("OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments"); } //$NON-NLS-1$ >+ case 451 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN OneOrMoreAnnotations Name"); } //$NON-NLS-1$ >+ consumeCastExpressionWithQualifiedGenericsArray(true); >+ break; >+ >+ case 452 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name PushRPAREN..."); } //$NON-NLS-1$ >+ consumeCastExpressionLL1(false); >+ break; >+ >+ case 453 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN OneOrMoreAnnotations Name"); } //$NON-NLS-1$ >+ consumeCastExpressionLL1(true); >+ break; >+ >+ case 454 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name Dims PushRPAREN..."); } //$NON-NLS-1$ >+ consumeCastExpressionWithNameArray(false); >+ break; >+ >+ case 455 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN OneOrMoreAnnotations Name"); } //$NON-NLS-1$ >+ consumeCastExpressionWithNameArray(true); >+ break; >+ >+ case 456 : if (DEBUG) { System.out.println("OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments"); } //$NON-NLS-1$ > consumeOnlyTypeArgumentsForCastExpression(); > break; > >- case 410 : if (DEBUG) { System.out.println("InsideCastExpression ::="); } //$NON-NLS-1$ >+ case 457 : if (DEBUG) { System.out.println("InsideCastExpression ::="); } //$NON-NLS-1$ > consumeInsideCastExpression(); > break; > >- case 411 : if (DEBUG) { System.out.println("InsideCastExpressionLL1 ::="); } //$NON-NLS-1$ >+ case 458 : if (DEBUG) { System.out.println("InsideCastExpressionLL1 ::="); } //$NON-NLS-1$ > consumeInsideCastExpressionLL1(); > break; > >- case 412 : if (DEBUG) { System.out.println("InsideCastExpressionWithQualifiedGenerics ::="); } //$NON-NLS-1$ >+ case 459 : if (DEBUG) { System.out.println("InsideCastExpressionWithQualifiedGenerics ::="); } //$NON-NLS-1$ > consumeInsideCastExpressionWithQualifiedGenerics(); > break; > >- case 414 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$ >+ case 461 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.MULTIPLY); > break; > >- case 415 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$ >+ case 462 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.DIVIDE); > break; > >- case 416 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$ >+ case 463 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.REMAINDER); > break; > >- case 418 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression PLUS..."); } //$NON-NLS-1$ >+ case 465 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression PLUS..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.PLUS); > break; > >- case 419 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression MINUS..."); } //$NON-NLS-1$ >+ case 466 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression MINUS..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.MINUS); > break; > >- case 421 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression LEFT_SHIFT..."); } //$NON-NLS-1$ >+ case 468 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression LEFT_SHIFT..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.LEFT_SHIFT); > break; > >- case 422 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression RIGHT_SHIFT..."); } //$NON-NLS-1$ >+ case 469 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression RIGHT_SHIFT..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.RIGHT_SHIFT); > break; > >- case 423 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$ >+ case 470 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT); > break; > >- case 425 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS..."); } //$NON-NLS-1$ >+ case 472 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.LESS); > break; > >- case 426 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression GREATER..."); } //$NON-NLS-1$ >+ case 473 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression GREATER..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.GREATER); > break; > >- case 427 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS_EQUAL"); } //$NON-NLS-1$ >+ case 474 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS_EQUAL"); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.LESS_EQUAL); > break; > >- case 428 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression..."); } //$NON-NLS-1$ >+ case 475 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.GREATER_EQUAL); > break; > >- case 430 : if (DEBUG) { System.out.println("InstanceofExpression ::= InstanceofExpression instanceof"); } //$NON-NLS-1$ >+ case 477 : if (DEBUG) { System.out.println("InstanceofExpression ::= InstanceofExpression instanceof"); } //$NON-NLS-1$ > consumeInstanceOfExpression(); > break; > >- case 432 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression EQUAL_EQUAL..."); } //$NON-NLS-1$ >+ case 478 : if (DEBUG) { System.out.println("InstanceofExpression ::= InstanceofExpression instanceof"); } //$NON-NLS-1$ >+ consumeInstanceOfExpression(); >+ break; >+ >+ case 480 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression EQUAL_EQUAL..."); } //$NON-NLS-1$ > consumeEqualityExpression(OperatorIds.EQUAL_EQUAL); > break; > >- case 433 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression NOT_EQUAL..."); } //$NON-NLS-1$ >+ case 481 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression NOT_EQUAL..."); } //$NON-NLS-1$ > consumeEqualityExpression(OperatorIds.NOT_EQUAL); > break; > >- case 435 : if (DEBUG) { System.out.println("AndExpression ::= AndExpression AND EqualityExpression"); } //$NON-NLS-1$ >+ case 483 : if (DEBUG) { System.out.println("AndExpression ::= AndExpression AND EqualityExpression"); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.AND); > break; > >- case 437 : if (DEBUG) { System.out.println("ExclusiveOrExpression ::= ExclusiveOrExpression XOR..."); } //$NON-NLS-1$ >+ case 485 : if (DEBUG) { System.out.println("ExclusiveOrExpression ::= ExclusiveOrExpression XOR..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.XOR); > break; > >- case 439 : if (DEBUG) { System.out.println("InclusiveOrExpression ::= InclusiveOrExpression OR..."); } //$NON-NLS-1$ >+ case 487 : if (DEBUG) { System.out.println("InclusiveOrExpression ::= InclusiveOrExpression OR..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.OR); > break; > >- case 441 : if (DEBUG) { System.out.println("ConditionalAndExpression ::= ConditionalAndExpression..."); } //$NON-NLS-1$ >+ case 489 : if (DEBUG) { System.out.println("ConditionalAndExpression ::= ConditionalAndExpression..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.AND_AND); > break; > >- case 443 : if (DEBUG) { System.out.println("ConditionalOrExpression ::= ConditionalOrExpression..."); } //$NON-NLS-1$ >+ case 491 : if (DEBUG) { System.out.println("ConditionalOrExpression ::= ConditionalOrExpression..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.OR_OR); > break; > >- case 445 : if (DEBUG) { System.out.println("ConditionalExpression ::= ConditionalOrExpression..."); } //$NON-NLS-1$ >+ case 493 : if (DEBUG) { System.out.println("ConditionalExpression ::= ConditionalOrExpression..."); } //$NON-NLS-1$ > consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ; > break; > >- case 448 : if (DEBUG) { System.out.println("Assignment ::= PostfixExpression AssignmentOperator..."); } //$NON-NLS-1$ >+ case 496 : if (DEBUG) { System.out.println("Assignment ::= PostfixExpression AssignmentOperator..."); } //$NON-NLS-1$ > consumeAssignment(); > break; > >- case 450 : if (DEBUG) { System.out.println("Assignment ::= InvalidArrayInitializerAssignement"); } //$NON-NLS-1$ >+ case 498 : if (DEBUG) { System.out.println("Assignment ::= InvalidArrayInitializerAssignement"); } //$NON-NLS-1$ > ignoreExpressionAssignment(); > break; > >- case 451 : if (DEBUG) { System.out.println("AssignmentOperator ::= EQUAL"); } //$NON-NLS-1$ >+ case 499 : if (DEBUG) { System.out.println("AssignmentOperator ::= EQUAL"); } //$NON-NLS-1$ > consumeAssignmentOperator(EQUAL); > break; > >- case 452 : if (DEBUG) { System.out.println("AssignmentOperator ::= MULTIPLY_EQUAL"); } //$NON-NLS-1$ >+ case 500 : if (DEBUG) { System.out.println("AssignmentOperator ::= MULTIPLY_EQUAL"); } //$NON-NLS-1$ > consumeAssignmentOperator(MULTIPLY); > break; > >- case 453 : if (DEBUG) { System.out.println("AssignmentOperator ::= DIVIDE_EQUAL"); } //$NON-NLS-1$ >+ case 501 : if (DEBUG) { System.out.println("AssignmentOperator ::= DIVIDE_EQUAL"); } //$NON-NLS-1$ > consumeAssignmentOperator(DIVIDE); > break; > >- case 454 : if (DEBUG) { System.out.println("AssignmentOperator ::= REMAINDER_EQUAL"); } //$NON-NLS-1$ >+ case 502 : if (DEBUG) { System.out.println("AssignmentOperator ::= REMAINDER_EQUAL"); } //$NON-NLS-1$ > consumeAssignmentOperator(REMAINDER); > break; > >- case 455 : if (DEBUG) { System.out.println("AssignmentOperator ::= PLUS_EQUAL"); } //$NON-NLS-1$ >+ case 503 : if (DEBUG) { System.out.println("AssignmentOperator ::= PLUS_EQUAL"); } //$NON-NLS-1$ > consumeAssignmentOperator(PLUS); > break; > >- case 456 : if (DEBUG) { System.out.println("AssignmentOperator ::= MINUS_EQUAL"); } //$NON-NLS-1$ >+ case 504 : if (DEBUG) { System.out.println("AssignmentOperator ::= MINUS_EQUAL"); } //$NON-NLS-1$ > consumeAssignmentOperator(MINUS); > break; > >- case 457 : if (DEBUG) { System.out.println("AssignmentOperator ::= LEFT_SHIFT_EQUAL"); } //$NON-NLS-1$ >+ case 505 : if (DEBUG) { System.out.println("AssignmentOperator ::= LEFT_SHIFT_EQUAL"); } //$NON-NLS-1$ > consumeAssignmentOperator(LEFT_SHIFT); > break; > >- case 458 : if (DEBUG) { System.out.println("AssignmentOperator ::= RIGHT_SHIFT_EQUAL"); } //$NON-NLS-1$ >+ case 506 : if (DEBUG) { System.out.println("AssignmentOperator ::= RIGHT_SHIFT_EQUAL"); } //$NON-NLS-1$ > consumeAssignmentOperator(RIGHT_SHIFT); > break; > >- case 459 : if (DEBUG) { System.out.println("AssignmentOperator ::= UNSIGNED_RIGHT_SHIFT_EQUAL"); } //$NON-NLS-1$ >+ case 507 : if (DEBUG) { System.out.println("AssignmentOperator ::= UNSIGNED_RIGHT_SHIFT_EQUAL"); } //$NON-NLS-1$ > consumeAssignmentOperator(UNSIGNED_RIGHT_SHIFT); > break; > >- case 460 : if (DEBUG) { System.out.println("AssignmentOperator ::= AND_EQUAL"); } //$NON-NLS-1$ >+ case 508 : if (DEBUG) { System.out.println("AssignmentOperator ::= AND_EQUAL"); } //$NON-NLS-1$ > consumeAssignmentOperator(AND); > break; > >- case 461 : if (DEBUG) { System.out.println("AssignmentOperator ::= XOR_EQUAL"); } //$NON-NLS-1$ >+ case 509 : if (DEBUG) { System.out.println("AssignmentOperator ::= XOR_EQUAL"); } //$NON-NLS-1$ > consumeAssignmentOperator(XOR); > break; > >- case 462 : if (DEBUG) { System.out.println("AssignmentOperator ::= OR_EQUAL"); } //$NON-NLS-1$ >+ case 510 : if (DEBUG) { System.out.println("AssignmentOperator ::= OR_EQUAL"); } //$NON-NLS-1$ > consumeAssignmentOperator(OR); > break; > >- case 466 : if (DEBUG) { System.out.println("Expressionopt ::="); } //$NON-NLS-1$ >+ case 514 : if (DEBUG) { System.out.println("Expressionopt ::="); } //$NON-NLS-1$ > consumeEmptyExpression(); > break; > >- case 471 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::="); } //$NON-NLS-1$ >+ case 519 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::="); } //$NON-NLS-1$ > consumeEmptyClassBodyDeclarationsopt(); > break; > >- case 472 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$ >+ case 520 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$ > consumeClassBodyDeclarationsopt(); > break; > >- case 473 : if (DEBUG) { System.out.println("Modifiersopt ::="); } //$NON-NLS-1$ >+ case 521 : if (DEBUG) { System.out.println("NonAnnotModifiersopt ::="); } //$NON-NLS-1$ > consumeDefaultModifiers(); > break; > >- case 474 : if (DEBUG) { System.out.println("Modifiersopt ::= Modifiers"); } //$NON-NLS-1$ >+ case 522 : if (DEBUG) { System.out.println("NonAnnotModifiersopt ::= NonAnnotModifiers"); } //$NON-NLS-1$ > consumeModifiers(); > break; > >- case 475 : if (DEBUG) { System.out.println("BlockStatementsopt ::="); } //$NON-NLS-1$ >+ case 523 : if (DEBUG) { System.out.println("Modifiersopt ::="); } //$NON-NLS-1$ >+ consumeDefaultModifiers(); >+ break; >+ >+ case 524 : if (DEBUG) { System.out.println("Modifiersopt ::= Modifiers"); } //$NON-NLS-1$ >+ consumeModifiers(); >+ break; >+ >+ case 525 : if (DEBUG) { System.out.println("BlockStatementsopt ::="); } //$NON-NLS-1$ > consumeEmptyBlockStatementsopt(); > break; > >- case 477 : if (DEBUG) { System.out.println("Dimsopt ::="); } //$NON-NLS-1$ >+ case 527 : if (DEBUG) { System.out.println("Dimsopt ::="); } //$NON-NLS-1$ > consumeEmptyDimsopt(); > break; > >- case 479 : if (DEBUG) { System.out.println("ArgumentListopt ::="); } //$NON-NLS-1$ >+ case 529 : if (DEBUG) { System.out.println("ArgumentListopt ::="); } //$NON-NLS-1$ > consumeEmptyArgumentListopt(); > break; > >- case 483 : if (DEBUG) { System.out.println("FormalParameterListopt ::="); } //$NON-NLS-1$ >+ case 533 : if (DEBUG) { System.out.println("FormalParameterListopt ::="); } //$NON-NLS-1$ > consumeFormalParameterListopt(); > break; > >- case 487 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::="); } //$NON-NLS-1$ >+ case 537 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::="); } //$NON-NLS-1$ > consumeEmptyInterfaceMemberDeclarationsopt(); > break; > >- case 488 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$ >+ case 538 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$ > consumeInterfaceMemberDeclarationsopt(); > break; > >- case 489 : if (DEBUG) { System.out.println("NestedType ::="); } //$NON-NLS-1$ >+ case 539 : if (DEBUG) { System.out.println("NestedType ::="); } //$NON-NLS-1$ > consumeNestedType(); > break; > >- case 490 : if (DEBUG) { System.out.println("ForInitopt ::="); } //$NON-NLS-1$ >+ case 540 : if (DEBUG) { System.out.println("ForInitopt ::="); } //$NON-NLS-1$ > consumeEmptyForInitopt(); > break; > >- case 492 : if (DEBUG) { System.out.println("ForUpdateopt ::="); } //$NON-NLS-1$ >+ case 542 : if (DEBUG) { System.out.println("ForUpdateopt ::="); } //$NON-NLS-1$ > consumeEmptyForUpdateopt(); > break; > >- case 496 : if (DEBUG) { System.out.println("Catchesopt ::="); } //$NON-NLS-1$ >+ case 546 : if (DEBUG) { System.out.println("Catchesopt ::="); } //$NON-NLS-1$ > consumeEmptyCatchesopt(); > break; > >- case 498 : if (DEBUG) { System.out.println("EnumDeclaration ::= EnumHeader EnumBody"); } //$NON-NLS-1$ >+ case 548 : if (DEBUG) { System.out.println("EnumDeclaration ::= EnumHeader EnumBody"); } //$NON-NLS-1$ > consumeEnumDeclaration(); > break; > >- case 499 : if (DEBUG) { System.out.println("EnumHeader ::= EnumHeaderName ClassHeaderImplementsopt"); } //$NON-NLS-1$ >+ case 549 : if (DEBUG) { System.out.println("EnumHeader ::= EnumHeaderName ClassHeaderImplementsopt"); } //$NON-NLS-1$ > consumeEnumHeader(); > break; > >- case 500 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier"); } //$NON-NLS-1$ >+ case 550 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier"); } //$NON-NLS-1$ > consumeEnumHeaderName(); > break; > >- case 501 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier..."); } //$NON-NLS-1$ >+ case 551 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier..."); } //$NON-NLS-1$ > consumeEnumHeaderNameWithTypeParameters(); > break; > >- case 502 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumBodyDeclarationsopt RBRACE"); } //$NON-NLS-1$ >+ case 552 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumBodyDeclarationsopt RBRACE"); } //$NON-NLS-1$ > consumeEnumBodyNoConstants(); > break; > >- case 503 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE COMMA EnumBodyDeclarationsopt..."); } //$NON-NLS-1$ >+ case 553 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE COMMA EnumBodyDeclarationsopt..."); } //$NON-NLS-1$ > consumeEnumBodyNoConstants(); > break; > >- case 504 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants COMMA..."); } //$NON-NLS-1$ >+ case 554 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants COMMA..."); } //$NON-NLS-1$ > consumeEnumBodyWithConstants(); > break; > >- case 505 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants..."); } //$NON-NLS-1$ >+ case 555 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants..."); } //$NON-NLS-1$ > consumeEnumBodyWithConstants(); > break; > >- case 507 : if (DEBUG) { System.out.println("EnumConstants ::= EnumConstants COMMA EnumConstant"); } //$NON-NLS-1$ >+ case 557 : if (DEBUG) { System.out.println("EnumConstants ::= EnumConstants COMMA EnumConstant"); } //$NON-NLS-1$ > consumeEnumConstants(); > break; > >- case 508 : if (DEBUG) { System.out.println("EnumConstantHeaderName ::= Modifiersopt Identifier"); } //$NON-NLS-1$ >+ case 558 : if (DEBUG) { System.out.println("EnumConstantHeaderName ::= Modifiersopt Identifier"); } //$NON-NLS-1$ > consumeEnumConstantHeaderName(); > break; > >- case 509 : if (DEBUG) { System.out.println("EnumConstantHeader ::= EnumConstantHeaderName..."); } //$NON-NLS-1$ >+ case 559 : if (DEBUG) { System.out.println("EnumConstantHeader ::= EnumConstantHeaderName..."); } //$NON-NLS-1$ > consumeEnumConstantHeader(); > break; > >- case 510 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader ForceNoDiet..."); } //$NON-NLS-1$ >+ case 560 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader ForceNoDiet..."); } //$NON-NLS-1$ > consumeEnumConstantWithClassBody(); > break; > >- case 511 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader"); } //$NON-NLS-1$ >+ case 561 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader"); } //$NON-NLS-1$ > consumeEnumConstantNoClassBody(); > break; > >- case 512 : if (DEBUG) { System.out.println("Arguments ::= LPAREN ArgumentListopt RPAREN"); } //$NON-NLS-1$ >+ case 562 : if (DEBUG) { System.out.println("Arguments ::= LPAREN ArgumentListopt RPAREN"); } //$NON-NLS-1$ > consumeArguments(); > break; > >- case 513 : if (DEBUG) { System.out.println("Argumentsopt ::="); } //$NON-NLS-1$ >+ case 563 : if (DEBUG) { System.out.println("Argumentsopt ::="); } //$NON-NLS-1$ > consumeEmptyArguments(); > break; > >- case 515 : if (DEBUG) { System.out.println("EnumDeclarations ::= SEMICOLON ClassBodyDeclarationsopt"); } //$NON-NLS-1$ >+ case 565 : if (DEBUG) { System.out.println("EnumDeclarations ::= SEMICOLON ClassBodyDeclarationsopt"); } //$NON-NLS-1$ > consumeEnumDeclarations(); > break; > >- case 516 : if (DEBUG) { System.out.println("EnumBodyDeclarationsopt ::="); } //$NON-NLS-1$ >+ case 566 : if (DEBUG) { System.out.println("EnumBodyDeclarationsopt ::="); } //$NON-NLS-1$ > consumeEmptyEnumDeclarations(); > break; > >- case 518 : if (DEBUG) { System.out.println("EnhancedForStatement ::= EnhancedForStatementHeader..."); } //$NON-NLS-1$ >+ case 568 : if (DEBUG) { System.out.println("EnhancedForStatement ::= EnhancedForStatementHeader..."); } //$NON-NLS-1$ > consumeEnhancedForStatement(); > break; > >- case 519 : if (DEBUG) { System.out.println("EnhancedForStatementNoShortIf ::=..."); } //$NON-NLS-1$ >+ case 569 : if (DEBUG) { System.out.println("EnhancedForStatementNoShortIf ::=..."); } //$NON-NLS-1$ > consumeEnhancedForStatement(); > break; > >- case 520 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Type..."); } //$NON-NLS-1$ >+ case 570 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Type..."); } //$NON-NLS-1$ > consumeEnhancedForStatementHeaderInit(false); > break; > >- case 521 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Modifiers"); } //$NON-NLS-1$ >+ case 571 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Modifiers"); } //$NON-NLS-1$ > consumeEnhancedForStatementHeaderInit(true); > break; > >- case 522 : if (DEBUG) { System.out.println("EnhancedForStatementHeader ::=..."); } //$NON-NLS-1$ >+ case 572 : if (DEBUG) { System.out.println("EnhancedForStatementHeader ::=..."); } //$NON-NLS-1$ > consumeEnhancedForStatementHeader(); > break; > >- case 523 : if (DEBUG) { System.out.println("SingleStaticImportDeclaration ::=..."); } //$NON-NLS-1$ >+ case 573 : if (DEBUG) { System.out.println("SingleStaticImportDeclaration ::=..."); } //$NON-NLS-1$ > consumeImportDeclaration(); > break; > >- case 524 : if (DEBUG) { System.out.println("SingleStaticImportDeclarationName ::= import static Name"); } //$NON-NLS-1$ >+ case 574 : if (DEBUG) { System.out.println("SingleStaticImportDeclarationName ::= import static Name"); } //$NON-NLS-1$ > consumeSingleStaticImportDeclarationName(); > break; > >- case 525 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclaration ::=..."); } //$NON-NLS-1$ >+ case 575 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclaration ::=..."); } //$NON-NLS-1$ > consumeImportDeclaration(); > break; > >- case 526 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclarationName ::= import static..."); } //$NON-NLS-1$ >+ case 576 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclarationName ::= import static..."); } //$NON-NLS-1$ > consumeStaticImportOnDemandDeclarationName(); > break; > >- case 527 : if (DEBUG) { System.out.println("TypeArguments ::= LESS TypeArgumentList1"); } //$NON-NLS-1$ >+ case 577 : if (DEBUG) { System.out.println("TypeArguments ::= LESS TypeArgumentList1"); } //$NON-NLS-1$ > consumeTypeArguments(); > break; > >- case 528 : if (DEBUG) { System.out.println("OnlyTypeArguments ::= LESS TypeArgumentList1"); } //$NON-NLS-1$ >+ case 578 : if (DEBUG) { System.out.println("OnlyTypeArguments ::= LESS TypeArgumentList1"); } //$NON-NLS-1$ > consumeOnlyTypeArguments(); > break; > >- case 530 : if (DEBUG) { System.out.println("TypeArgumentList1 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$ >+ case 580 : if (DEBUG) { System.out.println("TypeArgumentList1 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$ > consumeTypeArgumentList1(); > break; > >- case 532 : if (DEBUG) { System.out.println("TypeArgumentList ::= TypeArgumentList COMMA TypeArgument"); } //$NON-NLS-1$ >+ case 582 : if (DEBUG) { System.out.println("TypeArgumentList ::= TypeArgumentList COMMA TypeArgument"); } //$NON-NLS-1$ > consumeTypeArgumentList(); > break; > >- case 533 : if (DEBUG) { System.out.println("TypeArgument ::= ReferenceType"); } //$NON-NLS-1$ >- consumeTypeArgument(); >+ case 583 : if (DEBUG) { System.out.println("TypeArgument ::= ReferenceType"); } //$NON-NLS-1$ >+ consumeTypeArgument(false); >+ break; >+ >+ case 584 : if (DEBUG) { System.out.println("TypeArgument ::= OneOrMoreAnnotations ReferenceType"); } //$NON-NLS-1$ >+ consumeTypeArgument(true); >+ break; >+ >+ case 588 : if (DEBUG) { System.out.println("ReferenceType1 ::= ReferenceType GREATER"); } //$NON-NLS-1$ >+ consumeReferenceType1(false); >+ break; >+ >+ case 589 : if (DEBUG) { System.out.println("ReferenceType1 ::= OneOrMoreAnnotations ReferenceType..."); } //$NON-NLS-1$ >+ consumeReferenceType1(true); > break; > >- case 537 : if (DEBUG) { System.out.println("ReferenceType1 ::= ReferenceType GREATER"); } //$NON-NLS-1$ >- consumeReferenceType1(); >+ case 590 : if (DEBUG) { System.out.println("ReferenceType1 ::= ClassOrInterface LESS..."); } //$NON-NLS-1$ >+ consumeTypeArgumentReferenceType1(false); > break; > >- case 538 : if (DEBUG) { System.out.println("ReferenceType1 ::= ClassOrInterface LESS..."); } //$NON-NLS-1$ >- consumeTypeArgumentReferenceType1(); >+ case 591 : if (DEBUG) { System.out.println("ReferenceType1 ::= OneOrMoreAnnotations ClassOrInterface"); } //$NON-NLS-1$ >+ consumeTypeArgumentReferenceType1(true); > break; > >- case 540 : if (DEBUG) { System.out.println("TypeArgumentList2 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$ >+ case 593 : if (DEBUG) { System.out.println("TypeArgumentList2 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$ > consumeTypeArgumentList2(); > break; > >- case 543 : if (DEBUG) { System.out.println("ReferenceType2 ::= ReferenceType RIGHT_SHIFT"); } //$NON-NLS-1$ >- consumeReferenceType2(); >+ case 596 : if (DEBUG) { System.out.println("ReferenceType2 ::= ReferenceType RIGHT_SHIFT"); } //$NON-NLS-1$ >+ consumeReferenceType2(false); >+ break; >+ >+ case 597 : if (DEBUG) { System.out.println("ReferenceType2 ::= OneOrMoreAnnotations ReferenceType..."); } //$NON-NLS-1$ >+ consumeReferenceType2(true); >+ break; >+ >+ case 598 : if (DEBUG) { System.out.println("ReferenceType2 ::= ClassOrInterface LESS..."); } //$NON-NLS-1$ >+ consumeTypeArgumentReferenceType2(false); > break; > >- case 544 : if (DEBUG) { System.out.println("ReferenceType2 ::= ClassOrInterface LESS..."); } //$NON-NLS-1$ >- consumeTypeArgumentReferenceType2(); >+ case 599 : if (DEBUG) { System.out.println("ReferenceType2 ::= OneOrMoreAnnotations ClassOrInterface"); } //$NON-NLS-1$ >+ consumeTypeArgumentReferenceType2(true); > break; > >- case 546 : if (DEBUG) { System.out.println("TypeArgumentList3 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$ >+ case 601 : if (DEBUG) { System.out.println("TypeArgumentList3 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$ > consumeTypeArgumentList3(); > break; > >- case 549 : if (DEBUG) { System.out.println("ReferenceType3 ::= ReferenceType UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$ >- consumeReferenceType3(); >+ case 604 : if (DEBUG) { System.out.println("ReferenceType3 ::= ReferenceType UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$ >+ consumeReferenceType3(false); > break; > >- case 550 : if (DEBUG) { System.out.println("Wildcard ::= QUESTION"); } //$NON-NLS-1$ >+ case 605 : if (DEBUG) { System.out.println("ReferenceType3 ::= OneOrMoreAnnotations ReferenceType..."); } //$NON-NLS-1$ >+ consumeReferenceType3(true); >+ break; >+ >+ case 606 : if (DEBUG) { System.out.println("Wildcard ::= QUESTION"); } //$NON-NLS-1$ > consumeWildcard(); > break; > >- case 551 : if (DEBUG) { System.out.println("Wildcard ::= QUESTION WildcardBounds"); } //$NON-NLS-1$ >+ case 607 : if (DEBUG) { System.out.println("Wildcard ::= QUESTION WildcardBounds"); } //$NON-NLS-1$ > consumeWildcardWithBounds(); > break; > >- case 552 : if (DEBUG) { System.out.println("WildcardBounds ::= extends ReferenceType"); } //$NON-NLS-1$ >- consumeWildcardBoundsExtends(); >+ case 608 : if (DEBUG) { System.out.println("WildcardBounds ::= extends ReferenceType"); } //$NON-NLS-1$ >+ consumeWildcardBoundsExtends(false); >+ break; >+ >+ case 609 : if (DEBUG) { System.out.println("WildcardBounds ::= extends OneOrMoreAnnotations..."); } //$NON-NLS-1$ >+ consumeWildcardBoundsExtends(true); > break; > >- case 553 : if (DEBUG) { System.out.println("WildcardBounds ::= super ReferenceType"); } //$NON-NLS-1$ >- consumeWildcardBoundsSuper(); >+ case 610 : if (DEBUG) { System.out.println("WildcardBounds ::= super ReferenceType"); } //$NON-NLS-1$ >+ consumeWildcardBoundsSuper(false); > break; > >- case 554 : if (DEBUG) { System.out.println("Wildcard1 ::= QUESTION GREATER"); } //$NON-NLS-1$ >+ case 611 : if (DEBUG) { System.out.println("WildcardBounds ::= super OneOrMoreAnnotations..."); } //$NON-NLS-1$ >+ consumeWildcardBoundsSuper(true); >+ break; >+ >+ case 612 : if (DEBUG) { System.out.println("Wildcard1 ::= QUESTION GREATER"); } //$NON-NLS-1$ > consumeWildcard1(); > break; > >- case 555 : if (DEBUG) { System.out.println("Wildcard1 ::= QUESTION WildcardBounds1"); } //$NON-NLS-1$ >+ case 613 : if (DEBUG) { System.out.println("Wildcard1 ::= QUESTION WildcardBounds1"); } //$NON-NLS-1$ > consumeWildcard1WithBounds(); > break; > >- case 556 : if (DEBUG) { System.out.println("WildcardBounds1 ::= extends ReferenceType1"); } //$NON-NLS-1$ >+ case 614 : if (DEBUG) { System.out.println("WildcardBounds1 ::= extends ReferenceType1"); } //$NON-NLS-1$ > consumeWildcardBounds1Extends(); > break; > >- case 557 : if (DEBUG) { System.out.println("WildcardBounds1 ::= super ReferenceType1"); } //$NON-NLS-1$ >+ case 615 : if (DEBUG) { System.out.println("WildcardBounds1 ::= super ReferenceType1"); } //$NON-NLS-1$ > consumeWildcardBounds1Super(); > break; > >- case 558 : if (DEBUG) { System.out.println("Wildcard2 ::= QUESTION RIGHT_SHIFT"); } //$NON-NLS-1$ >+ case 616 : if (DEBUG) { System.out.println("Wildcard2 ::= QUESTION RIGHT_SHIFT"); } //$NON-NLS-1$ > consumeWildcard2(); > break; > >- case 559 : if (DEBUG) { System.out.println("Wildcard2 ::= QUESTION WildcardBounds2"); } //$NON-NLS-1$ >+ case 617 : if (DEBUG) { System.out.println("Wildcard2 ::= QUESTION WildcardBounds2"); } //$NON-NLS-1$ > consumeWildcard2WithBounds(); > break; > >- case 560 : if (DEBUG) { System.out.println("WildcardBounds2 ::= extends ReferenceType2"); } //$NON-NLS-1$ >+ case 618 : if (DEBUG) { System.out.println("WildcardBounds2 ::= extends ReferenceType2"); } //$NON-NLS-1$ > consumeWildcardBounds2Extends(); > break; > >- case 561 : if (DEBUG) { System.out.println("WildcardBounds2 ::= super ReferenceType2"); } //$NON-NLS-1$ >+ case 619 : if (DEBUG) { System.out.println("WildcardBounds2 ::= super ReferenceType2"); } //$NON-NLS-1$ > consumeWildcardBounds2Super(); > break; > >- case 562 : if (DEBUG) { System.out.println("Wildcard3 ::= QUESTION UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$ >+ case 620 : if (DEBUG) { System.out.println("Wildcard3 ::= QUESTION UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$ > consumeWildcard3(); > break; > >- case 563 : if (DEBUG) { System.out.println("Wildcard3 ::= QUESTION WildcardBounds3"); } //$NON-NLS-1$ >+ case 621 : if (DEBUG) { System.out.println("Wildcard3 ::= QUESTION WildcardBounds3"); } //$NON-NLS-1$ > consumeWildcard3WithBounds(); > break; > >- case 564 : if (DEBUG) { System.out.println("WildcardBounds3 ::= extends ReferenceType3"); } //$NON-NLS-1$ >+ case 622 : if (DEBUG) { System.out.println("WildcardBounds3 ::= extends ReferenceType3"); } //$NON-NLS-1$ > consumeWildcardBounds3Extends(); > break; > >- case 565 : if (DEBUG) { System.out.println("WildcardBounds3 ::= super ReferenceType3"); } //$NON-NLS-1$ >+ case 623 : if (DEBUG) { System.out.println("WildcardBounds3 ::= super ReferenceType3"); } //$NON-NLS-1$ > consumeWildcardBounds3Super(); > break; > >- case 566 : if (DEBUG) { System.out.println("TypeParameterHeader ::= Identifier"); } //$NON-NLS-1$ >+ case 624 : if (DEBUG) { System.out.println("PushZeroTypeAnnotations ::="); } //$NON-NLS-1$ >+ consumeZeroTypeAnnotations(); >+ break; >+ >+ case 625 : if (DEBUG) { System.out.println("TypeParameterHeader ::= PushZeroTypeAnnotations..."); } //$NON-NLS-1$ >+ consumeTypeParameterHeader(); >+ break; >+ >+ case 626 : if (DEBUG) { System.out.println("TypeParameterHeader ::= OneOrMoreAnnotations Identifier"); } //$NON-NLS-1$ > consumeTypeParameterHeader(); > break; > >- case 567 : if (DEBUG) { System.out.println("TypeParameters ::= LESS TypeParameterList1"); } //$NON-NLS-1$ >+ case 627 : if (DEBUG) { System.out.println("TypeParameters ::= LESS TypeParameterList1"); } //$NON-NLS-1$ > consumeTypeParameters(); > break; > >- case 569 : if (DEBUG) { System.out.println("TypeParameterList ::= TypeParameterList COMMA..."); } //$NON-NLS-1$ >+ case 629 : if (DEBUG) { System.out.println("TypeParameterList ::= TypeParameterList COMMA..."); } //$NON-NLS-1$ > consumeTypeParameterList(); > break; > >- case 571 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ >- consumeTypeParameterWithExtends(); >+ case 631 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ >+ consumeTypeParameterWithExtends(false); > break; > >- case 572 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ >- consumeTypeParameterWithExtendsAndBounds(); >+ case 632 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ >+ consumeTypeParameterWithExtends(true); > break; > >- case 574 : if (DEBUG) { System.out.println("AdditionalBoundList ::= AdditionalBoundList..."); } //$NON-NLS-1$ >+ case 633 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ >+ consumeTypeParameterWithExtendsAndBounds(false); >+ break; >+ >+ case 634 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ >+ consumeTypeParameterWithExtendsAndBounds(true); >+ break; >+ >+ case 636 : if (DEBUG) { System.out.println("AdditionalBoundList ::= AdditionalBoundList..."); } //$NON-NLS-1$ > consumeAdditionalBoundList(); > break; > >- case 575 : if (DEBUG) { System.out.println("AdditionalBound ::= AND ReferenceType"); } //$NON-NLS-1$ >- consumeAdditionalBound(); >+ case 637 : if (DEBUG) { System.out.println("AdditionalBound ::= AND ReferenceType"); } //$NON-NLS-1$ >+ consumeAdditionalBound(false); >+ break; >+ >+ case 638 : if (DEBUG) { System.out.println("AdditionalBound ::= AND OneOrMoreAnnotations..."); } //$NON-NLS-1$ >+ consumeAdditionalBound(true); > break; > >- case 577 : if (DEBUG) { System.out.println("TypeParameterList1 ::= TypeParameterList COMMA..."); } //$NON-NLS-1$ >+ case 640 : if (DEBUG) { System.out.println("TypeParameterList1 ::= TypeParameterList COMMA..."); } //$NON-NLS-1$ > consumeTypeParameterList1(); > break; > >- case 578 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader GREATER"); } //$NON-NLS-1$ >+ case 641 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader GREATER"); } //$NON-NLS-1$ > consumeTypeParameter1(); > break; > >- case 579 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ >+ case 642 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ > consumeTypeParameter1WithExtends(); > break; > >- case 580 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ >- consumeTypeParameter1WithExtendsAndBounds(); >+ case 643 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ >+ consumeTypeParameter1WithExtendsAndBounds(false); > break; > >- case 582 : if (DEBUG) { System.out.println("AdditionalBoundList1 ::= AdditionalBoundList..."); } //$NON-NLS-1$ >+ case 644 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ >+ consumeTypeParameter1WithExtendsAndBounds(true); >+ break; >+ >+ case 646 : if (DEBUG) { System.out.println("AdditionalBoundList1 ::= AdditionalBoundList..."); } //$NON-NLS-1$ > consumeAdditionalBoundList1(); > break; > >- case 583 : if (DEBUG) { System.out.println("AdditionalBound1 ::= AND ReferenceType1"); } //$NON-NLS-1$ >+ case 647 : if (DEBUG) { System.out.println("AdditionalBound1 ::= AND ReferenceType1"); } //$NON-NLS-1$ > consumeAdditionalBound1(); > break; > >- case 589 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= PLUS PushPosition..."); } //$NON-NLS-1$ >+ case 653 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= PLUS PushPosition..."); } //$NON-NLS-1$ > consumeUnaryExpression(OperatorIds.PLUS); > break; > >- case 590 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= MINUS PushPosition..."); } //$NON-NLS-1$ >+ case 654 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= MINUS PushPosition..."); } //$NON-NLS-1$ > consumeUnaryExpression(OperatorIds.MINUS); > break; > >- case 593 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= TWIDDLE..."); } //$NON-NLS-1$ >+ case 657 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= TWIDDLE..."); } //$NON-NLS-1$ > consumeUnaryExpression(OperatorIds.TWIDDLE); > break; > >- case 594 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= NOT PushPosition"); } //$NON-NLS-1$ >+ case 658 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= NOT PushPosition"); } //$NON-NLS-1$ > consumeUnaryExpression(OperatorIds.NOT); > break; > >- case 597 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$ >+ case 661 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.MULTIPLY); > break; > >- case 598 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name MULTIPLY..."); } //$NON-NLS-1$ >+ case 662 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name MULTIPLY..."); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.MULTIPLY); > break; > >- case 599 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$ >+ case 663 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.DIVIDE); > break; > >- case 600 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name DIVIDE..."); } //$NON-NLS-1$ >+ case 664 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name DIVIDE..."); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.DIVIDE); > break; > >- case 601 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$ >+ case 665 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.REMAINDER); > break; > >- case 602 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name REMAINDER..."); } //$NON-NLS-1$ >+ case 666 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name REMAINDER..."); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.REMAINDER); > break; > >- case 604 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); } //$NON-NLS-1$ >+ case 668 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.PLUS); > break; > >- case 605 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name PLUS..."); } //$NON-NLS-1$ >+ case 669 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name PLUS..."); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.PLUS); > break; > >- case 606 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); } //$NON-NLS-1$ >+ case 670 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.MINUS); > break; > >- case 607 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name MINUS..."); } //$NON-NLS-1$ >+ case 671 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name MINUS..."); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.MINUS); > break; > >- case 609 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$ >+ case 673 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.LEFT_SHIFT); > break; > >- case 610 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name LEFT_SHIFT..."); } //$NON-NLS-1$ >+ case 674 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name LEFT_SHIFT..."); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.LEFT_SHIFT); > break; > >- case 611 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$ >+ case 675 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.RIGHT_SHIFT); > break; > >- case 612 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name RIGHT_SHIFT..."); } //$NON-NLS-1$ >+ case 676 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name RIGHT_SHIFT..."); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.RIGHT_SHIFT); > break; > >- case 613 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$ >+ case 677 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT); > break; > >- case 614 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name UNSIGNED_RIGHT_SHIFT..."); } //$NON-NLS-1$ >+ case 678 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name UNSIGNED_RIGHT_SHIFT..."); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.UNSIGNED_RIGHT_SHIFT); > break; > >- case 616 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); } //$NON-NLS-1$ >+ case 680 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.LESS); > break; > >- case 617 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS..."); } //$NON-NLS-1$ >+ case 681 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS..."); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.LESS); > break; > >- case 618 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); } //$NON-NLS-1$ >+ case 682 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.GREATER); > break; > >- case 619 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER..."); } //$NON-NLS-1$ >+ case 683 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER..."); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.GREATER); > break; > >- case 620 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); } //$NON-NLS-1$ >+ case 684 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.LESS_EQUAL); > break; > >- case 621 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS_EQUAL..."); } //$NON-NLS-1$ >+ case 685 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS_EQUAL..."); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.LESS_EQUAL); > break; > >- case 622 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); } //$NON-NLS-1$ >+ case 686 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.GREATER_EQUAL); > break; > >- case 623 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER_EQUAL..."); } //$NON-NLS-1$ >+ case 687 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER_EQUAL..."); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.GREATER_EQUAL); > break; > >- case 625 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::= Name instanceof..."); } //$NON-NLS-1$ >+ case 689 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::= Name instanceof..."); } //$NON-NLS-1$ >+ consumeInstanceOfExpressionWithName(); >+ break; >+ >+ case 690 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::= Name instanceof..."); } //$NON-NLS-1$ > consumeInstanceOfExpressionWithName(); > break; > >- case 626 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::=..."); } //$NON-NLS-1$ >+ case 691 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::=..."); } //$NON-NLS-1$ >+ consumeInstanceOfExpression(); >+ break; >+ >+ case 692 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::=..."); } //$NON-NLS-1$ > consumeInstanceOfExpression(); > break; > >- case 628 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); } //$NON-NLS-1$ >+ case 694 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); } //$NON-NLS-1$ > consumeEqualityExpression(OperatorIds.EQUAL_EQUAL); > break; > >- case 629 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name EQUAL_EQUAL..."); } //$NON-NLS-1$ >+ case 695 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name EQUAL_EQUAL..."); } //$NON-NLS-1$ > consumeEqualityExpressionWithName(OperatorIds.EQUAL_EQUAL); > break; > >- case 630 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); } //$NON-NLS-1$ >+ case 696 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); } //$NON-NLS-1$ > consumeEqualityExpression(OperatorIds.NOT_EQUAL); > break; > >- case 631 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name NOT_EQUAL..."); } //$NON-NLS-1$ >+ case 697 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name NOT_EQUAL..."); } //$NON-NLS-1$ > consumeEqualityExpressionWithName(OperatorIds.NOT_EQUAL); > break; > >- case 633 : if (DEBUG) { System.out.println("AndExpression_NotName ::= AndExpression_NotName AND..."); } //$NON-NLS-1$ >+ case 699 : if (DEBUG) { System.out.println("AndExpression_NotName ::= AndExpression_NotName AND..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.AND); > break; > >- case 634 : if (DEBUG) { System.out.println("AndExpression_NotName ::= Name AND EqualityExpression"); } //$NON-NLS-1$ >+ case 700 : if (DEBUG) { System.out.println("AndExpression_NotName ::= Name AND EqualityExpression"); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.AND); > break; > >- case 636 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::=..."); } //$NON-NLS-1$ >+ case 702 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::=..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.XOR); > break; > >- case 637 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::= Name XOR AndExpression"); } //$NON-NLS-1$ >+ case 703 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::= Name XOR AndExpression"); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.XOR); > break; > >- case 639 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::=..."); } //$NON-NLS-1$ >+ case 705 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::=..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.OR); > break; > >- case 640 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::= Name OR..."); } //$NON-NLS-1$ >+ case 706 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::= Name OR..."); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.OR); > break; > >- case 642 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::=..."); } //$NON-NLS-1$ >+ case 708 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::=..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.AND_AND); > break; > >- case 643 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::= Name AND_AND..."); } //$NON-NLS-1$ >+ case 709 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::= Name AND_AND..."); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.AND_AND); > break; > >- case 645 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::=..."); } //$NON-NLS-1$ >+ case 711 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::=..."); } //$NON-NLS-1$ > consumeBinaryExpression(OperatorIds.OR_OR); > break; > >- case 646 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::= Name OR_OR..."); } //$NON-NLS-1$ >+ case 712 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::= Name OR_OR..."); } //$NON-NLS-1$ > consumeBinaryExpressionWithName(OperatorIds.OR_OR); > break; > >- case 648 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::=..."); } //$NON-NLS-1$ >+ case 714 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::=..."); } //$NON-NLS-1$ > consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ; > break; > >- case 649 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::= Name QUESTION..."); } //$NON-NLS-1$ >+ case 715 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::= Name QUESTION..."); } //$NON-NLS-1$ > consumeConditionalExpressionWithName(OperatorIds.QUESTIONCOLON) ; > break; > >- case 653 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); } //$NON-NLS-1$ >+ case 719 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); } //$NON-NLS-1$ > consumeAnnotationTypeDeclarationHeaderName() ; > break; > >- case 654 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); } //$NON-NLS-1$ >+ case 720 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); } //$NON-NLS-1$ > consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ; > break; > >- case 655 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); } //$NON-NLS-1$ >+ case 721 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); } //$NON-NLS-1$ > consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ; > break; > >- case 656 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); } //$NON-NLS-1$ >+ case 722 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); } //$NON-NLS-1$ > consumeAnnotationTypeDeclarationHeaderName() ; > break; > >- case 657 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeader ::=..."); } //$NON-NLS-1$ >+ case 723 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeader ::=..."); } //$NON-NLS-1$ > consumeAnnotationTypeDeclarationHeader() ; > break; > >- case 658 : if (DEBUG) { System.out.println("AnnotationTypeDeclaration ::=..."); } //$NON-NLS-1$ >+ case 724 : if (DEBUG) { System.out.println("AnnotationTypeDeclaration ::=..."); } //$NON-NLS-1$ > consumeAnnotationTypeDeclaration() ; > break; > >- case 660 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::="); } //$NON-NLS-1$ >+ case 726 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::="); } //$NON-NLS-1$ > consumeEmptyAnnotationTypeMemberDeclarationsopt() ; > break; > >- case 661 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$ >+ case 727 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$ > consumeAnnotationTypeMemberDeclarationsopt() ; > break; > >- case 663 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarations ::=..."); } //$NON-NLS-1$ >+ case 729 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarations ::=..."); } //$NON-NLS-1$ > consumeAnnotationTypeMemberDeclarations() ; > break; > >- case 664 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt..."); } //$NON-NLS-1$ >- consumeMethodHeaderNameWithTypeParameters(true); >+ case 730 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt..."); } //$NON-NLS-1$ >+ consumeMethodHeaderNameWithTypeParameters(true, false); > break; > >- case 665 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt Type..."); } //$NON-NLS-1$ >+ case 731 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt Type..."); } //$NON-NLS-1$ > consumeMethodHeaderName(true); > break; > >- case 666 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::="); } //$NON-NLS-1$ >+ case 732 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::="); } //$NON-NLS-1$ > consumeEmptyMethodHeaderDefaultValue() ; > break; > >- case 667 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::= DefaultValue"); } //$NON-NLS-1$ >+ case 733 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::= DefaultValue"); } //$NON-NLS-1$ > consumeMethodHeaderDefaultValue(); > break; > >- case 668 : if (DEBUG) { System.out.println("AnnotationMethodHeader ::= AnnotationMethodHeaderName..."); } //$NON-NLS-1$ >+ case 734 : if (DEBUG) { System.out.println("AnnotationMethodHeader ::= AnnotationMethodHeaderName..."); } //$NON-NLS-1$ > consumeMethodHeader(); > break; > >- case 669 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclaration ::=..."); } //$NON-NLS-1$ >+ case 735 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclaration ::=..."); } //$NON-NLS-1$ > consumeAnnotationTypeMemberDeclaration() ; > break; > >- case 677 : if (DEBUG) { System.out.println("AnnotationName ::= AT Name"); } //$NON-NLS-1$ >+ case 743 : if (DEBUG) { System.out.println("AnnotationName ::= AT Name"); } //$NON-NLS-1$ > consumeAnnotationName() ; > break; > >- case 678 : if (DEBUG) { System.out.println("NormalAnnotation ::= AnnotationName LPAREN..."); } //$NON-NLS-1$ >+ case 744 : if (DEBUG) { System.out.println("NormalAnnotation ::= AnnotationName LPAREN..."); } //$NON-NLS-1$ > consumeNormalAnnotation() ; > break; > >- case 679 : if (DEBUG) { System.out.println("MemberValuePairsopt ::="); } //$NON-NLS-1$ >+ case 745 : if (DEBUG) { System.out.println("MemberValuePairsopt ::="); } //$NON-NLS-1$ > consumeEmptyMemberValuePairsopt() ; > break; > >- case 682 : if (DEBUG) { System.out.println("MemberValuePairs ::= MemberValuePairs COMMA..."); } //$NON-NLS-1$ >+ case 748 : if (DEBUG) { System.out.println("MemberValuePairs ::= MemberValuePairs COMMA..."); } //$NON-NLS-1$ > consumeMemberValuePairs() ; > break; > >- case 683 : if (DEBUG) { System.out.println("MemberValuePair ::= SimpleName EQUAL EnterMemberValue..."); } //$NON-NLS-1$ >+ case 749 : if (DEBUG) { System.out.println("MemberValuePair ::= SimpleName EQUAL EnterMemberValue..."); } //$NON-NLS-1$ > consumeMemberValuePair() ; > break; > >- case 684 : if (DEBUG) { System.out.println("EnterMemberValue ::="); } //$NON-NLS-1$ >+ case 750 : if (DEBUG) { System.out.println("EnterMemberValue ::="); } //$NON-NLS-1$ > consumeEnterMemberValue() ; > break; > >- case 685 : if (DEBUG) { System.out.println("ExitMemberValue ::="); } //$NON-NLS-1$ >+ case 751 : if (DEBUG) { System.out.println("ExitMemberValue ::="); } //$NON-NLS-1$ > consumeExitMemberValue() ; > break; > >- case 687 : if (DEBUG) { System.out.println("MemberValue ::= Name"); } //$NON-NLS-1$ >+ case 753 : if (DEBUG) { System.out.println("MemberValue ::= Name"); } //$NON-NLS-1$ > consumeMemberValueAsName() ; > break; > >- case 690 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ >+ case 756 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ > consumeMemberValueArrayInitializer() ; > break; > >- case 691 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ >+ case 757 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ > consumeMemberValueArrayInitializer() ; > break; > >- case 692 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ >+ case 758 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ > consumeEmptyMemberValueArrayInitializer() ; > break; > >- case 693 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ >+ case 759 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$ > consumeEmptyMemberValueArrayInitializer() ; > break; > >- case 694 : if (DEBUG) { System.out.println("EnterMemberValueArrayInitializer ::="); } //$NON-NLS-1$ >+ case 760 : if (DEBUG) { System.out.println("EnterMemberValueArrayInitializer ::="); } //$NON-NLS-1$ > consumeEnterMemberValueArrayInitializer() ; > break; > >- case 696 : if (DEBUG) { System.out.println("MemberValues ::= MemberValues COMMA MemberValue"); } //$NON-NLS-1$ >+ case 762 : if (DEBUG) { System.out.println("MemberValues ::= MemberValues COMMA MemberValue"); } //$NON-NLS-1$ > consumeMemberValues() ; > break; > >- case 697 : if (DEBUG) { System.out.println("MarkerAnnotation ::= AnnotationName"); } //$NON-NLS-1$ >+ case 763 : if (DEBUG) { System.out.println("MarkerAnnotation ::= AnnotationName"); } //$NON-NLS-1$ > consumeMarkerAnnotation() ; > break; > >- case 698 : if (DEBUG) { System.out.println("SingleMemberAnnotationMemberValue ::= MemberValue"); } //$NON-NLS-1$ >+ case 764 : if (DEBUG) { System.out.println("SingleMemberAnnotationMemberValue ::= MemberValue"); } //$NON-NLS-1$ > consumeSingleMemberAnnotationMemberValue() ; > break; > >- case 699 : if (DEBUG) { System.out.println("SingleMemberAnnotation ::= AnnotationName LPAREN..."); } //$NON-NLS-1$ >+ case 765 : if (DEBUG) { System.out.println("SingleMemberAnnotation ::= AnnotationName LPAREN..."); } //$NON-NLS-1$ > consumeSingleMemberAnnotation() ; > break; > >- case 700 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt TypeParameters"); } //$NON-NLS-1$ >- consumeRecoveryMethodHeaderNameWithTypeParameters(); >+ case 766 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt TypeParameters"); } //$NON-NLS-1$ >+ consumeRecoveryMethodHeaderNameWithTypeParameters(false); > break; > >- case 701 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt Type..."); } //$NON-NLS-1$ >+ case 767 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt TypeParameters"); } //$NON-NLS-1$ >+ consumeRecoveryMethodHeaderNameWithTypeParameters(true); >+ break; >+ >+ case 768 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt Type..."); } //$NON-NLS-1$ > consumeRecoveryMethodHeaderName(); > break; > >- case 702 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); } //$NON-NLS-1$ >+ case 769 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); } //$NON-NLS-1$ > consumeMethodHeader(); > break; > >- case 703 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); } //$NON-NLS-1$ >+ case 770 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); } //$NON-NLS-1$ > consumeMethodHeader(); > break; > > } > } >+protected void consumeTypeAnnotation (boolean markAsUnattached) { >+ if(!this.statementRecoveryActivated && >+ this.options.sourceLevel < ClassFileConstants.JDK1_7 && >+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) { >+ problemReporter().invalidUsageOfTypeAnnotations((Annotation) this.expressionStack[this.expressionPtr]); >+ } >+ this.expressionLengthPtr --; >+ Annotation annotation = (Annotation) this.expressionStack[this.expressionPtr--]; >+ pushOnTypeAnnotationStack(annotation); >+ if (markAsUnattached) { >+ if (this.unattachedAnnotationPtr == -1) { >+ this.unattachedAnnotationPtr = this.typeAnnotationPtr; >+ } else { >+ this.typeAnnotationLengthStack[--this.typeAnnotationLengthPtr]++; >+ } >+ } >+} >+protected void consumeDimsWithTrailingAnnotsopt() { >+ // DimsoptAnnotsopt -> DimsAnnotLoop >+ pushOnIntStack(this.dimensions); >+ this.dimensions = 0; >+ if (this.unattachedAnnotationPtr == -1) { >+ pushOnTypeAnnotationLengthStack(0); // no trailing annotations (receiver/vararg) >+ } else { >+ this.unattachedAnnotationPtr = -1; // reset this and leave the annotation stacks as they are. >+ } >+} >+protected void consumeZeroTypeAnnotations() { >+ pushOnTypeAnnotationLengthStack(0); >+} >+protected void consumeEmptyDimsoptAnnotsopt() { >+ // DimsoptAnnotsopt ::= $empty >+ pushOnIntStack(0); // signal a non array >+ pushOnTypeAnnotationLengthStack(0); // no trailing annotations (receiver/vararg) >+} > protected void consumeSimpleAssertStatement() { > // AssertStatement ::= 'assert' Expression ';' > this.expressionLengthPtr--; >@@ -7673,8 +8150,8 @@ > // case TokenNameGREATER : > } > } >-protected void consumeTypeArgument() { >- pushOnGenericsStack(getTypeReference(this.intStack[this.intPtr--])); >+protected void consumeTypeArgument(boolean hasTypeAnnotations) { >+ pushOnGenericsStack(hasTypeAnnotations ? getTypeReference(this.intStack[this.intPtr--]) : getUnannotatedTypeReference(this.intStack[this.intPtr--])); > } > protected void consumeTypeArgumentList() { > concatGenericsLists(); >@@ -7688,14 +8165,14 @@ > protected void consumeTypeArgumentList3() { > concatGenericsLists(); > } >-protected void consumeTypeArgumentReferenceType1() { >+protected void consumeTypeArgumentReferenceType1(boolean hasTypeAnnotations) { > concatGenericsLists(); >- pushOnGenericsStack(getTypeReference(0)); >+ pushOnGenericsStack(hasTypeAnnotations ? getTypeReference(0) : getUnannotatedTypeReference(0)); > this.intPtr--; > } >-protected void consumeTypeArgumentReferenceType2() { >+protected void consumeTypeArgumentReferenceType2(boolean hasTypeAnnotations) { > concatGenericsLists(); >- pushOnGenericsStack(getTypeReference(0)); >+ pushOnGenericsStack(hasTypeAnnotations ? getTypeReference(0) : getUnannotatedTypeReference(0)); > this.intPtr--; > } > protected void consumeTypeArguments() { >@@ -7780,13 +8257,13 @@ > superType.bits |= ASTNode.IsSuperType; > this.genericsStack[this.genericsPtr] = typeParameter; > } >-protected void consumeTypeParameter1WithExtendsAndBounds() { >+protected void consumeTypeParameter1WithExtendsAndBounds(boolean hasTypeAnnotations) { > //TypeParameter1 ::= TypeParameterHeader 'extends' ReferenceType AdditionalBoundList1 > int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--]; > TypeReference[] bounds = new TypeReference[additionalBoundsLength]; > this.genericsPtr -= additionalBoundsLength; > System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 0, additionalBoundsLength); >- TypeReference superType = getTypeReference(this.intStack[this.intPtr--]); >+ TypeReference superType = hasTypeAnnotations ? getTypeReference(this.intStack[this.intPtr--]) : getUnannotatedTypeReference(this.intStack[this.intPtr--]); > TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr]; > typeParameter.declarationSourceEnd = bounds[additionalBoundsLength - 1].sourceEnd; > typeParameter.type = superType; >@@ -7799,6 +8276,15 @@ > protected void consumeTypeParameterHeader() { > //TypeParameterHeader ::= Identifier > TypeParameter typeParameter = new TypeParameter(); >+ int length; >+ if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) { >+ System.arraycopy( >+ this.typeAnnotationStack, >+ (this.typeAnnotationPtr -= length) + 1, >+ typeParameter.annotations = new Annotation[length], >+ 0, >+ length); >+ } > long pos = this.identifierPositionStack[this.identifierPtr]; > final int end = (int) pos; > typeParameter.declarationSourceEnd = end; >@@ -7844,21 +8330,21 @@ > (TypeParameter) this.genericsStack[this.genericsPtr]); > } > } >-protected void consumeTypeParameterWithExtends() { >+protected void consumeTypeParameterWithExtends(boolean hasTypeAnnotations) { > //TypeParameter ::= TypeParameterHeader 'extends' ReferenceType >- TypeReference superType = getTypeReference(this.intStack[this.intPtr--]); >+ TypeReference superType = hasTypeAnnotations ? getTypeReference(this.intStack[this.intPtr--]) : getUnannotatedTypeReference(this.intStack[this.intPtr--]); > TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr]; > typeParameter.declarationSourceEnd = superType.sourceEnd; > typeParameter.type = superType; > superType.bits |= ASTNode.IsSuperType; > } >-protected void consumeTypeParameterWithExtendsAndBounds() { >+protected void consumeTypeParameterWithExtendsAndBounds(boolean hasTypeAnnotations) { > //TypeParameter ::= TypeParameterHeader 'extends' ReferenceType AdditionalBoundList > int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--]; > TypeReference[] bounds = new TypeReference[additionalBoundsLength]; > this.genericsPtr -= additionalBoundsLength; > System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 0, additionalBoundsLength); >- TypeReference superType = getTypeReference(this.intStack[this.intPtr--]); >+ TypeReference superType = hasTypeAnnotations ? getTypeReference(this.intStack[this.intPtr--]) : getUnannotatedTypeReference(this.intStack[this.intPtr--]); > TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr]; > typeParameter.type = superType; > superType.bits |= ASTNode.IsSuperType; >@@ -8030,17 +8516,17 @@ > wildcard.sourceStart = this.intStack[this.intPtr--]; > this.genericsStack[this.genericsPtr] = wildcard; > } >-protected void consumeWildcardBoundsExtends() { >+protected void consumeWildcardBoundsExtends(boolean hasTypeAnnotations) { > Wildcard wildcard = new Wildcard(Wildcard.EXTENDS); >- wildcard.bound = getTypeReference(this.intStack[this.intPtr--]); >+ wildcard.bound = hasTypeAnnotations ? getTypeReference(this.intStack[this.intPtr--]) : getUnannotatedTypeReference(this.intStack[this.intPtr--]); > wildcard.sourceEnd = wildcard.bound.sourceEnd; > this.intPtr--; // remove end position of the '?' > wildcard.sourceStart = this.intStack[this.intPtr--]; > pushOnGenericsStack(wildcard); > } >-protected void consumeWildcardBoundsSuper() { >+protected void consumeWildcardBoundsSuper(boolean hasTypeAnnotations) { > Wildcard wildcard = new Wildcard(Wildcard.SUPER); >- wildcard.bound = getTypeReference(this.intStack[this.intPtr--]); >+ wildcard.bound = hasTypeAnnotations ? getTypeReference(this.intStack[this.intPtr--]) : getUnannotatedTypeReference(this.intStack[this.intPtr--]); > this.intPtr--; // remove the starting position of the super keyword > wildcard.sourceEnd = wildcard.bound.sourceEnd; > this.intPtr--; // remove end position of the '?' >@@ -8096,6 +8582,11 @@ > protected TypeReference copyDims(TypeReference typeRef, int dim) { > return typeRef.copyDims(dim); > } >+ >+protected TypeReference copyDims(TypeReference typeRef, int dim, Annotation[][]annotationsOnDimensions) { >+ return typeRef.copyDims(dim, annotationsOnDimensions); >+} >+ > protected FieldDeclaration createFieldDeclaration(char[] fieldDeclarationName, int sourceStart, int sourceEnd) { > return new FieldDeclaration(fieldDeclarationName, sourceStart, sourceEnd); > } >@@ -8576,13 +9067,30 @@ > return exp; > } > protected TypeReference getTypeReference(int dim) { >+ TypeReference ref = getUnannotatedTypeReference(dim); >+ int length; >+ if (this.typeAnnotationLengthPtr >= 0 && (length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) { >+ System.arraycopy( >+ this.typeAnnotationStack, >+ (this.typeAnnotationPtr -= length) + 1, >+ ref.annotations = new Annotation[length], >+ 0, >+ length); >+ } >+ return ref; >+} >+protected TypeReference getUnannotatedTypeReference(int dim) { > /* build a Reference on a variable that may be qualified or not > This variable is a type reference and dim will be its dimensions*/ > > TypeReference ref; >+ Annotation [][] annotationsOnDimensions = null; > int length = this.identifierLengthStack[this.identifierLengthPtr--]; > if (length < 0) { //flag for precompiled type reference on base types >- ref = TypeReference.baseTypeReference(-length, dim); >+ if (dim > 0) { >+ annotationsOnDimensions = getAnnotationsOnDimensions(dim); >+ } >+ ref = TypeReference.baseTypeReference(-length, dim, annotationsOnDimensions); > ref.sourceStart = this.intStack[this.intPtr--]; > if (dim == 0) { > ref.sourceEnd = this.intStack[this.intPtr--]; >@@ -8604,10 +9112,12 @@ > this.identifierStack[this.identifierPtr], > this.identifierPositionStack[this.identifierPtr--]); > } else { >+ annotationsOnDimensions = getAnnotationsOnDimensions(dim); > ref = > new ArrayTypeReference( > this.identifierStack[this.identifierPtr], > dim, >+ annotationsOnDimensions, > this.identifierPositionStack[this.identifierPtr--]); > ref.sourceEnd = this.endPosition; > } >@@ -8627,7 +9137,8 @@ > if (dim == 0) { > ref = new QualifiedTypeReference(tokens, positions); > } else { >- ref = new ArrayQualifiedTypeReference(tokens, dim, positions); >+ annotationsOnDimensions = getAnnotationsOnDimensions(dim); >+ ref = new ArrayQualifiedTypeReference(tokens, dim, annotationsOnDimensions, positions); > ref.sourceEnd = this.endPosition; > } > } >@@ -8635,12 +9146,13 @@ > return ref; > } > protected TypeReference getTypeReferenceForGenericType(int dim, int identifierLength, int numberOfIdentifiers) { >+ Annotation[][] annotationsOnDimensions = dim == 0 ? null : getAnnotationsOnDimensions(dim); > if (identifierLength == 1 && numberOfIdentifiers == 1) { > int currentTypeArgumentsLength = this.genericsLengthStack[this.genericsLengthPtr--]; > TypeReference[] typeArguments = new TypeReference[currentTypeArgumentsLength]; > this.genericsPtr -= currentTypeArgumentsLength; > System.arraycopy(this.genericsStack, this.genericsPtr + 1, typeArguments, 0, currentTypeArgumentsLength); >- ParameterizedSingleTypeReference parameterizedSingleTypeReference = new ParameterizedSingleTypeReference(this.identifierStack[this.identifierPtr], typeArguments, dim, this.identifierPositionStack[this.identifierPtr--]); >+ ParameterizedSingleTypeReference parameterizedSingleTypeReference = new ParameterizedSingleTypeReference(this.identifierStack[this.identifierPtr], typeArguments, dim, annotationsOnDimensions, this.identifierPositionStack[this.identifierPtr--]); > if (dim != 0) { > parameterizedSingleTypeReference.sourceEnd = this.endStatementPosition; > } >@@ -8674,7 +9186,7 @@ > currentIdentifiersLength = this.identifierLengthStack[this.identifierLengthPtr--]; > } > } >- ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference = new ParameterizedQualifiedTypeReference(tokens, typeArguments, dim, positions); >+ ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference = new ParameterizedQualifiedTypeReference(tokens, typeArguments, dim, annotationsOnDimensions, positions); > if (dim != 0) { > parameterizedQualifiedTypeReference.sourceEnd = this.endStatementPosition; > } >@@ -8895,6 +9407,9 @@ > this.astLengthPtr = -1; > this.expressionPtr = -1; > this.expressionLengthPtr = -1; >+ this.unattachedAnnotationPtr = -1; >+ this.typeAnnotationLengthPtr = -1; >+ this.typeAnnotationPtr = -1; > this.identifierPtr = -1; > this.identifierLengthPtr = -1; > this.intPtr = -1; >@@ -10025,6 +10540,37 @@ > } > this.astLengthStack[this.astLengthPtr] = 1; > } >+protected void pushOnTypeAnnotationStack(Annotation annotation) { >+ >+ int stackLength = this.typeAnnotationStack.length; >+ if (++this.typeAnnotationPtr >= stackLength) { >+ System.arraycopy( >+ this.typeAnnotationStack, 0, >+ this.typeAnnotationStack = new Annotation[stackLength + TypeAnnotationStackIncrement], 0, >+ stackLength); >+ } >+ this.typeAnnotationStack[this.typeAnnotationPtr] = annotation; >+ >+ stackLength = this.typeAnnotationLengthStack.length; >+ if (++this.typeAnnotationLengthPtr >= stackLength) { >+ System.arraycopy( >+ this.typeAnnotationLengthStack, 0, >+ this.typeAnnotationLengthStack = new int[stackLength + TypeAnnotationStackIncrement], 0, >+ stackLength); >+ } >+ this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr] = 1; >+} >+protected void pushOnTypeAnnotationLengthStack(int pos) { >+ >+ int stackLength = this.typeAnnotationLengthStack.length; >+ if (++this.typeAnnotationLengthPtr >= stackLength) { >+ System.arraycopy( >+ this.typeAnnotationLengthStack, 0, >+ this.typeAnnotationLengthStack = new int[stackLength + TypeAnnotationStackIncrement], 0, >+ stackLength); >+ } >+ this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr] = pos; >+} > protected void pushOnExpressionStack(Expression expr) { > > int stackLength = this.expressionStack.length; >@@ -10445,6 +10991,9 @@ > this.astLengthPtr = -1; > this.expressionPtr = -1; > this.expressionLengthPtr = -1; >+ this.unattachedAnnotationPtr = -1; >+ this.typeAnnotationLengthPtr = -1; >+ this.typeAnnotationPtr = -1; > this.identifierPtr = -1; > this.identifierLengthPtr = -1; > this.intPtr = -1; >Index: compiler/org/eclipse/jdt/core/compiler/IProblem.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java,v >retrieving revision 1.215 >diff -u -r1.215 IProblem.java >--- compiler/org/eclipse/jdt/core/compiler/IProblem.java 22 Sep 2009 14:56:46 -0000 1.215 >+++ compiler/org/eclipse/jdt/core/compiler/IProblem.java 24 Sep 2009 17:16:38 -0000 >@@ -1227,6 +1227,12 @@ > int UnusedWarningToken = Internal + 635; > /** @since 3.6 */ > int MissingOverrideAnnotationForInterfaceMethodImplementation = MethodRelated + 636; >+ /** @since 3.6 */ >+ int InvalidUsageOfTypeAnnotations = Syntax + Internal + 637; >+ /** @since 3.6 */ >+ int InvalidUsageOfReceiverAnnotations = Syntax + Internal + 638; >+ /** @since 3.6 */ >+ int misplacedTypeAnnotations = Syntax + Internal + 639; > > /** > * More problems in generics >Index: compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties,v >retrieving revision 1.249 >diff -u -r1.249 messages.properties >--- compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties 22 Sep 2009 14:56:46 -0000 1.249 >+++ compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties 24 Sep 2009 17:16:48 -0000 >@@ -561,7 +561,9 @@ > 634 = The method {0}({1}) of type {2} must override or implement a supertype method > 635 = Unnecessary @SuppressWarnings("{0}") > 636 = The method {0}({1}) of type {2} should be tagged with @Override since it actually overrides a superinterface method >- >+637 = Syntax error, type annotations are available only when source level is at least 1.7 >+638 = Receiver annotations are illegal in a static method context >+639 = Syntax error, type annotations are illegal here > ### MORE GENERICS > 660 = Unused type arguments for the non generic constructor {0}({1}) of type {2}; it should not be parameterized with arguments <{3}> > >Index: compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java,v >retrieving revision 1.394 >diff -u -r1.394 ProblemReporter.java >--- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 22 Sep 2009 14:56:46 -0000 1.394 >+++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 24 Sep 2009 17:16:48 -0000 >@@ -7422,4 +7422,31 @@ > typeRef.sourceStart, > typeRef.sourceEnd); > } >+ >+public void invalidUsageOfTypeAnnotations(Annotation annotation) { >+ this.handle( >+ IProblem.InvalidUsageOfTypeAnnotations, >+ NoArgument, >+ NoArgument, >+ annotation.sourceStart, >+ annotation.sourceEnd); >+} >+ >+public void illegalReceiverAnnotations(Annotation first, Annotation last) { >+ this.handle( >+ IProblem.InvalidUsageOfReceiverAnnotations, >+ NoArgument, >+ NoArgument, >+ first.sourceStart, >+ last.sourceEnd); >+} >+ >+public void misplacedTypeAnnotations(Annotation first, Annotation last) { >+ this.handle( >+ IProblem.misplacedTypeAnnotations, >+ NoArgument, >+ NoArgument, >+ first.sourceStart, >+ last.sourceEnd); >+} > } >Index: eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java,v >retrieving revision 1.69 >diff -u -r1.69 CodeSnippetParser.java >--- eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java 22 Sep 2009 15:37:31 -0000 1.69 >+++ eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java 24 Sep 2009 17:16:49 -0000 >@@ -721,6 +721,9 @@ > > // reset stacks in consistent state > this.expressionPtr = -1; >+ this.unattachedAnnotationPtr = -1; >+ this.typeAnnotationLengthPtr = -1; >+ this.typeAnnotationPtr = -1; > this.identifierPtr = -1; > this.identifierLengthPtr = -1; > >Index: codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java,v >retrieving revision 1.90 >diff -u -r1.90 SelectionParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java 25 Jun 2009 14:48:54 -0000 1.90 >+++ codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java 24 Sep 2009 17:16:38 -0000 >@@ -233,11 +233,11 @@ > super.classInstanceCreation(hasClassBody); > } > } >-protected void consumeArrayCreationExpressionWithoutInitializer() { >+protected void consumeArrayCreationExpressionWithoutInitializer(boolean hasTypeAnnotations) { > // ArrayCreationWithoutArrayInitializer ::= 'new' PrimitiveType DimWithOrWithOutExprs > // ArrayCreationWithoutArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs > >- super.consumeArrayCreationExpressionWithoutInitializer(); >+ super.consumeArrayCreationExpressionWithoutInitializer(hasTypeAnnotations); > > ArrayAllocationExpression alloc = (ArrayAllocationExpression)this.expressionStack[this.expressionPtr]; > if (alloc.type == this.assistNode){ >@@ -248,10 +248,10 @@ > this.isOrphanCompletionNode = true; > } > } >-protected void consumeArrayCreationExpressionWithInitializer() { >+protected void consumeArrayCreationExpressionWithInitializer(boolean hasTypeAnnotations) { > // ArrayCreationWithArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs ArrayInitializer > >- super.consumeArrayCreationExpressionWithInitializer(); >+ super.consumeArrayCreationExpressionWithInitializer(hasTypeAnnotations); > > ArrayAllocationExpression alloc = (ArrayAllocationExpression)this.expressionStack[this.expressionPtr]; > if (alloc.type == this.assistNode){ >@@ -262,25 +262,25 @@ > this.isOrphanCompletionNode = true; > } > } >-protected void consumeCastExpressionLL1() { >+protected void consumeCastExpressionLL1(boolean hasTypeAnnotations) { > popElement(K_CAST_STATEMENT); >- super.consumeCastExpressionLL1(); >+ super.consumeCastExpressionLL1(hasTypeAnnotations); > } >-protected void consumeCastExpressionWithGenericsArray() { >+protected void consumeCastExpressionWithGenericsArray(boolean hasTypeAnnotations) { > popElement(K_CAST_STATEMENT); >- super.consumeCastExpressionWithGenericsArray(); >+ super.consumeCastExpressionWithGenericsArray(hasTypeAnnotations); > } >-protected void consumeCastExpressionWithNameArray() { >+protected void consumeCastExpressionWithNameArray(boolean hasTypeAnnotations) { > popElement(K_CAST_STATEMENT); >- super.consumeCastExpressionWithNameArray(); >+ super.consumeCastExpressionWithNameArray(hasTypeAnnotations); > } >-protected void consumeCastExpressionWithPrimitiveType() { >+protected void consumeCastExpressionWithPrimitiveType(boolean hasTypeAnnotations) { > popElement(K_CAST_STATEMENT); >- super.consumeCastExpressionWithPrimitiveType(); >+ super.consumeCastExpressionWithPrimitiveType(hasTypeAnnotations); > } >-protected void consumeCastExpressionWithQualifiedGenericsArray() { >+protected void consumeCastExpressionWithQualifiedGenericsArray(boolean hasTypeAnnotations) { > popElement(K_CAST_STATEMENT); >- super.consumeCastExpressionWithQualifiedGenericsArray(); >+ super.consumeCastExpressionWithQualifiedGenericsArray(hasTypeAnnotations); > } > protected void consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() { > // ClassInstanceCreationExpression ::= Primary '.' 'new' TypeArguments SimpleName '(' ArgumentListopt ')' ClassBodyopt >@@ -550,7 +550,7 @@ > } > int firstDimensions = this.intStack[this.intPtr--]; > final int typeDimensions = firstDimensions + extendedDimensions; >- TypeReference type = getTypeReference(typeDimensions); >+ TypeReference type = getUnannotatedTypeReference(typeDimensions); > if (isVarArgs) { > type = copyDims(type, typeDimensions + 1); > if (extendedDimensions == 0) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 287648
:
145655
|
145779
|
145880
|
146186
|
146401
|
146602
|
148041
|
148087
|
149501
|
149970
|
150486
|
187248
|
217341
|
217581
|
217668
|
217685
|
217786