For the course Compiler Construction at Radboud University.
Feel free to use this code as a starting point for your own project.
It implements a lexer and parser for a very small expression grammar. No fancy error handling, no keeping track of source locations. You have to implement all that yourself.
All algorithms that traverse abstract syntax trees can be implemented using the visitor pattern.
See PrettyPrinter
for an example.
Have fun!