title: Flex, Bison, and C: Looking for a very basic introduction
body: <p>I am looking for a very short working example of flex and bison with an accompanying Makefile which makes use of the builtin rules. I've tried several google results that were messy, wouldn't build, or were in C++ which isn't acceptable. Good online resources and short sample code is appreciated.</p>
  
  <hr>
  
  <p>ADDITIONAL</p>
  
  <pre><code>     # Makefile example -- scanner and parser.
       # Creates "myprogram" from "scan.l", "parse.y", and "myprogram.c"
       #
       LEX     = flex
       YACC    = bison -y
       YFLAGS  = -d
       objects = scan.o parse.o myprogram.o
  
       myprogram: $(objects)
       scan.o: scan.l parse.c
       parse.o: parse.y
       myprogram.o: myprogram.c
  </code></pre>
  
  <p>I would like a Makefile which looks approximately like this with attached source files which do something arbitrarily simple.</p>