Package eu.admire.dispel.parser.exception

Examples of eu.admire.dispel.parser.exception.UnsupportedExpressionException


            }
        }
        else
        {
            // any other types are currently unsupported
            throw new UnsupportedExpressionException(value.getClass().getName());
        }

    }
View Full Code Here


                mBuilder.endContext(Context.INNER_EXPRESSION);
                return mBuilder.getInnerExpression();
            }
            catch (Exception e)
            {
                UnsupportedExpressionException wrapper =
                    new UnsupportedExpressionException(ast.toStringTree());
                wrapper.initCause(e);
                throw wrapper;
            }
        }
        else if (ast.getType() == DISPEL_v4Parser.FUNCTION_CALL)
        {
            handleChild(ast);
            return mFunctionResult;
        }
        else if (Operator.isOperator(ast.getText()))
        {
            Expression left = null;
            Expression right = null;
            if (ast.getChildCount() > 1)
            {
                left = buildExpression(ast.getChild(0));
                right = buildExpression(ast.getChild(1));
            }
            else
            {
                right = buildExpression(ast.getChild(0));
            }
            Expression expression =
                Operator.getOperator(ast.getText()).getExpression();
            expression.setChild(1, right);
            if (left != null)
            {
                expression.setChild(0, left);
            }
            return expression;
        }
        else if (Comparator.isComparison(ast.getText()))
        {
            Expression left = buildExpression(ast.getChild(0));
            Expression right = buildExpression(ast.getChild(1));
            Expression expression =
                Comparator.getComparator(ast.getText()).getExpression();
            expression.setChild(0, left);
            expression.setChild(1, right);
            return expression;
        }
        else
        {
            handleChild(ast);
            return null;
        }
        throw new UnsupportedExpressionException(ast.toStringTree());
    }
View Full Code Here

TOP

Related Classes of eu.admire.dispel.parser.exception.UnsupportedExpressionException

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.