org.apache.batik.css.parser
public class Parser extends Object implements ExtendedParser, Localizable
Field Summary | |
---|---|
static String | BUNDLE_CLASSNAME
The default resource bundle base name. |
protected ConditionFactory | conditionFactory
The condition factory. |
protected int | current
The current lexical unit. |
protected DocumentHandler | documentHandler
The document handler. |
protected String | documentURI
The document URI. |
protected ErrorHandler | errorHandler
The error handler. |
protected LocalizableSupport | localizableSupport
The localizable support. |
protected String | pseudoElement
To store the current pseudo element. |
protected Scanner | scanner
The scanner used to scan the input source. |
protected SelectorFactory | selectorFactory
The selector factory. |
Method Summary | |
---|---|
protected CSSParseException | createCSSParseException(String key)
Creates a parse exception. |
protected CSSParseException | createCSSParseException(String key, Object[] params)
Creates a parse exception. |
protected Scanner | createScanner(InputSource source)
Creates a scanner, given an InputSource. |
protected LexicalUnit | dimension(boolean positive, LexicalUnit prev)
Converts the current lexical unit to a dimension. |
String | formatMessage(String key, Object[] args)
Implements (String,Object[]) . |
Locale | getLocale()
Implements getLocale. |
String | getParserVersion()
SAC: Implements org.w3c.css.sac.Parser#getParserVersion(). |
protected LexicalUnit | hexcolor(LexicalUnit prev)
Converts a hash unit to a RGB color. |
protected boolean | isPseudoElement(String s)
Tells whether or not the given string represents a pseudo-element. |
protected int | next()
Advances to the next token, ignoring comments. |
protected int | nextIgnoreSpaces()
Advances to the next token and skip the spaces, ignoring comments. |
protected float | number(boolean positive)
Converts the current lexical unit to a float. |
protected void | parseAtRule()
Parses an unknown rule. |
protected LexicalUnit | parseExpression(boolean param)
Parses a CSS2 expression. |
protected void | parseFontFaceRule()
Parses a font-face rule. |
protected LexicalUnit | parseFunction(boolean positive, LexicalUnit prev)
Parses a CSS2 function. |
protected void | parseImportRule()
Parses an import rule. |
SACMediaList | parseMedia(String mediaText)
Implements parseMedia. |
protected CSSSACMediaList | parseMediaList()
Parses a media list. |
protected void | parseMediaRule()
Parses a media rule. |
protected void | parsePageRule()
Parses a page rule. |
boolean | parsePriority(InputSource source)
SAC: Implements
org.w3c.css.sac.Parser#parsePriority(InputSource). |
boolean | parsePriority(String source)
Implements parsePriority. |
protected boolean | parsePriorityInternal()
Parses the priority using the current scanner. |
LexicalUnit | parsePropertyValue(InputSource source)
SAC: Implements
org.w3c.css.sac.Parser#parsePropertyValue(InputSource). |
LexicalUnit | parsePropertyValue(String source)
Implements parsePropertyValue. |
protected LexicalUnit | parsePropertyValueInternal()
Parses property value using the current scanner. |
void | parseRule(InputSource source)
SAC: Implements org.w3c.css.sac.Parser#parseRule(InputSource). |
protected void | parseRule()
Parses a rule. |
void | parseRule(String source)
Implements parseRule. |
protected void | parseRuleInternal()
Parses a rule using the current scanner. |
protected void | parseRuleSet()
Parses a ruleset. |
protected Selector | parseSelector()
Parses a selector. |
protected SelectorList | parseSelectorList()
Parses a selector list |
SelectorList | parseSelectors(InputSource source)
SAC: Implements org.w3c.css.sac.Parser#parseSelectors(InputSource). |
SelectorList | parseSelectors(String source)
Implements parseSelectors. |
protected SelectorList | parseSelectorsInternal()
Parses selectors using the current scanner. |
protected SimpleSelector | parseSimpleSelector()
Parses a simple selector. |
void | parseStyleDeclaration(InputSource source)
SAC: Implements org.w3c.css.sac.Parser#parseStyleDeclaration(InputSource). |
protected void | parseStyleDeclaration(boolean inSheet)
Parses the given reader. |
void | parseStyleDeclaration(String source)
Implements parseStyleDeclaration. |
protected void | parseStyleDeclarationInternal()
Parses a style declaration using the current scanner. |
void | parseStyleSheet(InputSource source)
SAC: Implements org.w3c.css.sac.Parser#parseStyleSheet(InputSource). |
void | parseStyleSheet(String uri)
SAC: Implements org.w3c.css.sac.Parser#parseStyleSheet(String). |
protected LexicalUnit | parseTerm(LexicalUnit prev)
Parses a CSS2 term. |
protected void | reportError(String key)
Reports a parsing error. |
protected void | reportError(String key, Object[] params)
Reports a parsing error. |
protected void | reportError(CSSParseException e)
Reports a parsing error. |
void | setConditionFactory(ConditionFactory factory)
SAC: Implements org.w3c.css.sac.Parser#setConditionFactory(ConditionFactory). |
void | setDocumentHandler(DocumentHandler handler)
SAC: Implements org.w3c.css.sac.Parser#setDocumentHandler(DocumentHandler). |
void | setErrorHandler(ErrorHandler handler)
SAC: Implements org.w3c.css.sac.Parser#setErrorHandler(ErrorHandler). |
void | setLocale(Locale locale)
SAC: Implements org.w3c.css.sac.Parser#setLocale(Locale). |
void | setSelectorFactory(SelectorFactory factory)
SAC: Implements org.w3c.css.sac.Parser#setSelectorFactory(SelectorFactory). |
protected int | skipSpaces()
Skips the white spaces. |
protected int | skipSpacesAndCDOCDC()
Skips the white spaces and CDO/CDC units. |
(String,Object[])
.Returns: "http://www.w3.org/TR/REC-CSS2".
Parameters: param whether the expression to be parsed is a function parameter