Search in sources :

Example 1 with ExpressionList

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

the class DmlSyntacticValidator method exitMultiIdExpression.

@Override
public void exitMultiIdExpression(MultiIdExpressionContext ctx) {
    ArrayList<Expression> values = new ArrayList<>();
    for (ExpressionContext elem : ctx.targetList) {
        values.add(elem.info.expr);
    }
    ctx.info.expr = new ExpressionList(values);
}
Also used : Expression(org.apache.sysml.parser.Expression) ParameterExpression(org.apache.sysml.parser.ParameterExpression) CommandlinePositionExpressionContext(org.apache.sysml.parser.dml.DmlParser.CommandlinePositionExpressionContext) IterablePredicateSeqExpressionContext(org.apache.sysml.parser.dml.DmlParser.IterablePredicateSeqExpressionContext) MultiIdExpressionContext(org.apache.sysml.parser.dml.DmlParser.MultiIdExpressionContext) ConstFalseExpressionContext(org.apache.sysml.parser.dml.DmlParser.ConstFalseExpressionContext) IterablePredicateColonExpressionContext(org.apache.sysml.parser.dml.DmlParser.IterablePredicateColonExpressionContext) SimpleDataIdentifierExpressionContext(org.apache.sysml.parser.dml.DmlParser.SimpleDataIdentifierExpressionContext) ParameterizedExpressionContext(org.apache.sysml.parser.dml.DmlParser.ParameterizedExpressionContext) MatrixMulExpressionContext(org.apache.sysml.parser.dml.DmlParser.MatrixMulExpressionContext) MultDivExpressionContext(org.apache.sysml.parser.dml.DmlParser.MultDivExpressionContext) ConstStringIdExpressionContext(org.apache.sysml.parser.dml.DmlParser.ConstStringIdExpressionContext) UnaryExpressionContext(org.apache.sysml.parser.dml.DmlParser.UnaryExpressionContext) ConstIntIdExpressionContext(org.apache.sysml.parser.dml.DmlParser.ConstIntIdExpressionContext) BuiltinFunctionExpressionContext(org.apache.sysml.parser.dml.DmlParser.BuiltinFunctionExpressionContext) ExternalFunctionDefExpressionContext(org.apache.sysml.parser.dml.DmlParser.ExternalFunctionDefExpressionContext) CommandlineParamExpressionContext(org.apache.sysml.parser.dml.DmlParser.CommandlineParamExpressionContext) AtomicExpressionContext(org.apache.sysml.parser.dml.DmlParser.AtomicExpressionContext) ModIntDivExpressionContext(org.apache.sysml.parser.dml.DmlParser.ModIntDivExpressionContext) IndexedExpressionContext(org.apache.sysml.parser.dml.DmlParser.IndexedExpressionContext) ConstDoubleIdExpressionContext(org.apache.sysml.parser.dml.DmlParser.ConstDoubleIdExpressionContext) BooleanAndExpressionContext(org.apache.sysml.parser.dml.DmlParser.BooleanAndExpressionContext) InternalFunctionDefExpressionContext(org.apache.sysml.parser.dml.DmlParser.InternalFunctionDefExpressionContext) BooleanNotExpressionContext(org.apache.sysml.parser.dml.DmlParser.BooleanNotExpressionContext) ConstTrueExpressionContext(org.apache.sysml.parser.dml.DmlParser.ConstTrueExpressionContext) ExpressionContext(org.apache.sysml.parser.dml.DmlParser.ExpressionContext) PowerExpressionContext(org.apache.sysml.parser.dml.DmlParser.PowerExpressionContext) RelationalExpressionContext(org.apache.sysml.parser.dml.DmlParser.RelationalExpressionContext) DataIdExpressionContext(org.apache.sysml.parser.dml.DmlParser.DataIdExpressionContext) StrictParameterizedExpressionContext(org.apache.sysml.parser.dml.DmlParser.StrictParameterizedExpressionContext) AddSubExpressionContext(org.apache.sysml.parser.dml.DmlParser.AddSubExpressionContext) BooleanOrExpressionContext(org.apache.sysml.parser.dml.DmlParser.BooleanOrExpressionContext) ArrayList(java.util.ArrayList) ExpressionList(org.apache.sysml.parser.ExpressionList)

Example 2 with ExpressionList

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

the class DmlSyntacticValidator method exitMultiIdExpression.

@Override
public void exitMultiIdExpression(MultiIdExpressionContext ctx) {
    ArrayList<Expression> values = new ArrayList<>();
    for (ExpressionContext elem : ctx.targetList) {
        values.add(elem.info.expr);
    }
    ctx.info.expr = new ExpressionList(values);
}
Also used : Expression(org.apache.sysml.parser.Expression) ParameterExpression(org.apache.sysml.parser.ParameterExpression) CommandlinePositionExpressionContext(org.apache.sysml.parser.dml.DmlParser.CommandlinePositionExpressionContext) IterablePredicateSeqExpressionContext(org.apache.sysml.parser.dml.DmlParser.IterablePredicateSeqExpressionContext) MultiIdExpressionContext(org.apache.sysml.parser.dml.DmlParser.MultiIdExpressionContext) ConstFalseExpressionContext(org.apache.sysml.parser.dml.DmlParser.ConstFalseExpressionContext) IterablePredicateColonExpressionContext(org.apache.sysml.parser.dml.DmlParser.IterablePredicateColonExpressionContext) SimpleDataIdentifierExpressionContext(org.apache.sysml.parser.dml.DmlParser.SimpleDataIdentifierExpressionContext) ParameterizedExpressionContext(org.apache.sysml.parser.dml.DmlParser.ParameterizedExpressionContext) MatrixMulExpressionContext(org.apache.sysml.parser.dml.DmlParser.MatrixMulExpressionContext) MultDivExpressionContext(org.apache.sysml.parser.dml.DmlParser.MultDivExpressionContext) ConstStringIdExpressionContext(org.apache.sysml.parser.dml.DmlParser.ConstStringIdExpressionContext) UnaryExpressionContext(org.apache.sysml.parser.dml.DmlParser.UnaryExpressionContext) ConstIntIdExpressionContext(org.apache.sysml.parser.dml.DmlParser.ConstIntIdExpressionContext) BuiltinFunctionExpressionContext(org.apache.sysml.parser.dml.DmlParser.BuiltinFunctionExpressionContext) ExternalFunctionDefExpressionContext(org.apache.sysml.parser.dml.DmlParser.ExternalFunctionDefExpressionContext) CommandlineParamExpressionContext(org.apache.sysml.parser.dml.DmlParser.CommandlineParamExpressionContext) AtomicExpressionContext(org.apache.sysml.parser.dml.DmlParser.AtomicExpressionContext) ModIntDivExpressionContext(org.apache.sysml.parser.dml.DmlParser.ModIntDivExpressionContext) IndexedExpressionContext(org.apache.sysml.parser.dml.DmlParser.IndexedExpressionContext) ConstDoubleIdExpressionContext(org.apache.sysml.parser.dml.DmlParser.ConstDoubleIdExpressionContext) BooleanAndExpressionContext(org.apache.sysml.parser.dml.DmlParser.BooleanAndExpressionContext) InternalFunctionDefExpressionContext(org.apache.sysml.parser.dml.DmlParser.InternalFunctionDefExpressionContext) BooleanNotExpressionContext(org.apache.sysml.parser.dml.DmlParser.BooleanNotExpressionContext) ConstTrueExpressionContext(org.apache.sysml.parser.dml.DmlParser.ConstTrueExpressionContext) ExpressionContext(org.apache.sysml.parser.dml.DmlParser.ExpressionContext) PowerExpressionContext(org.apache.sysml.parser.dml.DmlParser.PowerExpressionContext) RelationalExpressionContext(org.apache.sysml.parser.dml.DmlParser.RelationalExpressionContext) DataIdExpressionContext(org.apache.sysml.parser.dml.DmlParser.DataIdExpressionContext) StrictParameterizedExpressionContext(org.apache.sysml.parser.dml.DmlParser.StrictParameterizedExpressionContext) AddSubExpressionContext(org.apache.sysml.parser.dml.DmlParser.AddSubExpressionContext) BooleanOrExpressionContext(org.apache.sysml.parser.dml.DmlParser.BooleanOrExpressionContext) ArrayList(java.util.ArrayList) ExpressionList(org.apache.sysml.parser.ExpressionList)

Aggregations

ArrayList (java.util.ArrayList)2 Expression (org.apache.sysml.parser.Expression)2 ExpressionList (org.apache.sysml.parser.ExpressionList)2 ParameterExpression (org.apache.sysml.parser.ParameterExpression)2 AddSubExpressionContext (org.apache.sysml.parser.dml.DmlParser.AddSubExpressionContext)2 AtomicExpressionContext (org.apache.sysml.parser.dml.DmlParser.AtomicExpressionContext)2 BooleanAndExpressionContext (org.apache.sysml.parser.dml.DmlParser.BooleanAndExpressionContext)2 BooleanNotExpressionContext (org.apache.sysml.parser.dml.DmlParser.BooleanNotExpressionContext)2 BooleanOrExpressionContext (org.apache.sysml.parser.dml.DmlParser.BooleanOrExpressionContext)2 BuiltinFunctionExpressionContext (org.apache.sysml.parser.dml.DmlParser.BuiltinFunctionExpressionContext)2 CommandlineParamExpressionContext (org.apache.sysml.parser.dml.DmlParser.CommandlineParamExpressionContext)2 CommandlinePositionExpressionContext (org.apache.sysml.parser.dml.DmlParser.CommandlinePositionExpressionContext)2 ConstDoubleIdExpressionContext (org.apache.sysml.parser.dml.DmlParser.ConstDoubleIdExpressionContext)2 ConstFalseExpressionContext (org.apache.sysml.parser.dml.DmlParser.ConstFalseExpressionContext)2 ConstIntIdExpressionContext (org.apache.sysml.parser.dml.DmlParser.ConstIntIdExpressionContext)2 ConstStringIdExpressionContext (org.apache.sysml.parser.dml.DmlParser.ConstStringIdExpressionContext)2 ConstTrueExpressionContext (org.apache.sysml.parser.dml.DmlParser.ConstTrueExpressionContext)2 DataIdExpressionContext (org.apache.sysml.parser.dml.DmlParser.DataIdExpressionContext)2 ExpressionContext (org.apache.sysml.parser.dml.DmlParser.ExpressionContext)2 ExternalFunctionDefExpressionContext (org.apache.sysml.parser.dml.DmlParser.ExternalFunctionDefExpressionContext)2