Disambiguate parentheses syntax for search kinds in and/or queries
Created by: rvantonder
With and/or parsing, we introduce grouped expressions to override precedence. For example:
foo and (bar or baz)
But regular expressions has its own use of parentheses for capturing groups:
foo(bar|baz)
And for structural search, it is convenient to search for code containing parentheses:
main(:[args])
We want to support the above parentheses meanings along with grouping and/or expressions. What this means is that we'll have to disambiguate parentheses from those used in and/or expressions according to some syntactic convention. Note that android.cs.com does something like this for regular expressions, though the convention is not clearly evident. My understanding of the convention there is that it looks at whether a parenthesized expression contains <space>Keyword<space>, and if not, treats it as a search pattern. This may be the most straightforward way for our purposes, but others are possible (e.g., by looking at whether parentheses are prefixed or suffixed by whitespace).