Advertisement

Simple BASIC compiler.

Started by November 17, 2004 02:59 AM
17 comments, last by Nice Coder 19 years, 10 months ago
<shameless_plug> my incomplete BASIC compiler </shameless_plug>
"I am a donut! Ask not how many tris/batch, but rather how many batches/frame!" -- Matthias Wloka & Richard Huddy, (GDC, DirectX 9 Performance)

http://www.silvermace.com/ -- My personal website
Quote: Original post by Anonymous Poster
There is some good compiler tutorials and an example BASIC compiler with full comments written in C++ at http://www.briancbecker.com

I used it to write my own BASIC compiler at http://blackfrog.pagemac.com

- Sean


I'm getting an internal server error when I try to goto the first link(I looked at the version archived at archive.org, but it seems to be missing some pages), any idea of when it's going to be up again?
Advertisement
I expect that you want to write your VM, but if you would like your compiled code to run much faster, you might consider SoftWire. With it, you can have your program 'compile' code into machine code using assembly, and then ask for a function for the code you just created. It is, as far as I know, the best back-end for a compiler that you want to run in real-time.

If you would rather code it to learn about the VM then, this probably is no help. However, if you are interested in making your compiler fast and all of the algorithms that entails, you might check it out.

Dwiel
Quote: Original post by Roboguy
Quote: Original post by Anonymous Poster
There is some good compiler tutorials and an example BASIC compiler with full comments written in C++ at http://www.briancbecker.com

I used it to write my own BASIC compiler at http://blackfrog.pagemac.com

- Sean


I'm getting an internal server error when I try to goto the first link(I looked at the version archived at archive.org, but it seems to be missing some pages), any idea of when it's going to be up again?


I just noticed the internal server error. I sent them a message. You can get a copy of the source code at I believe the tutorial as well at the Qdepartment: http://groups.yahoo.com/group/QDepartment/

You may have to join to see the file sections. It's under the file section called Simply KoolB. Download simplykoolbbeta2.zip. I have the file on my hard drive and can email it to you if you have trouble.

- Sean
The vm's more then fast enough for me (it's probably going to be ideling for 99.99% of the time, anyway. (most programs are going to be waiting for io, most of the time)).

I'm currently writing the vm. (+ asembler)

I'm also looking at tribute basic, at the moment (thanks silvermace)

AP Tigerbasic, unfortunatly, one of the things i wanted to look at, you havent finished (if parsing).

Thanks for all the good replies (+ all those in the future)
From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
btw, the source code for tribute is GPL so email me if you want it.. i just havnt had time to prepare it with the headers and stuff.
"I am a donut! Ask not how many tris/batch, but rather how many batches/frame!" -- Matthias Wloka & Richard Huddy, (GDC, DirectX 9 Performance)

http://www.silvermace.com/ -- My personal website
Advertisement
The website http://www.briancbecker.com is back up.

- Sean
Just make sure you don't implement an IsNot operator. Microsoft holds a patent on that.
! remind me to patent the equals operator. and the load and store commnads, and add, subtract, and don't forget to patent computation using transisters before someone else gets it (and gets loads of money!).

Ap -> Will look at site (and basic compiler, and everything else i can get my hands on...)

Silvermace -> Source would be nice, but i'm not sure if it'd be usefull (because i'm using VB with its nice string handling apilities)

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.

This topic is closed to new replies.

Advertisement