Multiple sets of "and" and "or" combinations in criteria don't work

Multiple sets of "and" and "or" combinations in criteria don't work

I tried to create a criteria for limiting records shown in a view, with a mix of && and ||, with parentheses used to keep the boolean logic correct.  The type of criteria:  (A && B) || (B && C) || D.  However, the system adds other parentheses automatically when the script is saved.  These added parentheses mess up the logic totally.  I found a work around, by creating variables combining A-B and B-C; however, this seems unnecessarily circuitous.