Discussion:
A2P2: correct output of "<do>?
(too old to reply)
Alicia Liu
2004-06-20 17:28:23 UTC
Permalink
Hi,

Given an input of:
<do

Is the correct output
<RELOP <><DO>
even though we know that keyword do can't follow a comparison operator?

Thanks,
Alicia
Andrew Craik
2004-06-20 17:53:52 UTC
Permalink
Hey,

In this assignment all we are worried about is generating tokens from the
input string. Making sense happens later (the symantec analysis mentioned
in class). So for now all you need to do is generate the tokens, the order
of tokens is of no concern (well provided tokens appear in the order they
appear in the string but I hope you get the idea....)

Hope that helps,
Andrew
Post by Alicia Liu
Hi,
<do
Is the correct output
<RELOP <><DO>
even though we know that keyword do can't follow a comparison operator?
Thanks,
Alicia
Troy Mark Gonsalves
2004-06-21 00:33:58 UTC
Permalink
Yes. We're just tokenizing, we'll check for syntax errors later (next
assignment).
Post by Alicia Liu
Hi,
<do
Is the correct output
<RELOP <><DO>
even though we know that keyword do can't follow a comparison operator?
Thanks,
Alicia
Hien Goi
2004-06-24 01:23:47 UTC
Permalink
Just wanted to clarify if we need to tokenize any of the following for a3p3:

1. while#
2. while<
3. <<
4. while[illegal character] <- (tokenize while and give error message or
simply give error message?)
and other similar cases to 4 eg. ***@.

Thanks,

Hien.
Post by Troy Mark Gonsalves
Yes. We're just tokenizing, we'll check for syntax errors later (next
assignment).
Post by Alicia Liu
Hi,
<do
Is the correct output
<RELOP <><DO>
even though we know that keyword do can't follow a comparison operator?
Thanks,
Alicia
Loading...