We Talk Coding

how do I make my own programming language using Basic?

I want to write my own programming language. I figured it would be easiest if I wrote it from using another programming language. I have heard you can do it with BASIC, how can I? I know a lot about basic. I do know more programming languages than just basic.

Public Comments

  1. I suppose it's possible, but you'll work damned hard to do it. And I think you'd do better to work in some form of assembler, on whatever platform you want to use. You'd probably do better to learn a more powerful language. You'll be able to do more faster with less headache, unless you're really set on writing your own syntax, language, compiler, etc, etc. If you are, I'd suggest you find a college or university with a comprehensive program in computer science.
  2. First you would have to decide on the syntax of your programming language - what commands will be allowed, how to use them, etc. Can programs be specified using multiple files of source code which include/import/require each other? Now you write a program in BASIC or whatever language you choose, that will open a file containing code written in your new language, and either compile it (harder) or interpret it (easier). So let's say your new programming language wants to set a variable called x to five, double it, and print it. Maybe your program in your new language might look like: x <- 5 x.double() print(x) So your BASIC program would read the first line, see the "<-" and that the thing on the left of it is "x", so allocate a variable, associate it with the string "x", then look at what's on the right of "<-" and assign that value to the variable associated with "x". Similar for subsequent steps.
  3. Well that would be difficult i think you should learn other programming languages and get a degree in computer science.
  4. It's possible in any language, even brainf**k :), but I wouldn't use BASIC. Visual Basic, maybe, definitely not BASIC. Also, unless it is a very basic language you are trying to create, it will be very hard. Get a degree in computer science, join Microsoft and help them develop Visual Studio. I wouldn't create languages alone. Also, it depends if you just want to make a compiler (which is still vaery hard) or if you want to create an IDE (which level of difficulty depends on the features) Google compiler for info. Also, this website: http://compilers.iecc.com/crenshaw/ goes about creating a simple compiler for a simple language. Start there.
Powered by Yahoo! Answers