[Coco] Cross-platform editor for CoCo BASIC?
Alex Evans
varmfskii at gmail.com
Wed Feb 1 00:27:57 EST 2023
The python scripts I posted do use numeric labels, but labels are the only
line numbers required. It will also condense lines of code into as few as
possible. It will not try to organize the first use of variables
(declaration as such) for optimal use. It also does not allow for using
anything other than integers as labels and labels do need to be in
ascending order.
I recall the preprocessor that added more structured elements, but I took
fail to recall who wrote it or alwhat they called it.
On Tue, Jan 31, 2023, 23:21 Allen Huffman via Coco <coco at maltedmedia.com>
wrote:
> > On Jan 31, 2023, at 10:06 PM, Mark via Coco <coco at maltedmedia.com>
> wrote:
> >
> > I wonder how difficult it would be to write a text parser (command-line
> tool) that took in what is essentially CoCo BASIC but using labels rather
> than line numbers and allowing free-format text and eg. block if/then/else
> and output CoCo3 BASIC? Editing/pre-processing this on a modern PC would
> take a lot of pain out of developing in CoCo BASIC...
>
>
> That is out there — I just don’t remember who wrote it. The code is nicely
> formatted, tabbed, and even had some keywords for WHILE and such, that
> would translate in to BASIC.
>
> Looking at Alex’s python scripts, I notice one that compacts the code. We
> are close to having all the pieces to a BASIC optimizer that keeps thing in
> BASIC but does things like pre-declare variables in the order that speeds
> up the ones used the most, and moved GOTO/GOSUB routines around to be
> faster based on how they are used.
>
> Figuring that out is difficult but it could certainly be helped by a
> keyword in the code that would tell the code “this should be fast” versus
> “don’t care”.
>
> --
> Allen Huffman - PO Box 7634 - Urbandale IA 50323 - 515-999-0227 (vmail/TXT
> only)
> http://www.subethasoftware.com - https://www.facebook.com/subethasoftware
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
More information about the Coco
mailing list