With EBNF "good enough", I now think railroad diagrams for regular expressions may be fairly easy.
- Probably should be able to do one for regular expressions by themselves
- Should be able to embed regexes in ebnf specials
- Should look similar to EBNF, but does not have to match 1 for 1, they are related but not the same
I suggest the following extension to standard ebnf syntax, but will leave it to the developer, this leaves other sub diagram options open, but I am not sure if that would ever be a thing
letter = ? regex: a-z ?;
number = ? regex: 0-9 ?;