Package org.apache.fop.fo

Examples of org.apache.fop.fo.Property


    next();
    if (currentToken == TOK_EOF) {
      // if prop value is empty string, force to StringProperty
      return new StringProperty("");
    }
    Property prop = parseAdditiveExpr();
    if (currentToken != TOK_EOF)
      throw new PropertyException("unexpected token");
    return prop;
  }
View Full Code Here


   * Try to parse an addition or subtraction expression and return the
   *  resulting Property.
   */
  private Property parseAdditiveExpr() throws PropertyException {
    // Evaluate and put result on the operand stack
    Property prop = parseMultiplicativeExpr();
  loop:
    for (;;) {
      switch (currentToken) {
      case TOK_PLUS:
  next();
  prop = evalAddition(prop.getNumeric(),
         parseMultiplicativeExpr().getNumeric() );
  break;
      case TOK_MINUS:
  next();
  prop = evalSubtraction(prop.getNumeric(),
         parseMultiplicativeExpr().getNumeric() );
  break;
      default:
  break loop;
      }
View Full Code Here

  /**
   * Try to parse a multiply, divide or modulo expression and return
   * the resulting Property.
   */
  private Property parseMultiplicativeExpr() throws PropertyException {
    Property prop = parseUnaryExpr();
  loop:
    for (;;) {
      switch (currentToken) {
      case TOK_DIV:
  next();
  prop = evalDivide(prop.getNumeric(), parseUnaryExpr().getNumeric() );
   break;
      case TOK_MOD:
  next();
  prop = evalModulo(prop.getNumber(), parseUnaryExpr().getNumber() );
  break;
      case TOK_MULTIPLY:
  next();
  prop = evalMultiply(prop.getNumeric(), parseUnaryExpr().getNumeric());
  break;
      default:
  break loop;
      }
    }
View Full Code Here

   * expression representing a primitive Property datatype, such as a
   * string literal, an NCname, a number or a unit expression, or a
   * function call expression.
   */
  private Property parsePrimaryExpr() throws PropertyException {
    Property prop;
    switch (currentToken) {
    case TOK_LPAR:
      next();
      prop = parseAdditiveExpr();
      expectRpar();
View Full Code Here

   * @throws PropertyException If the number of arguments found isn't equal
   * to the number expected.
   */
  Property[] parseArgs(int nbArgs) throws PropertyException {
    Property[] args = new Property[nbArgs];
    Property prop;
    int i=0;
    if (currentToken == TOK_RPAR) {
      // No args: func()
      next();
    }
View Full Code Here

            // if prop value is empty string, force to StringProperty
            return new StringProperty("");
        }
        ListProperty propList = null;
        while (true) {
            Property prop = parseAdditiveExpr();
            if (currentToken == TOK_EOF) {
                if (propList != null) {
                    propList.addProperty(prop);
                    return propList;
                } else
View Full Code Here

     * Try to parse an addition or subtraction expression and return the
     * resulting Property.
     */
    private Property parseAdditiveExpr() throws PropertyException {
        // Evaluate and put result on the operand stack
        Property prop = parseMultiplicativeExpr();
        loop:
        for (; ; ) {
            switch (currentToken) {
            case TOK_PLUS:
                next();
                prop = evalAddition(prop.getNumeric(),
                                    parseMultiplicativeExpr().getNumeric());
                break;
            case TOK_MINUS:
                next();
                prop =
                    evalSubtraction(prop.getNumeric(),
                                    parseMultiplicativeExpr().getNumeric());
                break;
            default:
                break loop;
            }
View Full Code Here

    /**
     * Try to parse a multiply, divide or modulo expression and return
     * the resulting Property.
     */
    private Property parseMultiplicativeExpr() throws PropertyException {
        Property prop = parseUnaryExpr();
        loop:
        for (; ; ) {
            switch (currentToken) {
            case TOK_DIV:
                next();
                prop = evalDivide(prop.getNumeric(),
                                  parseUnaryExpr().getNumeric());
                break;
            case TOK_MOD:
                next();
                prop = evalModulo(prop.getNumber(),
                                  parseUnaryExpr().getNumber());
                break;
            case TOK_MULTIPLY:
                next();
                prop = evalMultiply(prop.getNumeric(),
                                    parseUnaryExpr().getNumeric());
                break;
            default:
                break loop;
            }
View Full Code Here

     * expression representing a primitive Property datatype, such as a
     * string literal, an NCname, a number or a unit expression, or a
     * function call expression.
     */
    private Property parsePrimaryExpr() throws PropertyException {
        Property prop;
        switch (currentToken) {
        case TOK_LPAR:
            next();
            prop = parseAdditiveExpr();
            expectRpar();
View Full Code Here

     * @throws PropertyException If the number of arguments found isn't equal
     * to the number expected.
     */
    Property[] parseArgs(int nbArgs) throws PropertyException {
        Property[] args = new Property[nbArgs];
        Property prop;
        int i = 0;
        if (currentToken == TOK_RPAR) {
            // No args: func()
            next();
        } else {
View Full Code Here

TOP

Related Classes of org.apache.fop.fo.Property

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.