Package com.sun.tools.corba.ee.idl
Class Scanner
java.lang.Object
com.sun.tools.corba.ee.idl.Scanner
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private float
private ScannerData
private Stack
private boolean
(package private) static final int
private boolean
(package private) boolean
(package private) static final int
(package private) static final int
(package private) static final int
private boolean
-
Constructor Summary
ConstructorsConstructorDescriptionScanner
(IncludeEntry file, String[] keywords, boolean vbose, boolean emitAllIncludes, float cLevel, boolean debug) -
Method Summary
Modifier and TypeMethodDescriptionprivate String
appendToString
(String string, boolean allowQuote, boolean allowCharLit, boolean allowComment) private String
blankOutMatch
(String string, int start, int length) (package private) String
(package private) int
(package private) int
(package private) IncludeEntry
(package private) String
filename()
private int
private String
Extract a block comment from the input buffer.private Token
getCharacterToken
(boolean isWide) private Token
private Token
getExponent
(String string) private Token
getFraction
(String string) private Token
private Token
getHexNumber
(String string) private String
getIdentifier
(String string) private Token
private String
Extract a line comment from the input buffer.private int
getNDigitHexNumber
(int n) private Token
private Token
private Token
(package private) String
(package private) Token
getToken()
(package private) String
getUntil
(char c) (package private) String
getUntil
(char c, boolean allowQuote, boolean allowCharLit, boolean allowComment) (package private) String
getUntil
(char c1, char c2) private String
Starting at a quote, reads a string with possible unicode or octal values until an end quote.private boolean
isHexChar
(char hex) private Token
isItHex()
(package private) String
(package private) int
(package private) int
private boolean
matchesClosedWildKeyword
(String string) private String
matchesOpenWildcard
(String string) (package private) void
readChar()
(package private) void
readFile
(IncludeEntry file) (package private) void
readFile
(IncludeEntry file, String filename) private Token
(package private) void
scanIncludedFile
(IncludeEntry file, String filename, boolean includeIsImport) (package private) void
scanString
(String string) private Token
singleCharEscapeSequence
(boolean isWide) private void
(package private) void
(package private) Token
skipUntil
(char c) (package private) void
(package private) void
sortKeywords
(String[] keywords) private void
unread
(char ch) private boolean
wildcardAtEitherEnd
(String string) private boolean
wildcardsInside
(String string)
-
Field Details
-
Star
static final int Star- See Also:
-
Plus
static final int Plus- See Also:
-
Dot
static final int Dot- See Also:
-
None
static final int None- See Also:
-
BOL
private int BOL -
data
-
dataStack
-
keywords
-
openEndedKeywords
-
wildcardKeywords
-
verbose
private boolean verbose -
escapedOK
boolean escapedOK -
emitAll
private boolean emitAll -
corbaLevel
private float corbaLevel -
debug
private boolean debug
-
-
Constructor Details
-
Scanner
Scanner(IncludeEntry file, String[] keywords, boolean vbose, boolean emitAllIncludes, float cLevel, boolean debug) throws IOException - Throws:
IOException
-
-
Method Details
-
sortKeywords
-
wildcardAtEitherEnd
-
wildcardsInside
-
readFile
- Throws:
IOException
-
readFile
- Throws:
IOException
-
getToken
- Throws:
IOException
-
scanString
-
scanIncludedFile
void scanIncludedFile(IncludeEntry file, String filename, boolean includeIsImport) throws IOException - Throws:
IOException
-
unread
private void unread(char ch) -
readChar
- Throws:
IOException
-
getWString
Starting at a quote, reads a string with possible unicode or octal values until an end quote. Doesn't handle line feeds or comments.- Throws:
IOException
-
getCharacterToken
- Throws:
IOException
-
singleCharEscapeSequence
- Throws:
IOException
-
getString
- Throws:
IOException
-
matchesClosedWildKeyword
-
matchesOpenWildcard
-
blankOutMatch
-
getIdentifier
-
getDirective
- Throws:
IOException
-
getNumber
- Throws:
IOException
-
getFractionNoInteger
- Throws:
IOException
-
getFraction
- Throws:
IOException
-
getExponent
- Throws:
IOException
-
isItHex
- Throws:
IOException
-
getOctalNumber
- Throws:
IOException
-
getHexNumber
- Throws:
IOException
-
getNDigitHexNumber
- Throws:
IOException
-
isHexChar
private boolean isHexChar(char hex) -
get3DigitOctalNumber
- Throws:
IOException
-
getInteger
- Throws:
IOException
-
replaceTrigraph
- Throws:
IOException
-
skipWhiteSpace
- Throws:
IOException
-
skipBlockComment
- Throws:
IOException
-
skipLineComment
- Throws:
IOException
-
getLineComment
Extract a line comment from the input buffer.- Throws:
IOException
-
getBlockComment
Extract a block comment from the input buffer.- Throws:
IOException
-
skipUntil
- Throws:
IOException
-
getUntil
- Throws:
IOException
-
getUntil
String getUntil(char c, boolean allowQuote, boolean allowCharLit, boolean allowComment) throws IOException - Throws:
IOException
-
getUntil
- Throws:
IOException
-
appendToString
private String appendToString(String string, boolean allowQuote, boolean allowCharLit, boolean allowComment) throws IOException - Throws:
IOException
-
getStringToEOL
- Throws:
IOException
-
filename
String filename() -
fileEntry
IncludeEntry fileEntry() -
currentLineNumber
int currentLineNumber() -
lastTokenLineNumber
int lastTokenLineNumber() -
currentLine
String currentLine() -
lastTokenLine
String lastTokenLine() -
currentLinePosition
int currentLinePosition() -
lastTokenLinePosition
int lastTokenLinePosition()
-