title: What is the purpose of a lexer?
body: <p>I was reading the answer to <a href="https://stackoverflow.com/questions/2842809/lexers-vs-parsers">this question. </a>
  I can't seem to find the answer to why someone would <strong>need a lexer</strong> separately</p>
  
  <p>Is it one of the steps a program goes through during compilation? 
  Can someone please explain in simple terms why I would need a lexer, and what purpose it would serve?</p>