Read this: <https://people.inf.ethz.ch/wirth/CompilerConstruction/CompilerConstruction1.pdf>
<https://people.inf.ethz.ch/wirth/CompilerConstruction/CompilerConstruction2.pdf> And then "Modern compiler implementation in Java/ML/C" by Andrew W. Appel and Jens Palsberg. These are not very math heavy but you should be able to write a recursion, for example a recursive directory traversal. The primary job of a compiler is the elimination of recursions which is easier if you can use recursion within a compiler.