Can generate the MainT.xml, but cannot generate the SquareT.xml nor SquareGameT.xml

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Can generate the MainT.xml, but cannot generate the SquareT.xml nor SquareGameT.xml

Ichiro
Hi,

I could generate the MainT.xml in the right format. However, the SquareT.xml has been generated in the wrong format as attached. The SquareGameT.xml file itself was generated but there was nothing in the file when I opened it in the web browser.

SquareT.xml

Could you help me generate them in the right format? I attached the two test jack programs because I thought I might have edited them by accident.

Square.jack
SquareGame.jack

Best Regards,
Ichiro Kaneto
Reply | Threaded
Open this post in threaded view
|

Re: Can generate the MainT.xml, but cannot generate the SquareT.xml nor SquareGameT.xml

WBahn
Administrator
Your .xml file is all on a single line. You need to put in line breaks.

If you open in a web browser (such as Firefox) it complains about Line 1 Column 3729.

Go take a look at what is there and then look at the format you need to use for XML special character encoding very carefully.
Reply | Threaded
Open this post in threaded view
|

Re: Can generate the MainT.xml, but cannot generate the SquareT.xml nor SquareGameT.xml

Ichiro
This post was updated on .
>Your .xml file is all on a single line. You need to put in line breaks.
I added the new line by putting '\n' in the write function.

The error 'string index out of range' repeatedly occurred, so I inserted a new conditional branch (if len(xx)==0: continue). Then I got no more errors and the Tokenizer for the Square programs finally completed.

I appreciate your great help.

Best Regards,
Ichiro