public class SACParserCSSmobileOKBasic1 extends Object implements SACParserCSSmobileOKBasic1Constants
| Modifier and Type | Field and Description |
|---|---|
Token |
jj_nt
Next token.
|
Token |
token
Current token.
|
SACParserCSSmobileOKBasic1TokenManager |
token_source
Generated Token Manager.
|
ACTIVE_PSCLASS, ASTERISK, ATKEYWORD, CDC, CDO, COLON, COMMA, COMMENT, D, DEFAULT, DOT, EMS, EOF, EQUALS, ESCAPE, EXS, FIRST_LETTER, FIRST_LINE, GT, H, HASH, HNUM, IDENT, IMPORT_SYM, IMPORTANT_SYM, LBRACE, LENGTH_CM, LENGTH_IN, LENGTH_MM, LENGTH_PC, LENGTH_PT, LENGTH_PX, LINK_PSCLASS, LSQUARE, MEDIA_SYM, MINUS, NAME, NL, NMCHAR, NMSTART, NONASCII, NUM, NUMBER, PERCENTAGE, PLUS, Q11, Q12, Q13, Q14, Q15, Q16, RANGE, RBRACE, RGB, RROUND, RSQUARE, S, SEMICOLON, SLASH, STRING, STRING1, STRING2, tokenImage, UNICODE, UNICODERANGE, UNKNOWN, URL, VISITED_PSCLASS| Constructor and Description |
|---|
SACParserCSSmobileOKBasic1() |
SACParserCSSmobileOKBasic1(CharStream stream)
Constructor with user supplied CharStream.
|
SACParserCSSmobileOKBasic1(SACParserCSSmobileOKBasic1TokenManager tm)
Constructor with generated Token Manager.
|
public SACParserCSSmobileOKBasic1TokenManager token_source
public Token token
public Token jj_nt
public SACParserCSSmobileOKBasic1()
public SACParserCSSmobileOKBasic1(CharStream stream)
public SACParserCSSmobileOKBasic1(SACParserCSSmobileOKBasic1TokenManager tm)
public String getParserVersion()
ParsergetParserVersion in interface Parserprotected String getGrammarUri()
public final void styleSheet()
throws ParseException
ParseExceptionpublic final void styleSheetRuleList()
throws ParseException
ParseExceptionpublic final void styleSheetRuleSingle()
throws ParseException
ParseExceptionpublic final void unknownAtRule()
throws ParseException
ParseExceptionpublic final void importRule(boolean nonImportRuleFoundBefore)
throws ParseException
ParseExceptionpublic final void mediaRule()
throws ParseException
ParseExceptionpublic final void mediaList(SACMediaListImpl ml) throws ParseException
ParseExceptionpublic final void mediaRuleList()
throws ParseException
ParseExceptionpublic final String medium() throws ParseException
ParseExceptionpublic final LexicalUnit operator(LexicalUnit prev) throws ParseException
ParseExceptionpublic final char unaryOperator()
throws ParseException
ParseExceptionpublic final String property() throws ParseException
ParseExceptionpublic final void styleRule()
throws ParseException
ParseExceptionpublic final SelectorList parseSelectorsInternal() throws ParseException
ParseExceptionpublic final SelectorList selectorList() throws ParseException
ParseExceptionpublic final Selector selector() throws ParseException
ParseExceptionpublic final Selector simpleSelector(Selector sel, char comb) throws ParseException
ParseExceptionpublic final Condition _class(Condition pred) throws ParseException
ParseExceptionpublic final SimpleSelector elementName() throws ParseException
ParseExceptionpublic final Condition pseudoClass(Condition pred) throws ParseException
ParseExceptionpublic final SimpleSelector pseudoElement() throws ParseException
ParseExceptionpublic final Condition hash(Condition pred) throws ParseException
ParseExceptionpublic final void styleDeclaration()
throws ParseException
ParseExceptionpublic final void declaration()
throws ParseException
ParseExceptionpublic final boolean prio()
throws ParseException
ParseExceptionpublic final LexicalUnit expr() throws ParseException
ParseExceptionpublic final LexicalUnit term(LexicalUnit prev) throws ParseException
ParseExceptionpublic final LexicalUnit rgb(LexicalUnit prev) throws ParseException
ParseExceptionpublic final LexicalUnit hexcolor(LexicalUnit prev) throws ParseException
ParseExceptionpublic void ReInit(CharStream stream)
public void ReInit(SACParserCSSmobileOKBasic1TokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final boolean trace_enabled()
public final void enable_tracing()
public final void disable_tracing()
protected DocumentHandlerExt getDocumentHandler()
public void setDocumentHandler(DocumentHandler handler)
ParserIf the application does not register a document handler, all document events reported by the CSS parser will be silently ignored (this is the default behaviour implemented by HandlerBase).
Applications may register a new or different handler in the middle of a parse, and the CSS parser must begin using the new handler immediately.
setDocumentHandler in interface Parserhandler - The document handler.DocumentHandlerprotected ErrorHandler getErrorHandler()
public void setErrorHandler(ErrorHandler eh)
ParserIf the application does not register an error event handler, all error events reported by the CSS parser will be silently ignored, except for fatalError, which will throw a CSSException (this is the default behaviour implemented by HandlerBase).
Applications may register a new or different handler in the middle of a parse, and the CSS parser must begin using the new handler immediately.
setErrorHandler in interface Parsereh - The error handler.ErrorHandler,
CSSExceptionprotected InputSource getInputSource()
public void setIeStarHackAccepted(boolean accepted)
setIeStarHackAccepted in interface SACParserpublic boolean isIeStarHackAccepted()
isIeStarHackAccepted in interface SACParserpublic void setLocale(Locale locale)
ParserCSS parsers are not required to provide localisation for errors and warnings; if they cannot support the requested locale, however, they must throw a CSS exception. Applications may not request a locale change in the middle of a parse.
setLocale in interface Parserlocale - A Java Locale object.CSSException,
CSSParseExceptionprotected Locale getLocale()
protected SelectorFactoryExt getSelectorFactory()
public void setSelectorFactory(SelectorFactory selectorFactory)
setSelectorFactory in interface Parserprotected ConditionFactoryExt getConditionFactory()
public void setConditionFactory(ConditionFactory conditionFactory)
setConditionFactory in interface Parserprotected ResourceBundle getSACParserMessages()
protected CSSParseException toCSSParseException(String key, ParseException e)
protected CSSParseException toCSSParseException(DOMException e)
protected CSSParseException toCSSParseException(TokenMgrError e)
protected CSSParseException toCSSParseException(String messageKey, Object[] msgParams, Locator locator)
protected CSSParseException createSkipWarning(String key, CSSParseException e)
public void parseStyleSheet(InputSource source) throws IOException
ParserThe application can use this method to instruct the CSS parser to begin parsing an CSS document from any valid input source (a character stream, a byte stream, or a URI).
Applications may not invoke this method while a parse is in progress (they should create a new Parser instead for each additional CSS document). Once a parse is complete, an application may reuse the same Parser object, possibly with a different input source.
parseStyleSheet in interface Parsersource - The input source for the top-level of the
CSS document.IOException - An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.InputSource,
Parser.parseStyleSheet(java.lang.String),
Parser.setDocumentHandler(org.w3c.css.sac.DocumentHandler),
Parser.setErrorHandler(org.w3c.css.sac.ErrorHandler)public void parseStyleSheet(String uri) throws IOException
ParserThis method is a shortcut for the common case of reading a document from a URI. It is the exact equivalent of the following:
parse(new InputSource(uri));
The URI must be fully resolved by the application before it is passed to the parser.
parseStyleSheet in interface Parseruri - The URI.IOException - An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.Parser.parseStyleSheet(InputSource)public void parseStyleDeclaration(InputSource source) throws IOException
ParserparseStyleDeclaration in interface ParserIOException - An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.public void parseRule(InputSource source) throws IOException
ParserparseRule in interface ParserIOException - An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.public SelectorList parseSelectors(InputSource source) throws IOException
ParserparseSelectors in interface ParserIOException - An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.public LexicalUnit parsePropertyValue(InputSource source) throws IOException
ParserparsePropertyValue in interface ParserIOException - An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.public boolean parsePriority(InputSource source) throws IOException
ParserparsePriority in interface ParserIOException - An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.public SACMediaList parseMedia(InputSource source) throws IOException
IOExceptionprotected void handleStartDocument()
protected void handleEndDocument()
protected void handleImportStyle(String uri, SACMediaList media, String defaultNamespaceURI, Locator locator)
protected void handleStartMedia(SACMediaList media, Locator locator)
protected void handleEndMedia(SACMediaList media)
protected void handleStartFontFace(Locator locator)
protected void handleEndFontFace()
protected void handleSelector(Selector selector)
protected void handleStartSelector(SelectorList selectors, Locator locator)
protected void handleEndSelector(SelectorList selectors)
protected void handleProperty(String name, LexicalUnit value, boolean important, Locator locator)
protected LexicalUnit functionInternal(LexicalUnit prev, String funct, LexicalUnit params)
protected LexicalUnit hexcolorInternal(LexicalUnit prev, Token t)
public String unescape(String s, boolean unescapeDoubleQuotes)
Copyright © 2026. All rights reserved.