grammar inheritance example fixed and completed - now testable