discover/grub2: Move parser-api definitions to parser.y