add grammar interface implementation