Changed lex.c to updated template file provided by Nathan Whitehead.