Started trying to write the expression with a recursive definition
More fixes.
More tweaks to get the parser actually working. All tests pass except for two negative cases.
More tweaks. Instead of returning ['!foo'] for !(foo), return ['!', ['foo']]
New recursive parser works. Thanks @phoebesimon.