As the previous poster already stated, you're looking for an embedded scripting language. To use it you need to bind portions of your game to the scripting engine. To get started, take a look at these two scripting languages:
The latter has its own subforum here on gamedev and it's fairly easy to bind C(++) functions to it.
I don't recommend you to write your own parser/lexer, as you need quite some knowledge to do that and it seems you're a beginner.