Add bracket-pair-parsing and refactor bidi-state-management

As announced, to fully implement the bidirectional algorithm, it
is still necessary to implement rule N0 which requires access to the
bracket properties of each character. Inspired by how we solved it
in gen/case.h we go with a bitwise-approach.

Regarding the state-management, it's a difficult balance between
type-safety, readability and correctness, but I went with the approach
that offered the least redundancy and relatively good readability.

Signed-off-by: Laslo Hunhold <dev@frign.de>
2 files changed