now the scanner and parser are tangled together.

Its beautiful. No lookup logic, nothing fancy state keeping. Just prolog
doing its logical deductions.