}
}
ParseTreeSpecializer specializer = new ParseTreeSpecializer();
parseTree = specializer.specialize(parseTree,
excludedVariables, _scope);
ParseTreeWriter writer = new ParseTreeWriter();
String outputExpression = writer
.printParseTree(parseTree);
parameter.setExpression(outputExpression);
}
} catch (ClassCastException ex) {
Settable parameter = (Settable) actor
.getAttribute(parameterName);
ParseTreeFreeVariableCollector collector = new ParseTreeFreeVariableCollector();
Set expressionVariables = collector
.collectFreeVariables(parseTree);
Set scopeVariables = _scope.identifierSet();
List<String> excludedVariables = new LinkedList<String>();
for (Object variable : expressionVariables) {
if (variable instanceof String) {
if (!scopeVariables.contains(variable)) {
excludedVariables.add((String) variable);
}
}
}
ParseTreeSpecializer specializer = new ParseTreeSpecializer();
parseTree = specializer.specialize(parseTree,
excludedVariables, _scope);
ParseTreeWriter writer = new ParseTreeWriter();
String outputExpression = writer
.printParseTree(parseTree);
parameter.setExpression(outputExpression);
}
}
} catch (Exception ex) {