| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.4.0) E17493-05 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.javatools.parser.AbstractLexer
oracle.javatools.parser.java.v2.scanner.FastLexer
oracle.javatools.parser.css.CSSLexer
public class CSSLexer
Code Editor lexer for CSS documents.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class oracle.javatools.parser.AbstractLexer | 
|---|
| AbstractLexer.DefaultLexerToken | 
| Field Summary | |
|---|---|
| protected  int | _mEndOffsetThe ending offset of the last token found. | 
| protected  int | _mLastTokenThe last token found from lex()operation. | 
| protected  LineMap | _mLineMap | 
| protected  oracle.javatools.parser.css.CSSLexer.TextBufferReader | _mReader | 
| protected  int | _mStartOffsetThe starting offset of the last token found. | 
| protected  boolean | _mUseLastTokenWhether to use the last token that was found. | 
| Fields inherited from class oracle.javatools.parser.java.v2.scanner.FastLexer | 
|---|
| skipComments | 
| Fields inherited from class oracle.javatools.parser.AbstractLexer | 
|---|
| currentPos, textBuffer | 
| Fields inherited from interface oracle.javatools.parser.css.CSSTokens | 
|---|
| TK_CSS_BLOCK, TK_CSS_RULE_SET | 
| Fields inherited from interface oracle.javatools.parser.css.LexicalUnits | 
|---|
| ANY, AT_KEYWORD, BEGINS, CARET, CDC, CDO, CHARSET_SYMBOL, CM, COLON, COMMA, COMMENT, CONTAINS, DASHMATCH, DEG, DIMENSION, DIVIDE, DOLLAR, DOT, DOUBLE_COLON, EM, ENDS, EOF, EQUAL, ERROR, EX, FONT_FACE_SYMBOL, FUNCTION, GRAD, HASH, HZ, IDENTIFIER, IMPORT_SYMBOL, IMPORTANT_SYMBOL, IN, INCLUDES, INTEGER, KHZ, LEFT_BRACE, LEFT_BRACKET, LEFT_CURLY_BRACE, MEDIA_SYMBOL, MINUS, MM, MS, NAMESPACE_MATCH, NAMESPACE_SYMBOL, PAGE_SYMBOL, PC, PERCENTAGE, PLUS, PRECEDE, PT, PX, RAD, REAL, RIGHT_BRACE, RIGHT_BRACKET, RIGHT_CURLY_BRACE, S, SEMI_COLON, SPACE, STRING, TILDE, UNICODE_RANGE, URI | 
| Fields inherited from interface oracle.javatools.parser.Lexer | 
|---|
| TK_EOF, TK_NOT_FOUND | 
| Constructor Summary | |
|---|---|
| CSSLexer() | |
| Method Summary | |
|---|---|
|  void | backup()Unlexes the last found token. | 
| protected  void | convertToken() | 
| protected  int | fillLexerToken(LexerToken lexedToken)Utility routine to fill in the LexerTokenstructure
 with the current token information we have. | 
|  int | getEndOffset()Fetches the end offset of the token (offset relative to the original ReadTextBufferbeing lexed. | 
|  int | getStartOffset()Fetches the start offset of the token (offset relative to the original ReadTextBufferbeing lexed. | 
|  int | getToken()Fetches the (language-specific) token represented by this LexerToken. | 
|  int | lex()Calls lex( LexerToken ) but does not call fillLexerToken. | 
|  int | lex(LexerToken lexedToken)Scans the text buffer at the current position and returns the token that was found. | 
| protected  int | nextToken() | 
| protected  void | resetTokenizer() | 
|  void | setLineMap(LineMap lineMap) | 
|  void | setPosition(int offset)Sets the current lex (read) position to the given offset in the buffer. | 
| protected  int | skipAtRule() | 
| protected  int | skipBlock()Utility routine which scans through the text buffer to find the end of an CSS style rule. | 
| protected  int | skipStyleRule()Utility routine which scans through the text buffer to find the end of an CSS style rule. | 
| protected  int | TokenizerToLanguageToken(int token) | 
| protected  void | updateState() | 
| Methods inherited from class oracle.javatools.parser.java.v2.scanner.FastLexer | 
|---|
| isComment, setSkipComments | 
| Methods inherited from class oracle.javatools.parser.AbstractLexer | 
|---|
| createLexerToken, getTextBuffer, setTextBuffer | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected int _mLastToken
lex() operation.
protected int _mStartOffset
protected int _mEndOffset
protected boolean _mUseLastToken
protected oracle.javatools.parser.css.CSSLexer.TextBufferReader _mReader
protected LineMap _mLineMap
| Constructor Detail | 
|---|
public CSSLexer()
| Method Detail | 
|---|
public void setLineMap(LineMap lineMap)
public void setPosition(int offset)
AbstractLexer
setPosition in interface LexersetPosition in class AbstractLexeroffset - the offset for the next lex() operation.public int lex(LexerToken lexedToken)
lexedToken instance passed in to the
 call.
lex in interface Lexerlex in class FastLexerlexedToken - the instance passed in where token info is stored
lexedToken.getToken() (for convenience)public void backup()
lex()
 will return the last token and offset information found.
backup in interface Lexerbackup in class FastLexerprotected int skipStyleRule()
protected int skipBlock()
protected int skipAtRule()
protected int fillLexerToken(LexerToken lexedToken)
LexerToken structure
 with the current token information we have.  Returns the
 current token.
lexedToken - the client-specified LexerToken
protected void resetTokenizer()
protected int nextToken()
protected void updateState()
                    throws ParseException
ParseExceptionprotected void convertToken()
public int getToken()
LexerTokenLexerToken.  You must refer to the language-specific
 Lexer that was responsible for filling this
 LexerToken instance to interpret the token.
getToken in interface LexerTokengetToken in class FastLexerpublic int getStartOffset()
LexerTokenReadTextBuffer being lexed.  Note that the
 start offset is inclusive (compare to end offset which is
 exclusive), to match the behavior in the String
 class.
getStartOffset in interface LexerTokengetStartOffset in class FastLexerpublic int getEndOffset()
LexerTokenReadTextBuffer being lexed.  Note that the end offset is
 exclusive (similar to end offsets in the String class.)
getEndOffset in interface LexerTokengetEndOffset in class FastLexerpublic int lex()
FastLexer
lex in class FastLexerprotected int TokenizerToLanguageToken(int token)
| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.4.0) E17493-05 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||