Search in sources :

Example 1 with RelationalExpression

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

the class CommonSyntacticValidator method relationalExpressionHelper.

protected void relationalExpressionHelper(ParserRuleContext ctx, ExpressionInfo left, ExpressionInfo right, ExpressionInfo me, String op) {
    if (left.expr != null && right.expr != null) {
        Expression.RelationalOp rop = Expression.getRelationalOp(op);
        RelationalExpression re = new RelationalExpression(rop);
        re.setLeft(left.expr);
        re.setRight(right.expr);
        me.expr = re;
        setFileLineColumn(me.expr, ctx);
    }
}
Also used : RelationalExpression(org.apache.sysml.parser.RelationalExpression) 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 RelationalExpression

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

the class CommonSyntacticValidator method relationalExpressionHelper.

protected void relationalExpressionHelper(ParserRuleContext ctx, ExpressionInfo left, ExpressionInfo right, ExpressionInfo me, String op) {
    if (left.expr != null && right.expr != null) {
        Expression.RelationalOp rop = Expression.getRelationalOp(op);
        RelationalExpression re = new RelationalExpression(rop);
        re.setLeft(left.expr);
        re.setRight(right.expr);
        me.expr = re;
        setFileLineColumn(me.expr, ctx);
    }
}
Also used : RelationalExpression(org.apache.sysml.parser.RelationalExpression) 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)2 BooleanExpression (org.apache.sysml.parser.BooleanExpression)2 BuiltinFunctionExpression (org.apache.sysml.parser.BuiltinFunctionExpression)2 DataExpression (org.apache.sysml.parser.DataExpression)2 Expression (org.apache.sysml.parser.Expression)2 ParameterExpression (org.apache.sysml.parser.ParameterExpression)2 ParameterizedBuiltinFunctionExpression (org.apache.sysml.parser.ParameterizedBuiltinFunctionExpression)2 RelationalExpression (org.apache.sysml.parser.RelationalExpression)2