adds variable to grammar