Ok, has this been done to date? Specifically, I really need to know what happens in the following cases:

(building or unit) requires factions { blah, blah,} AND a AND b AND NOT c OR d AND e AND NOT f OR g

How, exactly, do the OR operators affect this? Has anyone done any comprehensive testing? Or would be willing to?