The combinator pattern is extremely cool case study #5371:
Here's an entirely automatically generated railroad syntax diagram for the JSON parser example that comes with my parser combinator library Chumsky (https://github.com/zesterer/chumsky/).
This works for arbitrary parsers, with no additional work needed on the part of parser authors.
If you've written a parser with Chumsky, you'll be able to call just a single function to get a similar diagram for your grammar. #rustlang #plt #compilerdev
