Search in sources :

Example 1 with BooleanExpression

use of org.apache.sysml.parser.BooleanExpression in project incubator-systemml by apache.

the class CommonSyntacticValidator method booleanExpressionHelper.

protected void booleanExpressionHelper(ParserRuleContext ctx, ExpressionInfo left, ExpressionInfo right, ExpressionInfo me, String op) {
    if (left.expr != null && right.expr != null) {
        Expression.BooleanOp bop = Expression.getBooleanOp(op);
        BooleanExpression re = new BooleanExpression(bop);
        re.setLeft(left.expr);
        re.setRight(right.expr);
        me.expr = re;
        setFileLineColumn(me.expr, ctx);
    }
}
Also used : BooleanExpression(org.apache.sysml.parser.BooleanExpression) RelationalExpression(org.apache.sysml.parser.RelationalExpression) BooleanExpression(org.apache.sysml.parser.BooleanExpression) ParameterizedBuiltinFunctionExpression(org.apache.sysml.parser.ParameterizedBuiltinFunctionExpression) BuiltinFunctionExpression(org.apache.sysml.parser.BuiltinFunctionExpression) BinaryExpression(org.apache.sysml.parser.BinaryExpression) Expression(org.apache.sysml.parser.Expression) ParameterExpression(org.apache.sysml.parser.ParameterExpression) DataExpression(org.apache.sysml.parser.DataExpression)

Example 2 with BooleanExpression

use of org.apache.sysml.parser.BooleanExpression in project incubator-systemml by apache.

the class CommonSyntacticValidator method unaryBooleanExpressionHelper.

protected void unaryBooleanExpressionHelper(ParserRuleContext ctx, ExpressionInfo left, ExpressionInfo me, String op) {
    if (left.expr != null) {
        Expression.BooleanOp bop = Expression.getBooleanOp(op);
        BooleanExpression be = new BooleanExpression(bop);
        be.setLeft(left.expr);
        me.expr = be;
        setFileLineColumn(me.expr, ctx);
    }
}
Also used : BooleanExpression(org.apache.sysml.parser.BooleanExpression) RelationalExpression(org.apache.sysml.parser.RelationalExpression) BooleanExpression(org.apache.sysml.parser.BooleanExpression) ParameterizedBuiltinFunctionExpression(org.apache.sysml.parser.ParameterizedBuiltinFunctionExpression) BuiltinFunctionExpression(org.apache.sysml.parser.BuiltinFunctionExpression) BinaryExpression(org.apache.sysml.parser.BinaryExpression) Expression(org.apache.sysml.parser.Expression) ParameterExpression(org.apache.sysml.parser.ParameterExpression) DataExpression(org.apache.sysml.parser.DataExpression)

Example 3 with BooleanExpression

use of org.apache.sysml.parser.BooleanExpression in project systemml by apache.

the class CommonSyntacticValidator method unaryBooleanExpressionHelper.

protected void unaryBooleanExpressionHelper(ParserRuleContext ctx, ExpressionInfo left, ExpressionInfo me, String op) {
    if (left.expr != null) {
        Expression.BooleanOp bop = Expression.getBooleanOp(op);
        BooleanExpression be = new BooleanExpression(bop);
        be.setLeft(left.expr);
        me.expr = be;
        setFileLineColumn(me.expr, ctx);
    }
}
Also used : BooleanExpression(org.apache.sysml.parser.BooleanExpression) RelationalExpression(org.apache.sysml.parser.RelationalExpression) BooleanExpression(org.apache.sysml.parser.BooleanExpression) ParameterizedBuiltinFunctionExpression(org.apache.sysml.parser.ParameterizedBuiltinFunctionExpression) BuiltinFunctionExpression(org.apache.sysml.parser.BuiltinFunctionExpression) BinaryExpression(org.apache.sysml.parser.BinaryExpression) Expression(org.apache.sysml.parser.Expression) ParameterExpression(org.apache.sysml.parser.ParameterExpression) DataExpression(org.apache.sysml.parser.DataExpression)

Example 4 with BooleanExpression

use of org.apache.sysml.parser.BooleanExpression in project systemml by apache.

the class CommonSyntacticValidator method booleanExpressionHelper.

protected void booleanExpressionHelper(ParserRuleContext ctx, ExpressionInfo left, ExpressionInfo right, ExpressionInfo me, String op) {
    if (left.expr != null && right.expr != null) {
        Expression.BooleanOp bop = Expression.getBooleanOp(op);
        BooleanExpression re = new BooleanExpression(bop);
        re.setLeft(left.expr);
        re.setRight(right.expr);
        me.expr = re;
        setFileLineColumn(me.expr, ctx);
    }
}
Also used : BooleanExpression(org.apache.sysml.parser.BooleanExpression) RelationalExpression(org.apache.sysml.parser.RelationalExpression) BooleanExpression(org.apache.sysml.parser.BooleanExpression) ParameterizedBuiltinFunctionExpression(org.apache.sysml.parser.ParameterizedBuiltinFunctionExpression) BuiltinFunctionExpression(org.apache.sysml.parser.BuiltinFunctionExpression) BinaryExpression(org.apache.sysml.parser.BinaryExpression) Expression(org.apache.sysml.parser.Expression) ParameterExpression(org.apache.sysml.parser.ParameterExpression) DataExpression(org.apache.sysml.parser.DataExpression)

Aggregations

BinaryExpression (org.apache.sysml.parser.BinaryExpression)4 BooleanExpression (org.apache.sysml.parser.BooleanExpression)4 BuiltinFunctionExpression (org.apache.sysml.parser.BuiltinFunctionExpression)4 DataExpression (org.apache.sysml.parser.DataExpression)4 Expression (org.apache.sysml.parser.Expression)4 ParameterExpression (org.apache.sysml.parser.ParameterExpression)4 ParameterizedBuiltinFunctionExpression (org.apache.sysml.parser.ParameterizedBuiltinFunctionExpression)4 RelationalExpression (org.apache.sysml.parser.RelationalExpression)4