Index: compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java,v retrieving revision 1.154 diff -u -r1.154 Scanner.java --- compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java 5 Aug 2005 15:30:41 -0000 1.154 +++ compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java 9 Aug 2005 18:55:55 -0000 @@ -905,6 +905,8 @@ if (this.currentPosition > this.eofPosition) return TokenNameEOF; } + if (this.currentPosition > this.eofPosition) + return TokenNameEOF; if (checkIfUnicode) { isWhiteSpace = jumpOverUnicodeWhiteSpace(); offset = this.currentPosition - offset; @@ -955,12 +957,7 @@ this.withoutUnicodePtr = 0; } } - //little trick to get out in the middle of a source compuation - if (this.currentPosition > this.eofPosition) - return TokenNameEOF; - // ---------Identify the next token------------- - switch (this.currentCharacter) { case '@' : /* if (this.sourceLevel >= ClassFileConstants.JDK1_5) { @@ -2433,11 +2430,6 @@ } this.commentPtr = -1; // reset comment stack this.foundTaskCount = 0; - -// // if resetTo is used with being > than end. -// if (begin > this.eofPosition) { -// begin = this.eofPosition; -// } } public final void scanEscapeCharacter() throws InvalidInputException { Index: model/org/eclipse/jdt/internal/core/util/PublicScanner.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java,v retrieving revision 1.75 diff -u -r1.75 PublicScanner.java --- model/org/eclipse/jdt/internal/core/util/PublicScanner.java 5 Aug 2005 15:30:41 -0000 1.75 +++ model/org/eclipse/jdt/internal/core/util/PublicScanner.java 9 Aug 2005 18:55:55 -0000 @@ -904,6 +904,9 @@ if (this.currentPosition > this.eofPosition) return TokenNameEOF; } + //little trick to get out in the middle of a source compuation + if (this.currentPosition > this.eofPosition) + return TokenNameEOF; if (checkIfUnicode) { isWhiteSpace = jumpOverUnicodeWhiteSpace(); offset = this.currentPosition - offset; @@ -954,12 +957,7 @@ this.withoutUnicodePtr = 0; } } - //little trick to get out in the middle of a source compuation - if (this.currentPosition > this.eofPosition) - return TokenNameEOF; - // ---------Identify the next token------------- - switch (this.currentCharacter) { case '@' : /* if (this.sourceLevel >= ClassFileConstants.JDK1_5) { @@ -2421,11 +2419,6 @@ } this.commentPtr = -1; // reset comment stack this.foundTaskCount = 0; - -// // if resetTo is used with being > than end. -// if (begin > this.eofPosition) { -// begin = this.eofPosition; -// } } public final void scanEscapeCharacter() throws InvalidInputException {