lua-patterns
lua-patterns copied to clipboard
Suggestion: render railroad diagrams?
This tool looks really cool! It reminds me of https://regexper.com/ (which is also open-source) - so I thought I'd suggest a railroad diagram, so it would make complex patterns easier to quickly understand :-)
Hi, how do you imagine this diagram for a pattern?
Let's consider the following pattern for example: [abc]%s*d?. It might look a bit like this:

(image taken from regexper.com by translating the above lua pattern into regular expression).
Oof, that definitely needs some js library, I have no clue how to implement this yet