Class ExpressionConverter<T>

java.lang.Object
nz.org.riskscape.rl.ast.ExpressionConverter<T>
Type Parameters:
T - data passed around to assist with conversion
All Implemented Interfaces:
ExpressionVisitor<T,Expression>
Direct Known Subclasses:
ParameterReplacer

public class ExpressionConverter<T> extends Object implements ExpressionVisitor<T,Expression>

A ExpressionVisitor for converting expressions in some way.

For simple expressions this implementation will return the simple expression.

For complex expressions a new instance of the expression is returned with converted sub expressions.

By default, any tokens associated with the AST will no longer share the same source - if they need to be in agreement, then the tokens can be 'normalized' by re-parsing the expression