Sets up flex and bison

I think I may have also finally fixed the memory leak in flex.
Using `yylex_destroy();` after a parse seems to clean up the flex buffer.
Though, yylex_destroy shouldn't actually be supported in older flex versions such as mine.
It must have been back-ported as it was a serious error.