grammar and LL(1) validator