grammar compiler works in a basic version