public String evaluateString(String expression) {
try {
PtParser parser = new PtParser();
ParseTreeEvaluator _parseTreeEvaluator = new ParseTreeEvaluator();
ASTPtRootNode _parseTree = parser.generateParseTree(expression);
Token result = _parseTreeEvaluator.evaluateParseTree(_parseTree,
_scope);
if (result instanceof StringToken) {
return ((StringToken) result).stringValue();
}
return result.toString();