title: Lex/Flex - Scanning for the EOF character
body: <p>Other people have had the following problem that I am having but I can't find anyone that has reported a solution.. getting Flex to spot the EOF (end of file).  I need Flex to find EOF and return a token indicating that it has found it so it can tell Yacc/Bison that it has reached the end of an input source file and can report a successful parse.</p>
  
  <p>Note that <a href="https://stackoverflow.com/questions/4854826/how-to-detect-eof-in-ml-lex">this question</a> is not the same as this one because this is about Lex/Flex.</p>
  
  <p>Any help would be awesome.  Thank you.</p>