support probabilistic CFG