title: lexers vs parsers
body: <p>Are lexers and parsers really that different in theory? </p>
  
  <p>It seems fashionable to hate regular expressions: <a href="http://www.codinghorror.com/blog/2009/11/parsing-html-the-cthulhu-way.html" rel="noreferrer">coding horror</a>, <a href="http://kore-nordmann.de/blog/do_NOT_parse_using_regexp.html" rel="noreferrer">another blog post</a>. </p>
  
  <p>However, popular lexing based tools: <a href="http://pygments.org/" rel="noreferrer">pygments</a>, <a href="http://qbnz.com/highlighter/" rel="noreferrer">geshi</a>, or <a href="http://code.google.com/p/google-code-prettify/" rel="noreferrer">prettify</a>, all use regular expressions.  They seem to lex anything... </p>
  
  <p>When is lexing enough, when do you need EBNF? </p>
  
  <p>Has anyone used the tokens produced by these lexers with bison or antlr parser generators?</p>