diff options
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java')
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java | 6 |
1 files changed, 6 insertions, 0 deletions
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 b8c8f75508..6bff4deb61 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 @@ protected void consumePackageDeclaration() { // 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 @@ try { consumeRule(act); act = this.unstackedAct; + if (act == ACCEPT_ACTION) { + break ProcessTerminals; + } + if (DEBUG_AUTOMATON) { if (act <= NUM_RULES) { System.out.print(" - "); //$NON-NLS-1$ |