SAGE:Specification-Aware Grammar Extraction for Automated Test Case Generation with LLMs