In this Q&A there is a reference to the manpages synopses being based "loosely" on the Extended Backus–Naur Form of metasyntax notation. It's interesting and serves as background. That being said, ...
This is just a bit of history rummaging... I'd like to know how different today's grep is to the original implementation, introduced by Ken Thompson in ed. which evolved to ex, which then became vi... ...