Package info.bliki.wiki.template.expr.ast

Examples of info.bliki.wiki.template.expr.ast.FractionNode


  @Override
  public ASTNode createFunction(final IParserFactory factory,
      final ASTNode lhs, final ASTNode rhs) {
    if (rhs instanceof IntegerNode) {
      if (lhs instanceof IntegerNode) {
        return new FractionNode((IntegerNode) lhs, (IntegerNode) rhs);
      }
      return factory.createFunction(factory.createSymbol("Times"), lhs,
          new FractionNode(IntegerNode.C1, (IntegerNode) rhs));
    }
    return factory.createFunction(factory.createSymbol("Times"), lhs,
        factory.createFunction(factory.createSymbol("Power"), rhs,
            factory.createInteger(-1)));
  }
View Full Code Here


    return new IntegerNode(intValue);
  }

  @Override
  public FractionNode createFraction(final IntegerNode numerator, final IntegerNode denominator) {
    return new FractionNode(numerator, denominator);
  }
View Full Code Here

    @Override
    public ASTNode createFunction(final IParserFactory factory,
            final ASTNode lhs, final ASTNode rhs) {
        if (rhs instanceof IntegerNode) {
            if (lhs instanceof IntegerNode) {
                return new FractionNode((IntegerNode) lhs, (IntegerNode) rhs);
            }
            return factory.createFunction(factory.createSymbol("Times"), lhs,
                    new FractionNode(IntegerNode.C1, (IntegerNode) rhs));
        }
        return factory.createFunction(factory.createSymbol("Times"), lhs,
                factory.createFunction(factory.createSymbol("Power"), rhs,
                        factory.createInteger(-1)));
    }
View Full Code Here

        return new IntegerNode(intValue);
    }

    @Override
    public FractionNode createFraction(final IntegerNode numerator, final IntegerNode denominator) {
        return new FractionNode(numerator, denominator);
    }
View Full Code Here

  public ASTNode createFunction(final IParserFactory factory,
      final ASTNode lhs, final ASTNode rhs) {
    if (rhs instanceof IntegerNode) {
      if (lhs instanceof IntegerNode) {
        return new FractionNode((IntegerNode) lhs, (IntegerNode) rhs);
      }
      return factory.createFunction(factory.createSymbol("Times"), lhs,
          new FractionNode(IntegerNode.C1, (IntegerNode) rhs));
    }
    return factory.createFunction(factory.createSymbol("Times"), lhs,
        factory.createFunction(factory.createSymbol("Power"), rhs,
            factory.createInteger(-1)));
  }
View Full Code Here

  public IntegerNode createInteger(final int intValue) {
    return new IntegerNode(intValue);
  }

  public FractionNode createFraction(final IntegerNode numerator, final IntegerNode denominator) {
    return new FractionNode(numerator, denominator);
  }
View Full Code Here

TOP

Related Classes of info.bliki.wiki.template.expr.ast.FractionNode

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.