Examples of VariableToken


Examples of ket.math.purpose.VariableToken

          Token unknown = readNextSymbol(equation, knownArguments);
          tokenList.append(unknown);
          continue;
        }
        Word word = new Word(string);
        Token variable = new VariableToken(word);
        tokenList.append(variable);
      } else {
        Token unknown = readNextSymbol(equation, knownArguments);
        tokenList.append(unknown);
      }
View Full Code Here

Examples of ket.math.purpose.VariableToken

          return new Branch(Function.TIMES, new Token(mantissa), power);

        default:
          Ket.out.println(" !!! Bug: cannot interpret number format: !!! ");
          Ket.out.println(doubleString);
          return new VariableToken(new Text(doubleString));
      }
    } else {
      String integerString = readNext(INTEGER, equation);
      String[] parts = integerString.split("[eE]");
      switch (parts.length) {
        case 1: // mantissa
          int intValue = Integer.parseInt(parts[0]);
          return new Token(intValue);

        case 2: // mantissa E exponent
          int mantissa = Integer.parseInt(parts[0]);
          int exponent = Integer.parseInt(parts[1]);
          Branch power = new Branch(Function.POWER, new Token(10), new Token(exponent));
          return new Branch(Function.TIMES, new Token(mantissa), power);

        default:
          Ket.out.println(" !!! Bug: cannot interpret number format: !!! ");
          Ket.out.println(integerString);
          return new VariableToken(new Text(integerString));
      }
    }
  }
View Full Code Here

Examples of ket.math.purpose.VariableToken

    Function function = this.getFunction();
    VariableState state = knownArguments.functionToState(function);
    if (state==null) {
      state = new Word(function.getName());
    }
    return new VariableToken(state);
  }
View Full Code Here

Examples of org.jfree.layouting.layouter.content.computed.VariableToken

      final ResolvedStringToken stringToken =
          (ResolvedStringToken) resolvedToken;
      final ComputedToken parent = stringToken.getParent();
      if (parent instanceof VariableToken)
      {
        final VariableToken vt = (VariableToken) parent;
        final String variable = vt.getVariable();
        final CSSValue stringPolicy = documentContext.getStringPolicy(variable);
        return pageContext.getString(variable, stringPolicy);
      }
    }
    else if (resolvedToken instanceof ResolvedCounterToken)
View Full Code Here

Examples of org.jfree.layouting.layouter.content.computed.VariableToken

            (openQuoteToken, currentQuote.getOpenQuote());
      }
    }
    else if (token instanceof VariableToken)
    {
      final VariableToken variableToken = (VariableToken) token;
      final String resolvedText =
          currentElement.getString(variableToken.getVariable());
      return new ResolvedStringToken(variableToken, resolvedText);
    }
    else if (token instanceof CounterToken)
    {
      final CounterToken counterToken = (CounterToken) token;
View Full Code Here

Examples of org.jfree.layouting.layouter.content.computed.VariableToken

    if (params.length != 1)
    {
      throw new FunctionEvaluationException();
    }
    final String name = FunctionUtilities.resolveString(layoutProcess, element, params[0]);
    return new VariableToken(name);
  }
View Full Code Here

Examples of org.jfree.layouting.layouter.content.computed.VariableToken

            (openQuoteToken, currentQuote.getOpenQuote());
      }
    }
    else if (token instanceof VariableToken)
    {
      final VariableToken variableToken = (VariableToken) token;
      final String resolvedText =
          currentElement.getString(variableToken.getVariable());
      return new ResolvedStringToken(variableToken, resolvedText);
    }
    else if (token instanceof CounterToken)
    {
      final CounterToken counterToken = (CounterToken) token;
View Full Code Here

Examples of org.jfree.layouting.layouter.content.computed.VariableToken

    if (params.length != 1)
    {
      throw new FunctionEvaluationException();
    }
    final String name = FunctionUtilities.resolveString(layoutProcess, element, params[0]);
    return new VariableToken(name);
  }
View Full Code Here

Examples of org.jfree.layouting.layouter.content.computed.VariableToken

      final ResolvedStringToken stringToken =
          (ResolvedStringToken) resolvedToken;
      final ComputedToken parent = stringToken.getParent();
      if (parent instanceof VariableToken)
      {
        final VariableToken vt = (VariableToken) parent;
        final String variable = vt.getVariable();
        final CSSValue stringPolicy = documentContext.getStringPolicy(variable);
        return pageContext.getString(variable, stringPolicy);
      }
    }
    else if (resolvedToken instanceof ResolvedCounterToken)
View Full Code Here

Examples of org.jfree.layouting.layouter.content.computed.VariableToken

      final ResolvedStringToken stringToken =
          (ResolvedStringToken) resolvedToken;
      final ComputedToken parent = stringToken.getParent();
      if (parent instanceof VariableToken)
      {
        final VariableToken vt = (VariableToken) parent;
        final String variable = vt.getVariable();
        final CSSValue stringPolicy = documentContext.getStringPolicy(variable);
        return pageContext.getString(variable, stringPolicy);
      }
    }
    else if (resolvedToken instanceof ResolvedCounterToken)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.