Fix tests for anti-unification

Also: move grammar from core to test for future tests.