Add parentheses support

Current implementation is a horrific O(n^p) algorithm, but it works.