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
Are you interested in contributions? #37
Comments
Hi! I'm glad you found If it does have bugs, then let's fix them. I can think of one case where I see in one case you've suggested changing a test where parsing |
Alright then! In that case I'll keep new features in my own copy, but bring tests and bugs upstream. Glad to set expectations up front 😄 I'd encourage you to have a look at the a = conc(charclass('0'), pattern(charclass('1'), charclass('0')))
# str(a) == '00|1' # <- there's the bug - should be '0(0|1)'!
b = parse(str(a))
assert a.reduce() == b.reduce() # Fails Note that I would like to use the (And I should note: happy to look into these myself if you have some tips about where to start!) |
Right, I think the problem there is probably that |
|
Sounds like usage errors on my end then! Thanks again for |
I finally picked up
greenery
this afternoon, and have had a lot of fun with it. Before I spend much more time on it though I thought I'd check if you're interested in contributions:I wrote an alternative string-to-lego parser which leans heavily on the CPython
sre_parse
module - master...Zac-HD:pyregex. It supports every construct that can bere.compile
d, but has somewhat worse errors at the moment (eg no context given when bailing on a groupref). Also needs more testing for eg repeats 😄I also wrote some property-based tests with Hypothesis, master...Zac-HD:property-tests. This has already turned up a few bugs of the form
x != parse(str(x))
for some lego object x, but there's little point looking for more if you don't consider this a bug worth fixing. (I originally started this on the parser branch, but similar problems seem to exist on master too)Either way, thanks for a great little library and a fun evening poking at it!
The text was updated successfully, but these errors were encountered: