updated gram.y and encode.c