[net.wanted.sources] BASIC compiler needed

silvert@dalcs.UUCP (Bill Silvert) (06/16/85)

I need a BASIC compiler, translator, or interpreter, so that BASIC programs can
be run on my machine.  It doesn't have to be very complete, since I am willing
to make changes by hand to fix up the code, but I would like to avoid recoding
from scratch every time I have a short BASIC program to run.

Translation into either C or f77 would be fine.

If anyone out there is working on such a project, I would be willing to
cooperate.
-- 
Bill Silvert
Marine Ecology Lab.
Dartmouth, NS
dalcs!silvert
dalcs!biomel!bill

david@ukma.UUCP (David Herron, NPR Lover) (06/22/85)

In article <1524@dalcs.UUCP> silvert@dalcs.UUCP (Bill Silvert) writes:
>I need a BASIC compiler, translator, or interpreter, so that BASIC programs can
>be run on my machine.  It doesn't have to be very complete, since I am willing
>to make changes by hand to fix up the code, but I would like to avoid recoding
>from scratch every time I have a short BASIC program to run.

I have a BASIC interpretor I wrote a couple of years ago.  Unfortunately
it never got finished.  

er...rather....it worked once and I was improving it, then got my current
job and was side tracked and never finished improving it.

I had a YACC grammar that parsed the BASIC expressions into postfix
expressions.  The postfix expressions were written as a stack based
0 (actually, sometimes 1) address machine.  The interpretor was written
in C on a PDP-11 running V7.

This method was chosen because it was a LOT easier to interpret a postfix
expression that an infix expression.

The improvements I was doing was going to fix the grammar so it could
EITHER drive the postfix interpretor directly or indirectly (by storing
the interpretor code in ascii in a source file).

The running version ran well, was easy to expand, etc.  On the PDP-11
(an LSI-11/23 (not +)) it ran the "for i=1 to 10000 ... next i" benchmark
at the same speed as the TRS-80 Color Computer the on the next table.
(This was with integer on the PDP-11, and the interpreted floating pt
on the Color Computer, running w/o the speedup poke).

Anybody interested in seeing this BASIC interpretor?  I can post
it to the net if you like.  Or privately too.  whaddaya say?

BTW.  As an experiment a few months ago, I ran lint on this code.
It didn't even whimper.  (I'm sure there was a FEW complaints, but not
many).  And it was written on a machine that wouldn't even SUPPORT
lint (under V7 you HAD to have i/d to run lint, 11/23 don't have that).


-- 
--- David Herron
--- ARPA-> ukma!david@ANL-MCS.ARPA or ukma!david<@ANL-MCS> 
---	   or david%ukma.uucp@anl-mcs.arpa
---        Or even anlams!ukma!david@ucbvax.arpa
--- UUCP-> {ucbvax,unmvax,boulder,oddjob}!anlams!ukma!david
---        {ihnp4,decvax,ucbvax}!cbosgd!ukma!david

	"It's *Super*User* to the rescue!"