Package com.steadystate.css.parser
Class ListableTokenManager
- java.lang.Object
-
- com.steadystate.css.parser.SACParserCSS3TokenManager
-
- com.steadystate.css.parser.ListableTokenManager
-
- All Implemented Interfaces:
com.steadystate.css.parser.SACParserCSS3Constants
public class ListableTokenManager extends com.steadystate.css.parser.SACParserCSS3TokenManagerA class to extend the default css parser's manager in order to override the next token method to populate a list of tokens.- Author:
- nhant01, GeorgeLuo
-
-
Field Summary
-
Fields inherited from class com.steadystate.css.parser.SACParserCSS3TokenManager
curChar, debugStream, input_stream, jjnewLexState, jjstrLiteralImages, lexStateNames
-
Fields inherited from interface com.steadystate.css.parser.SACParserCSS3Constants
A_LETTER, AND, ANGLE_DEG, ANGLE_GRAD, ANGLE_RAD, ASTERISK, ATKEYWORD, C_LETTER, CDC, CDO, CHARSET_SYM, COLON, COMMA, COMMENT, COMMENT_, D_LETTER, DASHMATCH, DEFAULT, DIMENSION, DOT, E_LETTER, EMS, EOF, EQUALS, ESCAPE, EXS, F_LETTER, FONT_FACE_SYM, FREQ_HZ, FREQ_KHZ, FUNCTION, FUNCTION_LANG, FUNCTION_NOT, G_LETTER, GREATER, H, H_LETTER, H_PLACEHOLDER, HASH, HNUM, I_LETTER, IDENT, IMPORT_SYM, IMPORTANT_SYM, INCLUDES, INHERIT, K_LETTER, L_LETTER, LBRACE, LENGTH_CM, LENGTH_IN, LENGTH_MM, LENGTH_PC, LENGTH_PT, LENGTH_PX, LROUND, LSQUARE, M_LETTER, MEDIA_SYM, MINUS, N_LETTER, NAME, NL, NMCHAR, NMSTART, NONASCII, NOT, NUM, NUMBER, O_LETTER, ONLY, P_LETTER, PAGE_SYM, PERCENTAGE, PLUS, PREFIXMATCH, R_LETTER, RBRACE, RESOLUTION_DPCM, RESOLUTION_DPI, RROUND, RSQUARE, S, S_LETTER, SEMICOLON, SLASH, STRING, STRING1, STRING2, SUBSTRINGMATCH, SUFFIXMATCH, T_LETTER, TILDE, TIME_MS, TIME_S, tokenImage, U_LETTER, UNICODE, UNICODE_RANGE, UNKNOWN, URI, URL, V_LETTER, W, X_LETTER, Z_LETTER
-
-
Constructor Summary
Constructors Constructor Description ListableTokenManager(com.steadystate.css.parser.CharStream stream)Constructor to initialize the list of tokens.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompressEnd()Compress the tail tokens with the input token to produce a single token, by stepping backwards WHITESPACE tokens until an IDENT token is detected.intgetCurLexState()accessor for current lex state, which informs whether the parser is within a commentcom.steadystate.css.parser.TokengetNextToken()Store the token in a list of tokens.List<com.steadystate.css.parser.Token>getParsedTokens()Getter for the list of tokens.
-
-
-
Method Detail
-
getNextToken
public com.steadystate.css.parser.Token getNextToken()
Store the token in a list of tokens.- Overrides:
getNextTokenin classcom.steadystate.css.parser.SACParserCSS3TokenManager- Returns:
- the next token in the css text
-
compressEnd
public void compressEnd()
Compress the tail tokens with the input token to produce a single token, by stepping backwards WHITESPACE tokens until an IDENT token is detected.
-
getCurLexState
public int getCurLexState()
accessor for current lex state, which informs whether the parser is within a comment- Returns:
- value of 1 for comment and 0 for css cdata
-
getParsedTokens
public List<com.steadystate.css.parser.Token> getParsedTokens()
Getter for the list of tokens.- Returns:
- the underlying tokens
-
-