Package org.idpf.epubcheck.util.css
Class CssGrammar.CssSelectorConstructFactory
- java.lang.Object
-
- org.idpf.epubcheck.util.css.CssGrammar.CssSelectorConstructFactory
-
- Enclosing class:
- CssGrammar
static final class CssGrammar.CssSelectorConstructFactory extends java.lang.Object****************************************** helpers ******************************************
-
-
Constructor Summary
Constructors Constructor Description CssSelectorConstructFactory(java.util.Locale locale)
-
Method Summary
-
-
-
Field Detail
-
locale
private final java.util.Locale locale
-
messages
private final Messages messages
-
-
Method Detail
-
createSimpleSelectorSequence
public CssGrammar.CssSimpleSelectorSequence createSimpleSelectorSequence(CssToken start, CssTokenList.CssTokenIterator iter, CssErrorHandler err) throws CssExceptions.CssException
Create a simple selector sequence. If creation fails, errors are issued, and null is returned.- Throws:
CssExceptions.CssException
-
createSelectorList
public java.util.List<CssGrammar.CssSelector> createSelectorList(CssToken start, CssTokenList.CssTokenIterator iter, CssErrorHandler err) throws CssExceptions.CssException
With start inparam being the first significant token in a selector, build the selector group (aka comma separated selectors), expected return when iter.last is '{'. On error, issue to errorlistener, and return (caller will forward).- Returns:
- A syntactically valid CssSelector list, or null if fail.
- Throws:
CssExceptions.CssException
-
createSelectorList
private java.util.List<CssGrammar.CssSelector> createSelectorList(CssToken start, CssTokenList.CssTokenIterator iter, CssErrorHandler err, boolean forgiving, boolean relative, com.google.common.base.Predicate<CssToken> endMatcher) throws CssExceptions.CssException
- Throws:
CssExceptions.CssException
-
createSimpleSelector
CssGrammar.CssConstruct createSimpleSelector(CssToken start, CssTokenList.CssTokenIterator iter, CssErrorHandler err) throws CssExceptions.CssException
Create one item in a simple selector sequence. If creation fails, errors are issued, and null is returned. On return, the iterator will return the next token after the constructs last token.- Throws:
CssExceptions.CssException
-
createCombinator
CssGrammar.CssSelectorCombinator createCombinator(CssToken start, CssTokenList.CssTokenIterator iter, CssErrorHandler err)
Create a combinator. Note that this method does not support the S combinator. This method also returns null without issuing errors
-
createPseudoSelector
CssGrammar.CssPseudoSelector createPseudoSelector(CssToken start, CssTokenList.CssTokenIterator iter, CssErrorHandler err) throws CssExceptions.CssException
- Throws:
CssExceptions.CssException
-
createFunctionalPseudo
CssGrammar.CssConstruct createFunctionalPseudo(CssToken start, CssTokenList.CssTokenIterator iter, com.google.common.base.Predicate<CssToken> limit, CssErrorHandler err)
-
createFunctionalSelectorListPseudo
CssGrammar.CssConstruct createFunctionalSelectorListPseudo(CssToken start, CssTokenList.CssTokenIterator iter, CssErrorHandler err, boolean forgiving, boolean relative) throws CssExceptions.CssException
- Throws:
CssExceptions.CssException
-
createAttributeSelector
CssGrammar.CssAttributeSelector createAttributeSelector(CssToken start, CssTokenList.CssTokenIterator iter, CssErrorHandler err) throws CssExceptions.CssException
- Throws:
CssExceptions.CssException
-
createAttributeMatchSelector
CssGrammar.CssAttributeMatchSelector createAttributeMatchSelector(CssToken tk, CssTokenList.CssTokenIterator iter, CssErrorHandler err)
-
createTypeSelector
CssGrammar.CssTypeSelector createTypeSelector(CssToken start, CssTokenList.CssTokenIterator iter, CssErrorHandler err) throws CssExceptions.CssException
- Throws:
CssExceptions.CssException
-
-