updated g_lex and g_parse