I'm not sure where exactly to start with this one. I know I can do bit-wise logical combinations of masks like so: (mask1 & mask2) | mask3 | (mask4 & (mask5 | mask6))
Now, if I had a user input a string like: '(criteria1 & criteria2) | criteria3 | (criteria4 & (criteria5 | criteria6))'
, but needed to interpret each criteria through a function to determine and return a mask, how can I retain the parentheses and logic and then combine the masks?