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

./fatool not printing regex #3

Open
AvalZ opened this issue Aug 14, 2020 · 2 comments
Open

./fatool not printing regex #3

AvalZ opened this issue Aug 14, 2020 · 2 comments

Comments

@AvalZ
Copy link

AvalZ commented Aug 14, 2020

Hi!
I am trying to print the minimized PCRE from multiple starting PCREs using fatool.

For example, I tried ^abc$ and ^abd$, expecting something like ^ab(c|d)$.
I expected --out 're:-' to work, but it gives a --out not supported for format - error.

I tried another render format, text, by running

./fatool --in 're:^abc$' --in 're:^abd$' --min --dfa --out text:-

and it works as expected, by yelding the following output:

NFA: states=9 trans=8
DFA: states=5 trans=4
MDFA: states=4 trans=3
re:^(abc)|(abd)$: overlap_n=0 accepting=1 no overlap
1:
  c -> 3
  d -> 3
2:
  b -> 1
3:t
4:s
  a -> 2

The same works for the dot format, and it gives the expected result.

Is there any way to also print the resulting regex?

Thanks!

@wader
Copy link
Owner

wader commented Aug 14, 2020 via email

@AvalZ
Copy link
Author

AvalZ commented Aug 18, 2020

Thanks! I'll look into that, if I'm able to add something useful I will definitely make a PR.

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