RegEx railroad diagrams?

0 votes
asked Dec 5, 2022 in Wanted features by Todd Musheno (2,680 points)

With EBNF "good enough", I now think railroad diagrams for regular expressions may be fairly easy.

  1. Probably should be able to do one for regular expressions by themselves
  2. Should be able to embed regexes in ebnf specials
  3. 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 ?;

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.