If you can provide the complete source code, don't use other DLLs.
If you can implement all the lexical analysis of the source code, and even add new syntax, that would be perfect.

If you use multithreading, the speed should be several times faster, right? For example, a CPU with 6 cores uses 12 multithreads for processing.