Skip to content

Comment on The Regular Expression Visualizer, Simulator and Cross-Compiler Toolparent

Comments

I'm having trouble with backtracking and groups. It's possible I'm doing something wrong, but

    [bc]*(cd)+
doesn't seem to match
    cbcdcd
Nor does the simpler
    a*(ab)
match
    aab
But
    a*ab
matches aab.

You found a bug. The bug was: When I was computing the animation frames for the visual, after a backtracking event, I forgot to restore the 'progress' values for the PROGRESS nodes to what they were before the stack push took place. I think I fixed this issue, and I just pushed an update which should appear any second when the cache invalidates.

Cool! Thanks for looking at it/fixing it.

P.S. The whole split() thing you do is an interesting hack to not have to preserve/rewind so much state. :D I've never quite seen fork() used so...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.