How to make a programming language?

Sep 28, 2012 at 11:04pm
Ok, first please no one tell me how hard it is and stuff I know that. Any pointers? I want to make my own scripting language useing c++. And just basic stuff right now? I want to make it a command line programming language useing it.
Sep 29, 2012 at 4:43am
yea right lot more complicated than that i believe
Sep 29, 2012 at 5:35am
google search bajarne stroustroup calculator. its basically a command line calculator that is like a language and can be used as a model for an interpreter.
Sep 30, 2012 at 8:04pm
Ok, anyone else? Aramil I found stuff on it but I wasnt sure what to do.. could you explain more?
Sep 30, 2012 at 8:12pm
In my opinion all you need to know is how a compiler works, parses the source code, does lexical and semantical analysis, how assembler code is generated and so on.

You can find all these informations easily using google / wikipedia / ...
Sep 30, 2012 at 8:26pm
You need to write a program called a compiler, which reads tokens and as AlealactaEst says, 'does lexical and semantical analysis' then parses the data gathered from the program into an abstract syntax tree then converts that into native machine code. When designing a programming language, you need to consider a lot of different designes that suit what you want the best (http://en.wikipedia.org/wiki/Programming_paradigm). If your writing a scripting language, then that generally means that you are designing a very-high level language which is converted into another language (C++ in your case) or simply parsed by a subroutine (like reading a jpeg file for example). Remember that scripting languages are specific to a program.
Sep 30, 2012 at 8:29pm
guys he wants a scripting language... its an interpreter he wants
Sep 30, 2012 at 8:30pm
closed account (ozUkoG1T)
Hey just warning you that creating an scripting language is very hard and complex you must be able to know almost every command or functions about c++ or c to use that to code an new scripting language.
Sep 30, 2012 at 8:46pm
Hey just warning you that creating an scripting language is very hard and complex you must be able to know almost every command or functions about c++ or c to use that to code an new scripting language.
Its not necessary that hard, alot of games use scripting languages that consist of a few hundred commands with their parameters separated by whitespace. The whole scripting language could be implemented within a simple function.
Last edited on Sep 30, 2012 at 8:46pm
Topic archived. No new replies allowed.