Below are my notes from a really interesting article about the creation of programming languages by Walter Bright published on January 21, 2014 in the Dr. Dobbs Journal.
http://www.drdobbs.com/architecture-and-design/so-you-want-to-write-your-own-language/240165488
Tons of work ... years of work ... need intrinsic motivation. Not a major cash investment
Syntax matters a lot. It needs to be something that appeals to your target audience. A mix of familiar syntax + aesthetic beauty.
These should NOT be considerations:
These things are TRULY GOOD:
After syntax, the important thing is semantic processing... meaning is assigned here to syntax structure. This is where you spend most of the design and implementation time. There is no glory in the semantics, but it is the whole point of the language.
After the semantice phase, the compiler does optimizations and code generation This is collectively called the back-end. Very challenging and complicated these 2 phases. Try using an existing back end such as one of JVM, CLR, GCC, LLVM.
Regex is the wrong tool for lexing and parsing.
Don't bother wasting time with lexer and parser generators or other so-called compiler compilers. They are a waste of time. Writing the lexer and the parser is a tiny percentage of the job of writing a compiler.
Error messages are a big factor in the quality of implementation of the language. Use the following guidelines:
Compiler speed matters a lot... Most compilers are pigs. The secret to making a compiler fast is to use a profiler.
You must/have to be using these tools in order to be successful:
A semantic technique. It consists of, internally, rewrting more complex semantic constructs in terms of simpler ones. e.g. while loops and foreach loops can be rewritten in terms of for loops. Then the rest of the code only has to deal with for loops. If there are special-case rules in the language that prevent lowering rewriting, then revisit the design of the language.
Critical is the need to write a runtime library. This is a major project. It serves as the demostration of how the language features work. It better be good.
Get these right:
Go anywhere they will have you and show it off. Get used to public speaking. Get as much feedback as you can.