Quote:Original post by Drizzt DoUrden
All of these oddball language make me wonder : what is required to/how do you create your own language?
Here, in 4 steps.
Step 1: Think of the idea, figure out what features you want, design a syntax around those features. Read
this post to help figure out if your idea is any good.
Step 2: Write a lexer and a parser. There are many tools to help with this step, you can opt for the established favorites lex/yacc, the newer and quite powerful ANTLR, or something else.
Step 3: Some magic happens, you take the output from the parser and use it to create some kind of internal representation. This step totally depends on what your features are. Lots of books on this topic.
Step 4: Take that internal representation and turn it into something executable. Also lots of books on this topic. You can output machine-level code, or code for an existing virtual machine (such as the JVM, .NET CLR, or LLVM), or output your own format that would be executed by your own runtime library. My choice here would be LLVM.
If you're still interested, then that site
LtU has a ton of good resources and discussions.