The "circular references", or, as they're more commonly known, "recursive definitions", are precisely what differentiates a grammar from a flat, regular pattern, and
the thing Perl's regex-engine can't properly handle, making a parser like
Parse::RecDescent useful.