Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

a6p3 white space

23 views
Skip to first unread message

Christopher Austin

unread,
Feb 13, 2012, 1:30:16 PM2/13/12
to
How do we represent the whitespace characters for the alphabet in the
dfa?
Specifically how can the newline character be represented?

Jeremy Roman

unread,
Feb 13, 2012, 1:51:04 PM2/13/12
to
You are only asked to recognize a single token (e.g. "wain", "54", "*"),
NOT a full WLPP program. No valid tokens contain whitespace, so you do not
need to worry about it.

Lucas Connors

unread,
Feb 15, 2012, 12:44:11 PM2/15/12
to
Interestingly though, I receive the following long result for failing
the public test:

The following word is NOT matched by your DFA, but it SHOULD be: ! =

It looks like it's referring to a token:
"! =", which as far as I understand is not included in the WLPP language
specification. Any ideas on what I should do?

Rob Schluntz (CS 241 Tutor)

unread,
Feb 15, 2012, 1:54:22 PM2/15/12
to
When cs241.DFA says this it means "the symbol ! followed by the symbol ="

It delimits symbols using whitespace because any sequence of
non-whitespace characters can be considered a symbol in the alphabet:
http://www.student.cs.uwaterloo.ca/~cs241/dfa/DFAfileformat.html

For example, recall in A5 there was a problem where the alphabet was {
cat, dog, iguana, mouse }

In short, your DFA doesn't accept "!=", but it should.
0 new messages