Search in sources :

Example 1 with ParameterizedExpressionContext

use of org.apache.sysml.parser.dml.DmlParser.ParameterizedExpressionContext in project incubator-systemml by apache.

the class DmlSyntacticValidator method getParameterExpressionList.

protected ArrayList<ParameterExpression> getParameterExpressionList(List<ParameterizedExpressionContext> paramExprs) {
    ArrayList<ParameterExpression> retVal = new ArrayList<ParameterExpression>();
    for (ParameterizedExpressionContext ctx : paramExprs) {
        String paramName = null;
        if (ctx.paramName != null && ctx.paramName.getText() != null && !ctx.paramName.getText().isEmpty()) {
            paramName = ctx.paramName.getText();
        }
        ParameterExpression myArg = new ParameterExpression(paramName, ctx.paramVal.info.expr);
        retVal.add(myArg);
    }
    return retVal;
}
Also used : ParameterExpression(org.apache.sysml.parser.ParameterExpression) ArrayList(java.util.ArrayList) ParameterizedExpressionContext(org.apache.sysml.parser.dml.DmlParser.ParameterizedExpressionContext) StrictParameterizedExpressionContext(org.apache.sysml.parser.dml.DmlParser.StrictParameterizedExpressionContext)

Aggregations

ArrayList (java.util.ArrayList)1 ParameterExpression (org.apache.sysml.parser.ParameterExpression)1 ParameterizedExpressionContext (org.apache.sysml.parser.dml.DmlParser.ParameterizedExpressionContext)1 StrictParameterizedExpressionContext (org.apache.sysml.parser.dml.DmlParser.StrictParameterizedExpressionContext)1