Wide refactoring

Added preParse hook for compare operations. Filter or comparison
elements involving not-permitted groups now result in errors.
“Complement” search for a permitted groups is now permitted.