Qbasic style > BASIC transpiler - anyone interested?

Chat about anything CX16 related that doesn't fit elsewhere
User avatar
Cyber
Posts: 482
Joined: Mon Apr 27, 2020 7:36 am

Qbasic style > BASIC transpiler - anyone interested?

Post by Cyber »


@Nate.N I downloaded and tried transpiler. It works and I'm quite happy with it. I added some issues to github page.

Nate.N
Posts: 11
Joined: Sat Oct 03, 2020 10:15 pm

Qbasic style > BASIC transpiler - anyone interested?

Post by Nate.N »



8 minutes ago, Cyber said:




@Nate.N I downloaded and tried transpiler. It works and I'm quite happy with it. I added some issues to github page.



Thanks for that! I've left comments on each, and I'll take a look at the variable name issue.

Nate.N
Posts: 11
Joined: Sat Oct 03, 2020 10:15 pm

Qbasic style > BASIC transpiler - anyone interested?

Post by Nate.N »


I've actually developed a proper transpiler (tokenzing, parsing, etc.) which converts Qbasic to Javascript to run in the browser:





 

So I could modify it to convert to BASIC instead, but wanted to build a quick script in the meantime.

rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

Qbasic style > BASIC transpiler - anyone interested?

Post by rje »



2 hours ago, Nate.N said:




I've actually developed a proper transpiler (tokenzing, parsing, etc.) which converts Qbasic to Javascript to run in the browser



Ah, my transpiler is only a line scanner, kind of a macro expander only with a little bit of state added in.

Nate.N
Posts: 11
Joined: Sat Oct 03, 2020 10:15 pm

Qbasic style > BASIC transpiler - anyone interested?

Post by Nate.N »


@Lorin Millsap @Cyber  https://github.com/natenorrish/enhanced-basic-transpiler

This is a true BASIC parser.

I've updated it to create a PRG file now instead of outputting text BASIC.

I'm working on an experimental inline assembly feature, so you can code in BASIC but take advantage of machine language.

 

Ziglag
Posts: 2
Joined: Wed Nov 11, 2020 10:51 pm

Qbasic style > BASIC transpiler - anyone interested?

Post by Ziglag »


Accidentally made a dupe post.  Didn't see anything when I searched for Quick Basic.  Didn't think to do QBasic, oh well.

I am interesting in helping out on this project.  I started tinkered together a rudimentary transcoder.  What you have here is far better.  Here are some of my thoughts.  Let me know what you think.  I was thinking it would also be useful to add an  include or using statement to link to other basic files to allow for creation of code libraries.  Then tweak one of the basic lexers in SciTE to have an ide for development so I can port over some of my old Quick Basic stuff.  After that it would be nice to be able to look at porting the code base into the X16 so it can run as a native app without any external dependencies. 

Nate.N
Posts: 11
Joined: Sat Oct 03, 2020 10:15 pm

Qbasic style > BASIC transpiler - anyone interested?

Post by Nate.N »



6 hours ago, Ziglag said:




Accidentally made a dupe post.  Didn't see anything when I searched for Quick Basic.  Didn't think to do QBasic, oh well.



I am interesting in helping out on this project.  I started tinkered together a rudimentary transcoder.  What you have here is far better.  Here are some of my thoughts.  Let me know what you think.  I was thinking it would also be useful to add an  include or using statement to link to other basic files to allow for creation of code libraries.  Then tweak one of the basic lexers in SciTE to have an ide for development so I can port over some of my old Quick Basic stuff.  After that it would be nice to be able to look at porting the code base into the X16 so it can run as a native app without any external dependencies. 



I didn't see much interest in the project so I sort of shelved it, and as it relies on NodeJS to transpile, I guess it's not ideal for most people.

I've had a lot of experience building transpilers and I could definitely rebuild it to work natively, including the inline ASM, but I'm afraid I don't have a lot of time right now.

If I get some time soon, I can get back on it.

User avatar
Cyber
Posts: 482
Joined: Mon Apr 27, 2020 7:36 am

Qbasic style > BASIC transpiler - anyone interested?

Post by Cyber »



20 hours ago, Nate.N said:




I didn't see much interest in the project so I sort of shelved it, and as it relies on NodeJS to transpile, I guess it's not ideal for most people.



As an external tool it's not a big deal. I added NodeJS files once and it just works. And it does its job well, so currently no problem of stalled development.

I have many PC tools programs with last release date decades ago, but they just do their job and they do it fine.

Nate.N
Posts: 11
Joined: Sat Oct 03, 2020 10:15 pm

Qbasic style > BASIC transpiler - anyone interested?

Post by Nate.N »



On 11/13/2020 at 3:57 PM, Cyber said:




As an external tool it's not a big deal. I added NodeJS files once and it just works. And it does its job well, so currently no problem of stalled development.



I have many PC tools programs with last release date decades ago, but they just do their job and they do it fine.



Great to hear that! I will continue to develop it then if it's of some use to others.

User avatar
Cyber
Posts: 482
Joined: Mon Apr 27, 2020 7:36 am

Qbasic style > BASIC transpiler - anyone interested?

Post by Cyber »


Yes, it is. )

But don't overpush yourself. The tool is useful today, but I'm not sure if it will be when X16 is released with similar tool on-board.

Post Reply