Skip to content
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

Open
wants to merge 15 commits into
base: gh-pages
Choose a base branch
from
Open

William's assignments #25

wants to merge 15 commits into from

Conversation

chern
Copy link
Contributor

@chern chern commented Jul 14, 2016

No description provided.

" \"s1\",\n",
" [\"s6\", \"s7\"])\n",
"\n",
"# TODO: tests go here\n",
Copy link
Owner

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 jcosborn@soe.ucsc.edu, and it looks like your regex won't take x@x.x.x. 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.

@chern chern changed the title State machines, Assignment 1 + part of Assignment 2 Assignments from William Jul 21, 2016
@chern chern changed the title Assignments from William William's assignments Jul 21, 2016
Started two months ago and never finished (whoops!), but I’ll commit
this before I forget.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants