Package eu.admire.dispel.parser.expression

Examples of eu.admire.dispel.parser.expression.Constant


            graphBuilder.getSubmittedGraphs().addAll(builder.getSubmittedGraphs());
            graphBuilder.getRegistered().putAll(builder.getRegistered());
        }
       
       
        return new Constant(result);
  }
View Full Code Here


   
    @Override
    public void setLiteral(String text)
    {
        // need type - long, double, boolean or string
        mChildren.add(new Constant(text));
    }
View Full Code Here

        {
            return mReturnExpression;
        }
        else
        {
            return new Constant(mVariable);
        }
    }
View Full Code Here

                    "Assignment operator " + text + " is not supported.");
        }
        if ("++".equals(mAssignmentOperator))
        {
            Variable var = new Variable(mName, mIndices);
            setExpression(new Add(var, new Constant(Long.valueOf(1))));
        }
        else if ("--".equals(mAssignmentOperator))
        {
            Variable var = new Variable(mName, mIndices);
            setExpression(new Subtract(var, new Constant(Long.valueOf(1))));
        }
    }
View Full Code Here

        if (ast.getType() == DISPEL_v4Parser.LITERAL)
        {
            Tree child = ast.getChild(0);
            if (child.getType() == DISPEL_v4Parser.FloatingPointLiteral)
            {
                return new Constant(Double.valueOf(child.getText()));
            }
            else if (child.getType() == DISPEL_v4Parser.StringLiteral)
            {
                // remove quotes around the string
                return new Constant(child.getText().substring(1, child.getText().length()-1));
            }
            else if (child.getType() == DISPEL_v4Parser.DecimalLiteral)
            {
                return new Constant(Long.valueOf(child.getText()));
            }
            else if (child.getText().equals("true") || child.getText().equals("false"))
            {
                return new Constant(Boolean.valueOf(child.getText()));
            }
        }
        else if (ast.getType() == DISPEL_v4Parser.VARIABLE_ID)
        {
            List<Expression> expressions = new ArrayList<Expression>();
View Full Code Here

TOP

Related Classes of eu.admire.dispel.parser.expression.Constant

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.