[comp.sys.ibm.pc.programmer] BASIC to C translator program

glenn@welch.jhu.edu (Glenn M. Mason) (06/12/90)

Does anyone out there know of a public-domain/commercial BASIC to C
translator program? I have a BASIC program that does something useful
but is terribly unreadable with all the GOSUBS and other BASIC constructs
of which I am not familiar. Any info, leads, etc. will be greatly
appreciated.


Thanks,
Glenn Mason

Internet: glenn@welch.jhu.edu

jkl@Neon.Stanford.EDU (John Kallen) (06/12/90)

In article <1990Jun11.190944.23272@welch.jhu.edu> glenn@welch.jhu.edu (Glenn M. Mason) writes:
>
>Does anyone out there know of a public-domain/commercial BASIC to C
>translator program?

I recall a translator called "Minnow Bear" that translated Digital
Research BASIC to C. As I recall, it did is job fairly well. The code
it produced was a Bear to read, though :-)

>Internet: glenn@welch.jhu.edu
_______________________________________________________________________________
 | |   |   |    |\ | |   /|\ | John Kallen        Computer: kom-pyu'-ter (n) a 
 | |\ \|/ \|  * |/ | |/|  |  | PoBox 11215         device for generating errors
 | |\ /|\  |\ * |\ |   |  |  | Stanford CA 94309   speedily and unpredictably.
_|_|___|___|____|_\|___|__|__|_jkl@neon.stanford.edu___________________________

rloon@praxis.cs.ruu.nl (Ronald van Loon) (06/12/90)

In <1990Jun11.200020.5176@Neon.Stanford.EDU> jkl@Neon.Stanford.EDU (John Kallen) writes:

||In article <1990Jun11.190944.23272@welch.jhu.edu> glenn@welch.jhu.edu (Glenn M. Mason) writes:
||>
||>Does anyone out there know of a public-domain/commercial BASIC to C
||>translator program?

||I recall a translator called "Minnow Bear" that translated Digital
||Research BASIC to C. As I recall, it did is job fairly well. The code
||it produced was a Bear to read, though :-)

There is a program called Basic To C, which translates BASIC programs to C code ; it even tries
to eliminate GOTOs. Anyway, there's a PROFESSIONAL and a NORMAL version ; NORMAL will compile
up to 1000 lines. The same company released a PASCAL to C translator as well.

The code is not always easy to read, and integers without a '%' in the source, will be translated
to floats.

So it'll translate
10 x = 10
20 end

to :

float x_float ;

{ ....

  x = 10.0 ;

}

I can't think of the name of the company right now ; don't mail me, I won't read it till september.

Hope this helps though.
-- 
Ronald van Loon (rloon@praxis.cs.ruu.nl)

"If you want to make it big in life, remember, take care,
 You must know whom to kiss, and also where..." 
   - A Little Nightmare Music, by PDQ Bach