-
Notifications
You must be signed in to change notification settings - Fork 23
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
William's assignments #25
base: gh-pages
Are you sure you want to change the base?
Conversation
With help from @skreem
" \"s1\",\n", | ||
" [\"s6\", \"s7\"])\n", | ||
"\n", | ||
"# TODO: tests go here\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of my email addresses is [email protected]
, and it looks like your regex won't take [email protected]
. Also, your state machine is a little more complicated than it needs to be: why do s11
and s12
exist? It seems like the state where we're waiting for either an @
or a x
can just be s2
, and it can self-loop on seeing an x
. Similarly, s4
can self-loop on seeing more letters. I was able to do it with 7 states, of which 1 was accepting. Might be good to try for that!
I found it easiest to write the string recognizer as a regular expression, then manually build a state machine that realized it.
Started two months ago and never finished (whoops!), but I’ll commit this before I forget.
No description provided.