Jump to content
pahandav

BASIC Wrangler - a line cruncher/renumberer

Recommended Posts

I'm announcing the initial release of BASIC Wrangler, which, as the topic says, is a line cruncher/renumberer for BASIC programs. It takes programs that have been written with labels, and it numbers and crunches the lines together. It's written in Python, so you should be able to run it on any modern computer, and it already supports a bunch of different BASIC dialects (from the Altair 8800 to the Atari 8-bit to the TRS-80 to the ZX Spectrum). It's currently in a super-alpha state, but it can successfully process one program that I wrote, so that's a start. You should probably wait until I've added some more features and made it more stable before trying it out, but if you do want to give it a whirl you can clone it from here. Also, I've been streaming the development on my Twitch channel so feel free to stop by and say hi if you want.

Share this post


Link to post
Share on other sites

Version 0.02.0 has been released. It now has a GUI to make it easier to use, it can output directly to the clipboard when you want to paste code into an emulator, and it now defaults to file mode, which is meant for tokenizing or loading through a disk image. It still has some bugs I don't plan on fixing quite yet (so don't submit bug reports yet), but it's good enough to play around with at this point. You should note that any listings you convert to be used with it will have to be reconverted eventually.

Share this post


Link to post
Share on other sites

Version 0.03.0 has been released. It now uses QBasic-style labels, and I currently have no plans to change that. All in all, everything should work better, and so it's actually worth trying out, even though I consider it to still be an alpha release. Note that you now need to type "renum" before the basic type regardless of what the readme says (see? still alpha quality). I put some work into the DATA statement reformatter, and so that should hopefully work properly with anything you toss at it, but there may still be some bugs. The pip requirements have changed, so be sure to check the README.md for those. Any feedback would be welcome at this point. My next goal is to add a denumbering routine to finally make it independent of non-Python dependencies. Hopefully, this will be into beta testing by the end of the year.

Share this post


Link to post
Share on other sites

Version 0.04.0 has been released. It can now natively convert from numbered BASIC listings to labeled listings, with no non-Python dependencies. I also massively improved the documentation, and so it should be easier to figure out how to use it now. It should be noted that the conversion routine tokenizes the listings, and so it might mess the listings up a little if it encounters a keyword that it doesn't yet know about. I am going to add a few more dialects to the keyword lists before the next release. Next time I'm going to make an .exe release for Windows for those of you who don't want to install Python on your system. If you do have Python and want to give it a whirl it's available here.

Share this post


Link to post
Share on other sites

Version 0.05.0 has been released. I've decided to upgrade this from alpha to beta because it actually works pretty well now. This release revamps the conversion interface to be more like the renumber interface, adds support for converting Apple /// Business BASIC, Tandy CoCo BASIC, Sinclair ZX81 BASIC, and ZX Spectrum BASIC to labeled format, and should hopefully be able to deal with the weird uppercase/lowercase stuff when converting from Commodore BASIC numbered files. I've also made up a 64-bit Windows installer, so you can use it even if you don't have a Python install on your system. For the next release, I'm planning on using the tokenizer to process lines in the renumbering routine, which should let me add a really cool feature or two. Grab it here if you want to help test it.

Share this post


Link to post
Share on other sites

Version 0.5.1 has been released. This version was focused on making it available through pip from PyPI. If you have Python installed on your system, you can install it by typing pip install basic-wrangler. None of the external functionality should have changed. I've also changed the Windows installer to use a 32-bit version of Python, as 64-bit was kinda overkill.

Share this post


Link to post
Share on other sites

I've just released version 0.6.0. I added tokenizer rules for Amstrad CPC, BBC Micro, Coleco ADAM, MSX, and Oric BASIC, and updated the renumbering routine with a tokenizer. The big news is that labels no longer have to start with an underscore! I also improved the Sinclair BASIC laziness features with automatic LET and GOTO after THEN insertion, so you don't need to worry about your programs failing because you forgot to add them. Conversely, it no longer outputs LET or GOTO after THEN for other BASIC dialects in order to save space. For the next version, I'm planning on adding support for long variable names, with automatic renaming down to a name that the BASIC dialect can use. Grab the Windows version here or you can update it through pip.

Share this post


Link to post
Share on other sites

Yet another version is out. I've added tokenizer rules for the Amiga ACE Compiler, Apple IIGS GSoft BASIC, and RISC OS BASIC. Now, when you convert a file, it will output a .lbl file which you can modify to rename any labels it finds. So, no more find and replace to fix the labels it outputs. This also works on already converted files with the -l option. This change should help when I finally change it to support long variable names. Be sure to check the documentation, as it's been updated.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...