Made flex class more modular. Edited lyutils badtoken to print error specified in the parser.l