Added lex loop in test main()