PMCFG format writer for binary grammars