These are coding assignments during my time at LSU when studying Programming Languages.
I strongly recommend against copying any of this. Instructors with the ability to teach a Programming Languages course definetly know how to do Abstract Syntax Tree analysis - so changing variable names, comments, and organization will do nothing.
Just do it yourself. You'll be grateful you did.
Jeffrey