Package railo.runtime.interpreter.ref

Examples of railo.runtime.interpreter.ref.Ref


    * <code>expoOp {("*"|"/") spaces expoOp};</code>
    * @return CFXD Element
    * @throws PageException
    */
    private Ref divMultiOp() throws PageException {
        Ref ref = expoOp();

        while (!cfml.isLast()) {
            // Multiply Operation
            if(cfml.forwardIfCurrent('*')) {
                ref=_multi(ref);
View Full Code Here


    * <code>clip {("exp"|"^") spaces clip};</code>
    * @return CFXD Element
    * @throws PageException
    */
    private Ref expoOp() throws PageException {
        Ref ref = unaryOp();

        while(cfml.isValidIndex() && (cfml.forwardIfCurrent('^') || cfml.forwardIfCurrent("exp"))) {
            cfml.removeSpace();
            ref=new Exp(ref,unaryOp());
        }
View Full Code Here

        return ref;
    }
   

    private Ref unaryOp() throws PageException {
        Ref ref = negateMinusOp();
       
    if (cfml.forwardIfCurrent("--"))
      ref=_unaryOp(ref, false);
   
    else if (cfml.forwardIfCurrent("++"))
View Full Code Here

    return ref;
  }
   
    private Ref _unaryOp(Ref ref,boolean isPlus) throws PageException {
        cfml.removeSpace();
    Ref res = preciseMath?new BigPlus(ref,isPlus?PLUS_ONE:MINUS_ONE):new Plus(ref,isPlus?PLUS_ONE:MINUS_ONE);
    ref=new Assign(ref,res);
    return preciseMath?new BigPlus(ref,isPlus?MINUS_ONE:PLUS_ONE):new Plus(ref,isPlus?MINUS_ONE:PLUS_ONE);
  }
View Full Code Here

    private Ref negateMinusOp() throws PageException {
        // And Operation
        if (cfml.forwardIfCurrent('-')) {
          if (cfml.forwardIfCurrent('-')) {
            cfml.removeSpace();
        Ref expr = clip();
        Ref res = preciseMath?new BigMinus(expr,new LNumber(new Double(1))):new Minus(expr,new LNumber(new Double(1)));
        return new Assign(expr,res);
     
            cfml.removeSpace();
            return new Negate(clip());
         
        }
        if (cfml.forwardIfCurrent('+')) {
          if (cfml.forwardIfCurrent('+')) {
            cfml.removeSpace();
        Ref expr = clip();
        Ref res = preciseMath?new BigPlus(expr,new LNumber(new Double(1))):new Plus(expr,new LNumber(new Double(1)));
        return new Assign(expr,res);
      }
          cfml.removeSpace();
          return new Casting("numeric",CFTypes.TYPE_NUMERIC,clip());
         
View Full Code Here

    * @return CFXD Element
    * @throws PageException
    */
    private Ref checker() throws PageException {
       
        Ref ref=null
        // String
            if(cfml.isCurrentQuoter()) {
                // mode=STATIC; is at the end of the string function because must set after execution
                return string();
            }
View Full Code Here

                       
        // Init Parameter
        char quoter = cfml.getCurrentLower();
        //String str="";
        LStringBuffer str=new LStringBuffer();
        Ref value=null;
       
        while(cfml.hasNext()) {
            cfml.next();
            // check sharp
            if(cfml.isCurrent('#')) {
View Full Code Here

        // get First Element of the Variable
        String name = identifier(false);
        if(name == null) {
            if (!cfml.forwardIfCurrent('('))return null;
            cfml.removeSpace();
            Ref ref = assignOp();

            if (!cfml.forwardIfCurrent(')'))
                throw new InterpreterException("Invalid Syntax Closing [)] not found");
            cfml.removeSpace();
            return subDynamic(ref);
        }

        //Element el;
        cfml.removeSpace();
        //char first=name.charAt(0);
       
        // Boolean constant
        if(name.equalsIgnoreCase("TRUE"))   {
            cfml.removeSpace();
            return LBoolean.TRUE;
        }
        else if(name.equalsIgnoreCase("FALSE")) {
            cfml.removeSpace();
            return LBoolean.FALSE;
        }  
        else if(name.equalsIgnoreCase("YES"))   {
            cfml.removeSpace();
            return LBoolean.TRUE;
        }
        else if(name.equalsIgnoreCase("NO")){
        cfml.removeSpace();
        return LBoolean.FALSE;
      }
      else if(allowNullConstant && name.equalsIgnoreCase("NULL")){
        cfml.removeSpace();
        return new  LString(null);
      }
      else if(name.equalsIgnoreCase("NEW")){
        Ref res = newOp();
        if(res!=null) return res;
     
       
       
       
View Full Code Here

            FunctionLibFunction function = fld.getFunction(name);
            Ref[] arguments = functionArg(name,true, function,')');
          //print.out(name+":"+(function!=null));
            if(function!=null) return new BIFCall(function,arguments);

            Ref ref = new railo.runtime.interpreter.ref.var.Scope(Scope.SCOPE_UNDEFINED);
            return new UDFCall(ref,name,arguments);
        }
        //check scope
        return scope(name);
    }
View Full Code Here

      String name=null;
      cfml.removeSpace();
     
      // first identifier
      name = identifier(true);
    Ref refName=null;
    if(name!=null) {
      StringBuilder fullName=new StringBuilder();
      fullName.append(name);
      // Loop over addional identifier
      while (cfml.isValidIndex()) {
View Full Code Here

TOP

Related Classes of railo.runtime.interpreter.ref.Ref

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.