Basic lexical analyzer works with txt files for input and output