Grammar generator logics improved