} else if( type.equalsIgnoreCase("PROD") ) {
and = new RuleConnectionMethodAndProduct();
or = new RuleConnectionMethodOrProbOr();
} else if( type.equalsIgnoreCase("BDIF") ) {
and = new RuleConnectionMethodAndBoundedDif();
or = new RuleConnectionMethodOrBoundedSum();
} else throw new RuntimeException("Unknown (or unimplemented) 'AND' method: " + type);
} else if( leaveName.equalsIgnoreCase("OR") ) {
//---
// Which 'OR' method to use? (Note: We also set 'AND' method accordingly to fulfill DeMorgan's law
//---
if( rulesAdded ) throw new RuntimeException("OR method must be defined prior to RULE definition");
String type = child.getChild(0).getText(); // Bug corrected by Arkadiusz M. amaterek@users.sourceforge.net
if( type.equalsIgnoreCase("MAX") ) {
or = new RuleConnectionMethodOrMax();
and = new RuleConnectionMethodAndMin();
} else if( type.equalsIgnoreCase("ASUM") ) {
or = new RuleConnectionMethodOrProbOr();
and = new RuleConnectionMethodAndProduct();
} else if( type.equalsIgnoreCase("BSUM") ) {
or = new RuleConnectionMethodOrBoundedSum();
and = new RuleConnectionMethodAndBoundedDif();
} else throw new RuntimeException("Unknown (or unimplemented) 'OR' method: " + type);
} else if( leaveName.equalsIgnoreCase("ACT") ) fclTreeRuleBlockActivation(child);
else if( leaveName.equalsIgnoreCase("RULE") ) {
rulesAdded = true;