Bug 526940: [9] The package x.y.z does not exist or is empty - 2nd
edition
Change-Id: Ibef01a338f3a78c02ee81d7e4611cfcc6ca0175e
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
index b8c8f75..6bff4de 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
@@ -5983,6 +5983,8 @@
// flush comments defined prior to import statements
impt.declarationEnd = this.endStatementPosition;
impt.declarationSourceEnd = flushCommentsDefinedPriorTo(impt.declarationSourceEnd);
+ if (this.firstToken == TokenNameQUESTION)
+ this.unstackedAct = ACCEPT_ACTION; // force termination at goal
}
protected void consumePackageDeclarationName() {
// PackageDeclarationName ::= PackageComment 'package' Name RejectTypeAnnotations
@@ -11665,6 +11667,10 @@
consumeRule(act);
act = this.unstackedAct;
+ if (act == ACCEPT_ACTION) {
+ break ProcessTerminals;
+ }
+
if (DEBUG_AUTOMATON) {
if (act <= NUM_RULES) {
System.out.print(" - "); //$NON-NLS-1$