Help with Task 281 -- Basic Tokenizer Input

Back to General discussions forum

itsnotzode     2023-03-20 00:06:46
User avatar

Hello. I'm trying to solve task 281. However, whenever I reload the page and I get a new input text there is always this line in particular:

A$ = "Magic Word Xyzzy

Since this line does not have the closing quotation marks, my program hangs when reaching it. I wanted to ask if this is intentional or not, since the problem description reads:

"quotes" (q) - string literal, starting **and** ending with double quotes, (...) 

Which implies that quotes tokens always begin and end with "

I believe if I just added this double quote to the line before feeding it to my program would make it work, but I just wanted to make sure this is a problem with my code and not the generated input itself before doing anything.

Thanks!

zelevin     2023-03-20 01:21:32

As the problem says:

If you detect some state of error while trying to parce the next token, add letter e to the answer and don't parse this line further.

itsnotzode     2023-03-20 02:01:01
User avatar

Thank you, I apologize for not seeing that sooner.

Please login and solve 5 problems to be able to post at forum