Tabnine Logo
Parser.createCSSParseException
Code IndexAdd Tabnine to your IDE (free)

How to use
createCSSParseException
method
in
org.apache.batik.css.parser.Parser

Best Java code snippets using org.apache.batik.css.parser.Parser.createCSSParseException (Showing top 20 results out of 315)

origin: org.apache.xmlgraphics/batik-css

/**
 * Creates a parse exception.
 */
protected CSSParseException createCSSParseException(String key) {
  return createCSSParseException(key, null);
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Creates a parse exception.
 */
protected CSSParseException createCSSParseException(String key) {
  return createCSSParseException(key, null);
}
origin: apache/batik

/**
 * Creates a parse exception.
 */
protected CSSParseException createCSSParseException(String key) {
  return createCSSParseException(key, null);
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Reports a parsing error.
 */
protected void reportError(String key, Object[] params) {
  reportError(createCSSParseException(key, params));
}
origin: org.apache.xmlgraphics/batik-css

/**
 * Reports a parsing error.
 */
protected void reportError(String key, Object[] params) {
  reportError(createCSSParseException(key, params));
}
origin: apache/batik

/**
 * Reports a parsing error.
 */
protected void reportError(String key, Object[] params) {
  reportError(createCSSParseException(key, params));
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Converts the current lexical unit to a float.
 */
protected float number(boolean positive) {
  try {
    float sgn = (positive) ? 1 : -1;
    String val = scanner.getStringValue();
    nextIgnoreSpaces();
    return sgn * Float.parseFloat(val);
  } catch (NumberFormatException e) {
    throw createCSSParseException("number.format");
  }
}
origin: apache/batik

/**
 * Converts the current lexical unit to a float.
 */
protected float number(boolean positive) {
  try {
    float sgn = (positive) ? 1 : -1;
    String val = scanner.getStringValue();
    nextIgnoreSpaces();
    return sgn * Float.parseFloat(val);
  } catch (NumberFormatException e) {
    throw createCSSParseException("number.format");
  }
}
origin: org.apache.xmlgraphics/batik-css

/**
 * Converts the current lexical unit to a float.
 */
protected float number(boolean positive) {
  try {
    float sgn = (positive) ? 1 : -1;
    String val = scanner.getStringValue();
    nextIgnoreSpaces();
    return sgn * Float.parseFloat(val);
  } catch (NumberFormatException e) {
    throw createCSSParseException("number.format");
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Converts the current lexical unit to a dimension.
 */
protected LexicalUnit dimension(boolean positive, LexicalUnit prev) {
  try {
    float sgn = (positive) ? 1 : -1;
    String val = scanner.getStringValue();
    int i;
    loop: for (i = 0; i < val.length(); i++) {
      switch (val.charAt(i)) {
      default:
        break loop;
      case '0': case '1': case '2': case '3': case '4':
      case '5': case '6': case '7': case '8': case '9':
      case '.':
      }
    }
    nextIgnoreSpaces();
    return CSSLexicalUnit.createDimension
      (sgn * Float.parseFloat(val.substring(0, i)),
       val.substring(i),
       prev);
  } catch (NumberFormatException e) {
    throw createCSSParseException("number.format");
  }
}
origin: org.apache.xmlgraphics/batik-css

/**
 * Converts the current lexical unit to a dimension.
 */
protected LexicalUnit dimension(boolean positive, LexicalUnit prev) {
  try {
    float sgn = (positive) ? 1 : -1;
    String val = scanner.getStringValue();
    int i;
    loop: for (i = 0; i < val.length(); i++) {
      switch (val.charAt(i)) {
      default:
        break loop;
      case '0': case '1': case '2': case '3': case '4':
      case '5': case '6': case '7': case '8': case '9':
      case '.':
      }
    }
    nextIgnoreSpaces();
    return CSSLexicalUnit.createDimension
      (sgn * Float.parseFloat(val.substring(0, i)),
       val.substring(i),
       prev);
  } catch (NumberFormatException e) {
    throw createCSSParseException("number.format");
  }
}
origin: apache/batik

/**
 * Converts the current lexical unit to a dimension.
 */
protected LexicalUnit dimension(boolean positive, LexicalUnit prev) {
  try {
    float sgn = (positive) ? 1 : -1;
    String val = scanner.getStringValue();
    int i;
    loop: for (i = 0; i < val.length(); i++) {
      switch (val.charAt(i)) {
      default:
        break loop;
      case '0': case '1': case '2': case '3': case '4':
      case '5': case '6': case '7': case '8': case '9':
      case '.':
      }
    }
    nextIgnoreSpaces();
    return CSSLexicalUnit.createDimension
      (sgn * Float.parseFloat(val.substring(0, i)),
       val.substring(i),
       prev);
  } catch (NumberFormatException e) {
    throw createCSSParseException("number.format");
  }
}
origin: org.apache.xmlgraphics/batik-css

case LexicalUnits.EOF:
  if (inSheet) {
    throw createCSSParseException("eof");
    throw createCSSParseException("eof.expected");
  continue;
default:
  throw createCSSParseException("identifier");
case LexicalUnits.IDENTIFIER:
  throw createCSSParseException("colon");
origin: org.apache.xmlgraphics/batik-css

if (current == LexicalUnits.RIGHT_BRACE) {
  if (op) {
    throw createCSSParseException
      ("token", new Object[] {current});
case LexicalUnits.EOF:
  if (op) {
    throw createCSSParseException
      ("token", new Object[] {current});
origin: org.apache.xmlgraphics/batik-css

/**
 * 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;
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * 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;
}
origin: apache/batik

/**
 * 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;
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Advances to the next token and skip the spaces, ignoring comments.
 */
protected int nextIgnoreSpaces() {
  try {
    loop: for (;;) {
      scanner.clearBuffer();
      current = scanner.next();
      switch (current) {
      case LexicalUnits.COMMENT:
        documentHandler.comment(scanner.getStringValue());
        break;
      default:
        break loop;
      case LexicalUnits.SPACE:
      }
    }
    return current;
  } catch (ParseException e) {
    errorHandler.error(createCSSParseException(e.getMessage()));
    return current;
  }
}
origin: org.apache.xmlgraphics/batik-css

/**
 * Advances to the next token and skip the spaces, ignoring comments.
 */
protected int nextIgnoreSpaces() {
  try {
    loop: for (;;) {
      scanner.clearBuffer();
      current = scanner.next();
      switch (current) {
      case LexicalUnits.COMMENT:
        documentHandler.comment(scanner.getStringValue());
        break;
      default:
        break loop;
      case LexicalUnits.SPACE:
      }
    }
    return current;
  } catch (ParseException e) {
    errorHandler.error(createCSSParseException(e.getMessage()));
    return current;
  }
}
origin: apache/batik

/**
 * Advances to the next token and skip the spaces, ignoring comments.
 */
protected int nextIgnoreSpaces() {
  try {
    loop: for (;;) {
      scanner.clearBuffer();
      current = scanner.next();
      switch (current) {
      case LexicalUnits.COMMENT:
        documentHandler.comment(scanner.getStringValue());
        break;
      default:
        break loop;
      case LexicalUnits.SPACE:
      }
    }
    return current;
  } catch (ParseException e) {
    errorHandler.error(createCSSParseException(e.getMessage()));
    return current;
  }
}
org.apache.batik.css.parserParsercreateCSSParseException

Javadoc

Creates a parse exception.

Popular methods of Parser

  • parseStyleDeclaration
    Parses the given reader.
  • parseStyleSheet
    SAC: Implements org.w3c.css.sac.Parser#parseStyleSheet(InputSource).
  • createScanner
    Creates a scanner, given an InputSource.
  • dimension
    Converts the current lexical unit to a dimension.
  • formatMessage
    Implements org.apache.batik.i18n.Localizable#formatMessage(String,Object[]).
  • hexcolor
    Converts a hash unit to a RGB color.
  • isPseudoElement
    Tells whether or not the given string represents a pseudo-element.
  • next
    Advances to the next token, ignoring comments.
  • nextIgnoreSpaces
    Advances to the next token and skip the spaces, ignoring comments.
  • number
    Converts the current lexical unit to a float.
  • parseAtRule
    Parses an unknown rule.
  • parseExpression
    Parses a CSS2 expression.
  • parseAtRule,
  • parseExpression,
  • parseFontFaceRule,
  • parseFunction,
  • parseImportRule,
  • parseMediaList,
  • parseMediaRule,
  • parsePageRule,
  • parsePriorityInternal

Popular in Java

  • Creating JSON documents from java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • addToBackStack (FragmentTransaction)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Reference (javax.naming)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now