Search in sources :

Example 1 with ParameterizedExpressionContext

use of org.apache.sysml.parser.pydml.PydmlParser.ParameterizedExpressionContext in project incubator-systemml by apache.

the class PydmlSyntacticValidator 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.pydml.PydmlParser.ParameterizedExpressionContext) StrictParameterizedExpressionContext(org.apache.sysml.parser.pydml.PydmlParser.StrictParameterizedExpressionContext)

Aggregations

ArrayList (java.util.ArrayList)1 ParameterExpression (org.apache.sysml.parser.ParameterExpression)1 ParameterizedExpressionContext (org.apache.sysml.parser.pydml.PydmlParser.ParameterizedExpressionContext)1 StrictParameterizedExpressionContext (org.apache.sysml.parser.pydml.PydmlParser.StrictParameterizedExpressionContext)1