Wrote a ScannerGenerator. I think we might be doing this wrong.