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