title: Should I create a header file for lex functions?
body: <p>I have a lex input .l file that includes a bunch of rules and function definitions for when those rules are encountered.</p>
  
  <p>I am using this scanner from another source file, main.c</p>
  
  <p>In main.c, I can call yylex() without having to have any kind of reference to my generated lex file. Why does this work? I am using cmake, and I noticed that it creates an object out of my lexer.c file, and links that to my executable. I would have thought I would need an external reference to yylex() though for that to work. </p>
  
  <p>My question is should I create forward declarations for all of the functions I use in my lex .l file in a separate header, and include that in the lex file? Taking it a step further, should I define those functions outside of the lex file, and have them be used by way of referencing the include file? </p>