fix the handling of separators in BNFC which are not nonempty

This commit is contained in:
krasimir
2016-03-22 13:13:35 +00:00
parent ce70720859
commit a393c1a246
4 changed files with 23 additions and 17 deletions

View File

@@ -56,7 +56,7 @@ importCF opts files get convert = impCF
startCat <- case rules of
(Rule cat _ _ : _) -> return cat
_ -> fail "empty CFG"
let pgf = cf2pgf (last files) (uniqueFuns (mkCFG startCat Set.empty rules))
let pgf = cf2pgf (last files) (mkCFG startCat Set.empty rules)
probs <- maybe (return . defaultProbabilities) readProbabilitiesFromFile (flag optProbsFile opts) pgf
return $ setProbabilities probs
$ if flag optOptimizePGF opts then optimizePGF pgf else pgf