|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.aspectj.org.eclipse.jdt.internal.core.util.PublicScanner
public class PublicScanner
| Constructor Summary | |
|---|---|
PublicScanner()
|
|
PublicScanner(boolean tokenizeComments,
boolean tokenizeWhiteSpace,
boolean checkNonExternalizedStringLiterals,
long sourceLevel,
char[][] taskTags,
char[][] taskPriorities,
boolean isTaskCaseSensitive)
|
|
PublicScanner(boolean tokenizeComments,
boolean tokenizeWhiteSpace,
boolean checkNonExternalizedStringLiterals,
long sourceLevel,
long complianceLevel,
char[][] taskTags,
char[][] taskPriorities,
boolean isTaskCaseSensitive)
|
|
| Method Summary | |
|---|---|
boolean |
atEnd()
|
void |
checkTaskTag(int commentStart,
int commentEnd)
|
char[] |
getCurrentIdentifierSource()
|
java.lang.String |
getCurrentStringLiteral()
|
int |
getCurrentTokenEndPosition()
Answers the ending position of the current token inside the original source. |
char[] |
getCurrentTokenSource()
Answers the current identifier source, after unicode escape sequences have been translated into unicode characters. |
char[] |
getCurrentTokenSourceString()
|
int |
getCurrentTokenStartPosition()
Answers the starting position of the current token inside the original source. |
java.lang.String |
getCurrentTokenString()
|
int |
getLineEnd(int lineNumber)
Answers the ending position of a given line number. |
int[] |
getLineEnds()
Answers an array of the ending positions of the lines encountered so far. |
int |
getLineNumber(int position)
Search the line number corresponding to a specific position |
int |
getLineStart(int lineNumber)
Search the source position corresponding to the beginning of a given line number Line numbers are 1-based, and relative to the scanner initialPosition. |
int |
getNextChar()
|
boolean |
getNextChar(char testedChar)
|
int |
getNextChar(char testedChar1,
char testedChar2)
|
boolean |
getNextCharAsDigit()
|
boolean |
getNextCharAsDigit(int radix)
|
boolean |
getNextCharAsJavaIdentifierPart()
|
boolean |
getNextCharAsJavaIdentifierPartWithBoundCheck()
|
int |
getNextCharWithBoundChecks()
|
int |
getNextToken()
Read the next token in the source, and answers its ID as specified by ITerminalSymbols. |
void |
getNextUnicodeChar()
|
NLSTag[] |
getNLSTags()
|
char[] |
getRawTokenSource()
Answers the current identifier source, before unicode escape sequences have been translated into unicode characters. |
char[] |
getRawTokenSourceEnd()
|
char[] |
getSource()
Answers the original source being processed (not a copy of it). |
protected boolean |
isFirstTag()
|
static boolean |
isIdentifier(int token)
|
static boolean |
isKeyword(int token)
|
static boolean |
isLiteral(int token)
|
void |
jumpOverMethodBody()
|
boolean |
jumpOverUnicodeWhiteSpace()
|
void |
pushLineSeparator()
|
void |
pushUnicodeLineSeparator()
|
void |
recordComment(int token)
|
void |
resetTo(int begin,
int end)
Reposition the scanner on some portion of the original source. |
protected void |
scanEscapeCharacter()
|
int |
scanIdentifier()
|
int |
scanIdentifierOrKeyword()
|
int |
scanIdentifierOrKeywordWithBoundCheck()
|
int |
scanNumber(boolean dotPrefix)
|
void |
setSource(char[] sourceString)
Set the scanner source to process. |
void |
setSource(char[] contents,
CompilationResult compilationResult)
|
void |
setSource(CompilationResult compilationResult)
|
java.lang.String |
toString()
|
java.lang.String |
toStringAction(int act)
|
void |
unicodeInitializeBuffer(int length)
|
void |
unicodeStore()
|
void |
unicodeStore(char character)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public long sourceLevel
public long complianceLevel
public boolean useAssertAsAnIndentifier
public boolean containsAssertKeyword
public boolean useEnumAsAnIndentifier
public boolean recordLineSeparator
public char currentCharacter
public int startPosition
public int currentPosition
public int initialPosition
public int eofPosition
public boolean skipComments
public boolean tokenizeComments
public boolean tokenizeWhiteSpace
public char[] source
public char[] withoutUnicodeBuffer
public int withoutUnicodePtr
public boolean unicodeAsBackSlash
public boolean scanningFloatLiteral
public static final int COMMENT_ARRAYS_SIZE
public int[] commentStops
public int[] commentStarts
public int[] commentTagStarts
public int commentPtr
protected int lastCommentLinePosition
public char[][] foundTaskTags
public char[][] foundTaskMessages
public char[][] foundTaskPriorities
public int[][] foundTaskPositions
public int foundTaskCount
public char[][] taskTags
public char[][] taskPriorities
public boolean isTaskCaseSensitive
public boolean diet
public int[] lineEnds
public int linePtr
public boolean wasAcr
public static final java.lang.String END_OF_SOURCE
public static final java.lang.String INVALID_HEXA
public static final java.lang.String INVALID_OCTAL
public static final java.lang.String INVALID_CHARACTER_CONSTANT
public static final java.lang.String INVALID_ESCAPE
public static final java.lang.String INVALID_INPUT
public static final java.lang.String INVALID_UNICODE_ESCAPE
public static final java.lang.String INVALID_FLOAT
public static final java.lang.String INVALID_LOW_SURROGATE
public static final java.lang.String INVALID_HIGH_SURROGATE
public static final java.lang.String NULL_SOURCE_STRING
public static final java.lang.String UNTERMINATED_STRING
public static final java.lang.String UNTERMINATED_COMMENT
public static final java.lang.String INVALID_CHAR_IN_STRING
public static final java.lang.String INVALID_DIGIT
public static final java.lang.String INVALID_BINARY
public static final java.lang.String BINARY_LITERAL_NOT_BELOW_17
public static final java.lang.String ILLEGAL_HEXA_LITERAL
public static final java.lang.String INVALID_UNDERSCORE
public static final java.lang.String UNDERSCORES_IN_LITERALS_NOT_BELOW_17
public static final int OptimizedLength
public final char[][][][] charArray_length
public static final char[] TAG_PREFIX
public static final int TAG_PREFIX_LENGTH
public static final char TAG_POSTFIX
public static final int TAG_POSTFIX_LENGTH
protected int nlsTagsPtr
public boolean checkNonExternalizedStringLiterals
protected int lastPosition
public boolean returnOnlyGreater
public boolean insideRecovery
public static final int RoundBracket
public static final int SquareBracket
public static final int CurlyBracket
public static final int BracketKinds
public static final int LOW_SURROGATE_MIN_VALUE
public static final int HIGH_SURROGATE_MIN_VALUE
public static final int HIGH_SURROGATE_MAX_VALUE
public static final int LOW_SURROGATE_MAX_VALUE
| Constructor Detail |
|---|
public PublicScanner()
public PublicScanner(boolean tokenizeComments,
boolean tokenizeWhiteSpace,
boolean checkNonExternalizedStringLiterals,
long sourceLevel,
long complianceLevel,
char[][] taskTags,
char[][] taskPriorities,
boolean isTaskCaseSensitive)
public PublicScanner(boolean tokenizeComments,
boolean tokenizeWhiteSpace,
boolean checkNonExternalizedStringLiterals,
long sourceLevel,
char[][] taskTags,
char[][] taskPriorities,
boolean isTaskCaseSensitive)
| Method Detail |
|---|
public final boolean atEnd()
public void checkTaskTag(int commentStart,
int commentEnd)
throws InvalidInputException
InvalidInputExceptionpublic char[] getCurrentIdentifierSource()
public int getCurrentTokenEndPosition()
IScanner
getCurrentTokenEndPosition in interface IScannerpublic char[] getCurrentTokenSource()
IScanner\\u0061bc then it will answer abc.
getCurrentTokenSource in interface IScannerpublic final java.lang.String getCurrentTokenString()
public char[] getCurrentTokenSourceString()
public final java.lang.String getCurrentStringLiteral()
public final char[] getRawTokenSource()
IScanner\\u0061bc then it will answer \\u0061bc.
getRawTokenSource in interface IScannerpublic final char[] getRawTokenSourceEnd()
public int getCurrentTokenStartPosition()
IScanner
getCurrentTokenStartPosition in interface IScannerpublic final int getLineEnd(int lineNumber)
IScanner
getLineEnd in interface IScannerlineNumber - the given line number
public final int[] getLineEnds()
IScanner
getLineEnds in interface IScannerpublic final int getLineStart(int lineNumber)
getLineStart in interface IScannerlineNumber - int
public final int getNextChar()
public final int getNextCharWithBoundChecks()
public final boolean getNextChar(char testedChar)
public final int getNextChar(char testedChar1,
char testedChar2)
public final boolean getNextCharAsDigit()
throws InvalidInputException
InvalidInputExceptionpublic final boolean getNextCharAsDigit(int radix)
public boolean getNextCharAsJavaIdentifierPartWithBoundCheck()
public boolean getNextCharAsJavaIdentifierPart()
public int scanIdentifier()
throws InvalidInputException
InvalidInputException
public int getNextToken()
throws InvalidInputException
IScannerITerminalSymbols.
Note that the actual token ID values are subject to change if new keywords were added to the language
(for instance, 'assert' is a keyword in 1.4).
getNextToken in interface IScannerInvalidInputException - in case a lexical error was detected while reading the current token
public void getNextUnicodeChar()
throws InvalidInputException
InvalidInputExceptionpublic NLSTag[] getNLSTags()
public char[] getSource()
IScanner
getSource in interface IScannerprotected boolean isFirstTag()
public final void jumpOverMethodBody()
public final boolean jumpOverUnicodeWhiteSpace()
throws InvalidInputException
InvalidInputExceptionpublic final void pushLineSeparator()
public final void pushUnicodeLineSeparator()
public void recordComment(int token)
public void resetTo(int begin,
int end)
ITerminalSymbols.TokenNameEOF).
resetTo in interface IScannerbegin - the given start positionend - the given end position
protected final void scanEscapeCharacter()
throws InvalidInputException
InvalidInputExceptionpublic int scanIdentifierOrKeywordWithBoundCheck()
public int scanIdentifierOrKeyword()
public int scanNumber(boolean dotPrefix)
throws InvalidInputException
InvalidInputExceptionpublic final int getLineNumber(int position)
getLineNumber in interface IScannerposition - int
public final void setSource(char[] sourceString)
IScannernull, this clears the source.
setSource in interface IScannersourceString - the given source
public final void setSource(char[] contents,
CompilationResult compilationResult)
public final void setSource(CompilationResult compilationResult)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringAction(int act)
public void unicodeInitializeBuffer(int length)
public void unicodeStore()
public void unicodeStore(char character)
public static boolean isIdentifier(int token)
public static boolean isLiteral(int token)
public static boolean isKeyword(int token)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||