Codota Logo
Parser.createCSSParseException
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
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

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • onCreateOptionsMenu (Activity)
  • String (java.lang)
  • Path (java.nio.file)
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • JCheckBox (javax.swing)
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now