Complex parsers might want to parse brackets "()" outside of operatorPrecedence. For these parsers it would be useful if operatorPrecedence would not parse brackets.
Possible use cases might be:
- Need to record the fact that brackets were parsed; or need to call a parse action when brackets are parsed.
- Parser that wants the correct parsing of the exponentiation operator. A hand written parser for exponentiation and unarry minus is needed in this case. Additionally a separate parser for brackets is needed.
Therefore I propose an additional keyword argument for operatorPrecedence "handleBrackets=True". It should remove the bracket parsing abilities from operatorPrecedence when it is set to false.
A patch for this feature is attached.