Look up scanning, tokenisation, and parsing, and you can create a compiler. Do it on the fly and it's an interpreter. Do it on the fly with caching and it's a JIT compiler.