} 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 'AND' method to use? (Note: We alse set 'OR' method accordingly to fullfill DeMorgan's law
//---
if( rulesAdded ) throw new RuntimeException("AND / OR methods must be defined prior to RULE definition");
String type = tree.getFirstChild().getText();
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;