BASIC interpreter/compiler written in C++
Results 1 to 4 of 4

Thread: BASIC interpreter/compiler written in C++

  1. #1
    Senior Member
    Join Date
    Jan 2004
    Location
    Hawaii
    Posts
    351

    Exclamation BASIC interpreter/compiler written in C++

    I'm looking for a BASIC compiler or interpreter written in C++ (or similar language) that is opensource....and obtainable free. I am interested in writing one of my own....but have little clue how to go about it in C++. I've written a simple scripting language that is similar to BASIC, but it only has about 6 commands and I have no clue how to implement most commands, mathematics with variables, and many other aspects.

    I'd prefer one based on the BASIC language because I know the language, and it is rather simple....but one for another very simple language would be nice. This is basically a way for me to learn how to pass commands to a program that are written. As of now I'm designing, though not yet developing, a win32 GUI for QBASIC 7.1.


    A_T
    Geek isn't just a four-letter word; it's a six-figure income.

  2. #2
    Senior Member
    Join Date
    Jul 2003
    Posts
    634
    I cant give a link, but forth compilers are supposed to be simple to create

    I think if you search hard enough youll find could for a fourth compiler for the PDP-10

    i2c

    edit - http://www.forth.org/compilers.html

    have a look at the Kforth compiler for linux, its something like 18k and the code is really simple to follow..


  3. #3
    Senior Member
    Join Date
    Jan 2004
    Location
    Hawaii
    Posts
    351
    Okay, I've found one called KoolB. I suppose it's rather simple to follow...assuming I knew more assembly, because I'm not sure how to convert BASIC to assembly quite yet. But I am still working on the GUI for QBASIC 7.1. I was wondering if anyone knew how it just 'interprets' a .BAS file without first compiling them. Back before QB7.1, you couldn't even compile them...how does that work, because as of now I can only pass arguments to BC.EXE (to compile with MS BASIC Compiler).

    A_T
    Geek isn't just a four-letter word; it's a six-figure income.

  4. #4
    AO Curmudgeon rcgreen's Avatar
    Join Date
    Nov 2001
    Posts
    2,716
    I came in to the world with nothing. I still have most of it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •