Yes, this is a quiz question. It's from a self-paced course, but the answer just isn't correct to me no matter how I look at it. There isn't really an active community to consult.
Consider the string
abbbaacc Which of the following lexical specifications produces the tokenization ab/bb/a/acc ?
Answer A a(b + c*) b+ Answer B ab b+ ac* Answer C c* b+ ab ac*
The two ways that I have tried to resolve Answer C
removing tokens(which I assumed is the correct way.)
abbbaacc c* passes and returns token **cc** //abbbaa b+ passes and returns token **bbb** //aaa ab passes and returns no token //aaa ac* passes and returns no token //aaa ending tokens: [cc, bbb]
Keeping String Whole:
abbbaacc c* passes and returns **cc** b+ passes and returns **bbb** ab passes and returns **ab** ac* passes and returns **acc** ending tokens: [cc, bbb, ab, acc]
I've tried other random ways as well but nothing turns out. I really am frustrated with this problem and I've been working on it for quite some time. I've reviewed the coursework that I have and I'm just at a loss. I am convinced that I must be conflating the more common Regular Expressions with this but I don't see where I'm doing so in any way that would make this answer correct. If anyone could provide any assistance I would greatly appreciate it!