Added grammar enumerator and tests