Adding the initial version of the scanner code.
Wrote this about 4 years ago so I don't remember much but it compiles and runs.