We're working on a formal grammar and a test suite that can be used to specify expected behavior. See the linked mailing list thread [0] for pointers to some of the interested parties.
0. https://orgmode.org/list/CA+G3_POBAB1QX1Zv8q9sjFh4KHUHVmaNXp...