Stanford University: Keith Schwarz's "Lexical Analysis"

Read from page 3 to the end, including Scanner Implementation 1 and 2, and the FORTRAN I Case Study.