use of com.gargoylesoftware.css.parser.javacc.ParseException in project LoboEvolution by LoboEvolution.
the class AbstractCSSParser method parseSelectors.
/**
* Parse a comma separated list of selectors.
*
* @param source source to be parsed
* @return a selector list
* @exception CSSException Any CSS exception, possibly
* wrapping another exception.
* @exception java.io.IOException An IO exception from the parser,
* possibly from a byte stream or character stream
* supplied by the application.
*/
public SelectorList parseSelectors(final InputSource source) throws IOException {
source_ = source;
ReInit(getCharStream(source));
SelectorList sl = null;
try {
sl = parseSelectorsInternal();
} catch (final ParseException e) {
getErrorHandler().error(toCSSParseException("invalidSelectorList", e));
} catch (final TokenMgrError e) {
getErrorHandler().error(toCSSParseException(e));
} catch (final CSSParseException e) {
getErrorHandler().error(e);
}
return sl;
}
use of com.gargoylesoftware.css.parser.javacc.ParseException in project LoboEvolution by LoboEvolution.
the class AbstractCSSParser method parseMedia.
/**
* Parse the given input source and return the media list.
* @param source the input source
* @return new media list
* @throws IOException in case of errors
*/
public MediaQueryList parseMedia(final InputSource source) throws IOException {
source_ = source;
ReInit(getCharStream(source));
final MediaQueryList ml = new MediaQueryList();
try {
mediaList(ml);
} catch (final ParseException e) {
getErrorHandler().error(toCSSParseException("invalidMediaList", e));
} catch (final TokenMgrError e) {
getErrorHandler().error(toCSSParseException(e));
} catch (final CSSParseException e) {
getErrorHandler().error(e);
}
return ml;
}
Aggregations