Search in sources :

Example 1 with ExpressionContext

use of org.apache.sysml.parser.dml.DmlParser.ExpressionContext 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)1 Expression (org.apache.sysml.parser.Expression)1 ExpressionList (org.apache.sysml.parser.ExpressionList)1 ParameterExpression (org.apache.sysml.parser.ParameterExpression)1 AddSubExpressionContext (org.apache.sysml.parser.dml.DmlParser.AddSubExpressionContext)1 AtomicExpressionContext (org.apache.sysml.parser.dml.DmlParser.AtomicExpressionContext)1 BooleanAndExpressionContext (org.apache.sysml.parser.dml.DmlParser.BooleanAndExpressionContext)1 BooleanNotExpressionContext (org.apache.sysml.parser.dml.DmlParser.BooleanNotExpressionContext)1 BooleanOrExpressionContext (org.apache.sysml.parser.dml.DmlParser.BooleanOrExpressionContext)1 BuiltinFunctionExpressionContext (org.apache.sysml.parser.dml.DmlParser.BuiltinFunctionExpressionContext)1 CommandlineParamExpressionContext (org.apache.sysml.parser.dml.DmlParser.CommandlineParamExpressionContext)1 CommandlinePositionExpressionContext (org.apache.sysml.parser.dml.DmlParser.CommandlinePositionExpressionContext)1 ConstDoubleIdExpressionContext (org.apache.sysml.parser.dml.DmlParser.ConstDoubleIdExpressionContext)1 ConstFalseExpressionContext (org.apache.sysml.parser.dml.DmlParser.ConstFalseExpressionContext)1 ConstIntIdExpressionContext (org.apache.sysml.parser.dml.DmlParser.ConstIntIdExpressionContext)1 ConstStringIdExpressionContext (org.apache.sysml.parser.dml.DmlParser.ConstStringIdExpressionContext)1 ConstTrueExpressionContext (org.apache.sysml.parser.dml.DmlParser.ConstTrueExpressionContext)1 DataIdExpressionContext (org.apache.sysml.parser.dml.DmlParser.DataIdExpressionContext)1 ExpressionContext (org.apache.sysml.parser.dml.DmlParser.ExpressionContext)1 ExternalFunctionDefExpressionContext (org.apache.sysml.parser.dml.DmlParser.ExternalFunctionDefExpressionContext)1