I'm wondering if it's possibly to mechanically check that what's in the grammar is how DMD behaves.

Take the grammar and (randomly) generate strings with it and check if DMD does complain. You'd need a parse only don't check semantics flag, though.

This will not check if the strings are parsed correctly by DMD nor if invalid strings are rejected. But it would be a start.

Reply via email to