To add some color: Without much difficulty I was able to build a small POP3 server by describing the protocol as a Ragel grammar with the verbs implemented as semantic actions (a small amount of Go). It reads very nicely compared to a hand-built version of the same thing. The only real downside I found was that it was hard to tell what's wrong when your grammar isn't behaving as expected but no worse than other parser generators I've used.
There are a lot of advantages to a declarative approach, and a lot of risks and problems with hand written parsers and state machines.
A good example is the http code Zed wrote with ragel. From what I remember it was contracted by verisign because they wanted an implementation that actually followed the spec in detail, unlike all other code available at the time. That ragel code has been reused by a lot of embedded http servers in many languages now.
The thing I keep finding problematic about declarative approaches is that nobody knows them. That means if you're not a lone wolf on a project, the people editing your declarative state machine are going to be unfamiliar with it. Aside from the complaints that gives (and the "look I rewrote it" issues), that means they make mistakes and don't understand what happens.
So they don't last. They're not all that maintainable in real teams. My experiences are mostly with ANTLR code (which has a debugger and lots of tooling and isn't that hard at all).
Same reason you would want to use yacc to write a parser. A grammar annotated with code is a nice way to express a parser. If the language happens to be regular, you can use ragel to generate a directly executable deterministic state machine. The code is simple and fast.