public Object visitBinarySentence(BinarySentence bs, Object arg) {
bool? firstValue = (bool?) bs.getFirst().accept(this, null);
bool? secondValue = (bool?) bs.getSecond().accept(this, null);
if (!firstValue.HasValue || !secondValue.HasValue) {
// strictly not true for or/and
// -FIX later
return null;
} else {
String op = bs.getOperator();
if (op.Equals("AND")) {
return firstValue.Value && secondValue.Value;
} else if (op.Equals("OR")) {
return firstValue.Value || secondValue.Value;
} else if (op.Equals("=>")) {
return !(firstValue.Value && !secondValue.Value);
}
else if (op.Equals("<=>"))
{
return firstValue.Equals(secondValue);
}
return null;
}
}