Package org.idpf.epubcheck.util.css.CssToken

Examples of org.idpf.epubcheck.util.css.CssToken.TokenBuilder


      ch = reader.next();
      if (ch == -1)
      {
        break;
      }
      builder = new TokenBuilder(reader, /* this, */errHandler);
      cur = (char) ch;
      next = reader.peek();
      escapes.reset(builder);

      if (WHITESPACE.matches(cur))
View Full Code Here


    /*
       * Assume we have a {num}{ident} instance (DIMEN), and then override
       * that if a specific quantity literal is found.
       */
    builder.type = Type.QNTY_DIMEN;
    TokenBuilder suffix = new TokenBuilder(reader, errHandler);
    append(QNTSTART, suffix);
    if (suffix.getLast() != '%')
    { // QNTSTART = NMSTART | '%'
      append(NMCHAR, suffix);
    }

    if (suffix.getLength() > QNT_TOKEN_MAXLENGTH)
    {
      // longer than max length in quantities map
      builder.append(suffix.toString());
      return;
    }

    // shorter or equal to max length in quantities map
    // we might have a more specific match
    final int[] ident = suffix.toArray();
    int[] match = null;

    for (int[] test : quantities.keySet())
    {
      if (equals(ident, test, true))
View Full Code Here

TOP

Related Classes of org.idpf.epubcheck.util.css.CssToken.TokenBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.