google/wwwbasic

Support nibbles.bas

ubershmekel opened this issue · 4 comments

Awesome project, thank you!

I tried running https://github.com/tangentstorm/tangentlabs/blob/master/qbasic/NIBBLES.BAS and hit a few roadblocks. I don't have time now but might get back to it later. Issues I immediately see:

  • \r\n breaks a lot (newlines aren't ignored, tokens catch a trailing space)
  • LOOP WHILE StillWantsToPlay seems to be unsupported and throws Expected "(" found "<EOL>" at line 94

Would a PR for supporting nibbles be welcome?

Looks like you're trying to run a QBASIC program on WWWBASIC. WWWBASIC is actually based on IBM PC-BASIC (probably) so you might wanna see about porting Nibbles to that if anything. See issue #6.

So I've been inching towards trying to get GORILLA.BAS working on a branch, which along with NIBBLES.BAS, was one of the qbasic samples.

A bunch of the parsing is in towards SUBs, FUNCTIONs, TYPEs, but more is needed for them to run correctly.

Up just pushed up my WIP branch towards functions here:
https://github.com/google/wwwbasic/tree/functions

But I like the idea of starting with NIBBLES, as I think it's smaller / might need less to work.

Getting closer on this, some things running, but a few gaps remain:
https://google.github.io/wwwbasic/wip/nibbles.html

Blocked by #46