I need someone in my life that understands powerset construction please
2
1
When I was trying to grok that stuff way back when, I wrote an NFA/DFA library in Lua, and then wrote utility functions onto it to add things like kleene star, etc. Before finally writing the NFA->DFA and then state reduction (Hopcroft) implementations. That route helped me.
1
1
I wouldn't say it was "easy", indeed I think it took me a week of coding at least, maybe two, but it really helped cement NFA, DFA, powerset, etc. as well as how regular expressions actually work. Good luck :-D

May 8, 2018 ยท 8:27 AM UTC

1
1
IIRC I learned it all from the Dragon book ( en.wikipedia.org/wiki/Compilโ€ฆ ) but this was seven or eight years ago, so there might be even better resources now.
1
1
And because you reminded me of it, I've just converted it from Bazaar to Git and pushed it to a github repo: github.com/kinnison/frango/bโ€ฆ Blech! It's very bad code because I'm lazy when coding for myself.
1