Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

String generation does not work as expected with negative character classes #39

Open
blmage opened this issue Dec 9, 2019 · 1 comment

Comments

@blmage
Copy link

blmage commented Dec 9, 2019

The generation rule for negative character classes does not work as expected: instead of generating a character which does not belong to the character class, it generates a printable ASCII character that is not part of the random characters generated for the class children.

Not quite sure how to fix this though, would you have any pointer as to where to start? Thanks!

@blmage
Copy link
Author

blmage commented Dec 14, 2019

After having given it more thought, each element of the AST should probably return a range (or set of ranges) of the characters that it can match, knowing that in the case of alternations and classes, this would require applying some operation to their children's ranges (union or complement).
I'll take a stab at it if I can find some time!

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

No branches or pull requests

1 participant