As already suggested you need to create a compiler.
Generally speaking creating a compiler is a rather difficult task. However it really depends on the requirements of your language (a simple and 'regular' language would make your task easier). Anyway you need some background on compiler construction techniques. I might suggest:
- The dragon book - (already suggested) provides a strong theoretical approach.
- lcc, A Retargetable Compiler for ANSI C[^] - shows a complete implementation of a
C
compiler (might be the 'natural' practical complement of the dragon book).
You may find more 'introductory' material in
It is worthy nothing there are many tools that try to automate the 'compiler generation' process. The classical example is
bison[
^]/
flex[
^] pair, while a more recent one is
ANTLR[
^] (if you you find yourself creative then have a look at the
LPeg Lua[
^] library).
Since you tagged your question as C++, I should also mention the
Boost Spirit[
^] library.