Moved the lexer into its own source file.