Implemented a lexical scanner