Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Printing the Regexes #193

Open
Galfour opened this issue Jul 9, 2021 · 1 comment
Open

Suggestion: Printing the Regexes #193

Galfour opened this issue Jul 9, 2021 · 1 comment

Comments

@Galfour
Copy link

Galfour commented Jul 9, 2021

Hello,

Currently, there are parsers for multiple syntaxes of Regex. I was wondering how complicated it would be to add printers too.

This would be quite useful for https://ligolang.org/ : we are currently writing syntax highlighter generators, and we need to produce Regex strings in a variety of contexts.

If this is not too complicated and you are open to a PR for this, we might write one.

Cheers,

@rgrinberg
Copy link
Member

Feel free to add printers. Although note that the parsing of regular expressions does some simplifications (e.g. desugaring + into *), so whatever you print back isn't going to map 1-1 to the re you started with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants