Class ExpandBrackets
- java.lang.Object
-
- com.singularsys.extensions.rewrite.AbstractRewrite
-
- com.singularsys.extensions.rewrite.ExpandBrackets
-
- All Implemented Interfaces:
RewriteRuleI
,JepComponent
,java.io.Serializable
public class ExpandBrackets extends AbstractRewrite
A rule which expands brackets (a+b)*(c+d) -> a*c+a*d+b*c+b*d- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExpandBrackets()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Node
apply(ASTFunNode node, Node[] children)
Rewrites the nodeboolean
test(ASTFunNode node, Node[] children)
TODO cope with a * uminus(x+x)-
Methods inherited from class com.singularsys.extensions.rewrite.AbstractRewrite
getLightWeightInstance, init
-
-
-
-
Method Detail
-
test
public boolean test(ASTFunNode node, Node[] children)
TODO cope with a * uminus(x+x)
-
apply
public Node apply(ASTFunNode node, Node[] children) throws ParseException
Description copied from interface:RewriteRuleI
Rewrites the node- Throws:
ParseException
-
-