/** * Reports a parsing error. */ protected void reportError(String key) { reportError(key, null); }
/** * Reports a parsing error. */ protected void reportError(String key) { reportError(key, null); }
/** * Reports a parsing error. */ protected void reportError(String key) { reportError(key, null); }
/** * Reports a parsing error. */ protected void reportError(String key, Object[] params) { reportError(createCSSParseException(key, params)); }
/** * Reports a parsing error. */ protected void reportError(String key, Object[] params) { reportError(createCSSParseException(key, params)); }
/** * Reports a parsing error. */ protected void reportError(String key, Object[] params) { reportError(createCSSParseException(key, params)); }
/** * Parses the priority using the current scanner. */ protected boolean parsePriorityInternal() throws CSSException, IOException { nextIgnoreSpaces(); scanner.close(); scanner = null; switch (current) { case LexicalUnits.EOF: return false; case LexicalUnits.IMPORT_SYMBOL: return true; default: reportError("token", new Object[] { new Integer(current) }); return false; } }
/** * Parses the priority using the current scanner. */ protected boolean parsePriorityInternal() throws CSSException, IOException { nextIgnoreSpaces(); scanner.close(); scanner = null; switch (current) { case LexicalUnits.EOF: return false; case LexicalUnits.IMPORT_SYMBOL: return true; default: reportError("token", new Object[] {current}); return false; } }
/** * Parses a font-face rule. */ protected void parseFontFaceRule() { try { documentHandler.startFontFace(); if (current != LexicalUnits.LEFT_CURLY_BRACE) { reportError("left.curly.brace"); } else { nextIgnoreSpaces(); try { parseStyleDeclaration(true); } catch (CSSParseException e) { reportError(e); } } } finally { documentHandler.endFontFace(); } }
/** * Parses a font-face rule. */ protected void parseFontFaceRule() { try { documentHandler.startFontFace(); if (current != LexicalUnits.LEFT_CURLY_BRACE) { reportError("left.curly.brace"); } else { nextIgnoreSpaces(); try { parseStyleDeclaration(true); } catch (CSSParseException e) { reportError(e); } } } finally { documentHandler.endFontFace(); } }
/** * Parses the priority using the current scanner. */ protected boolean parsePriorityInternal() throws CSSException, IOException { nextIgnoreSpaces(); scanner.close(); scanner = null; switch (current) { case LexicalUnits.EOF: return false; case LexicalUnits.IMPORT_SYMBOL: return true; default: reportError("token", new Object[] {current}); return false; } }
/** * Parses a style declaration using the current scanner. */ protected void parseStyleDeclarationInternal() throws CSSException, IOException { nextIgnoreSpaces(); try { parseStyleDeclaration(false); } catch (CSSParseException e) { reportError(e); } finally { scanner.close(); scanner = null; } }
/** * Parses a style declaration using the current scanner. */ protected void parseStyleDeclarationInternal() throws CSSException, IOException { nextIgnoreSpaces(); try { parseStyleDeclaration(false); } catch (CSSParseException e) { reportError(e); } finally { scanner.close(); scanner = null; } }
/** * Parses a style declaration using the current scanner. */ protected void parseStyleDeclarationInternal() throws CSSException, IOException { nextIgnoreSpaces(); try { parseStyleDeclaration(false); } catch (CSSParseException e) { reportError(e); } finally { scanner.close(); scanner = null; } }
/** * Advances to the next token, ignoring comments. */ protected int next() { try { for (;;) { scanner.clearBuffer(); current = scanner.next(); if (current == LexicalUnits.COMMENT) { documentHandler.comment(scanner.getStringValue()); } else { break; } } return current; } catch (ParseException e) { reportError(e.getMessage()); return current; } }
/** * Advances to the next token, ignoring comments. */ protected int next() { try { for (;;) { scanner.clearBuffer(); current = scanner.next(); if (current == LexicalUnits.COMMENT) { documentHandler.comment(scanner.getStringValue()); } else { break; } } return current; } catch (ParseException e) { reportError(e.getMessage()); return current; } }
/** * Advances to the next token, ignoring comments. */ protected int next() { try { for (;;) { scanner.clearBuffer(); current = scanner.next(); if (current == LexicalUnits.COMMENT) { documentHandler.comment(scanner.getStringValue()); } else { break; } } return current; } catch (ParseException e) { reportError(e.getMessage()); return current; } }
/** * Parses property value using the current scanner. */ protected LexicalUnit parsePropertyValueInternal() throws CSSException, IOException { nextIgnoreSpaces(); LexicalUnit exp = null; try { exp = parseExpression(false); } catch (CSSParseException e) { reportError(e); throw e; } CSSParseException exception = null; if (current != LexicalUnits.EOF) exception = createCSSParseException("eof.expected"); scanner.close(); scanner = null; if (exception != null) { errorHandler.fatalError(exception); } return exp; }
/** * Parses a media list. */ protected CSSSACMediaList parseMediaList() { CSSSACMediaList result = new CSSSACMediaList(); result.append(scanner.getStringValue()); nextIgnoreSpaces(); while (current == LexicalUnits.COMMA) { nextIgnoreSpaces(); switch (current) { default: reportError("identifier"); break; case LexicalUnits.IDENTIFIER: result.append(scanner.getStringValue()); nextIgnoreSpaces(); } } return result; }
/** * Parses a media list. */ protected CSSSACMediaList parseMediaList() { CSSSACMediaList result = new CSSSACMediaList(); result.append(scanner.getStringValue()); nextIgnoreSpaces(); while (current == LexicalUnits.COMMA) { nextIgnoreSpaces(); switch (current) { default: reportError("identifier"); break; case LexicalUnits.IDENTIFIER: result.append(scanner.getStringValue()); nextIgnoreSpaces(); } } return result; }