Add small validator utility for PEG grammars (GH-23519)

3 files changed