Class NaryToBinaryRule

java.lang.Object
com.singularsys.extensions.rewrite.AbstractRewrite
com.singularsys.extensions.rewrite.NaryToBinaryRule
All Implemented Interfaces:
RewriteRuleI, JepComponent, Serializable

public class NaryToBinaryRule extends AbstractRewrite
Converts NaryBinaryFunction functions with multiple arguments to nested binary functions. e.g. +(a,b,c) -> (a+b)+c. If the function has an operators it must have either left (a+b)+c right binding a=(b=c) Operator.isRightBinding() Functions without operators assumed to be left associative. This rule is the inverse of BinaryToNaryRule and the two should not be used together. #see @link Operator#isLeftBinding()
Since:
Jep 4.1 extensions 2.2
See Also: