This tutorial is brilliant. It explains the usage of lex and yacc very clearly. The second part of this video tutorial is here:
https://www.youtube.com/watch?v=__-wUHG2rfM
The source code for this tutorial can be downloaded from GitHub:
Part1: https://github.com/jengelsma/lex-tutorial
Part2: https://github.com/jengelsma/yacc-tutorial