From 8a7aa15c5717e3ab4ebe0e63459759be4863e07e Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Mon, 14 Nov 2011 16:27:59 +0000 Subject: [PATCH] bugfix in the new PGF generation --- src/compiler/GF/Compile/GrammarToPGF.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/GF/Compile/GrammarToPGF.hs b/src/compiler/GF/Compile/GrammarToPGF.hs index 7e73b36de..ef885203b 100644 --- a/src/compiler/GF/Compile/GrammarToPGF.hs +++ b/src/compiler/GF/Compile/GrammarToPGF.hs @@ -196,7 +196,7 @@ genCncFuns gr am cm cdefs fid_cnt cnccats = let !funs_cnt' = let (s_funid, e_funid) = bounds funs0 in funs_cnt+(e_funid-s_funid+1) lindefs' = foldl' (toLinDef (am,id) funs_cnt) lindefs prods0 - !(seqs',funs') = foldl' (toCncFun funs_cnt (m,id)) (seqs,funs) (assocs funs0) + !(seqs',funs') = foldl' (toCncFun funs_cnt (m,mkLinDefId id)) (seqs,funs) (assocs funs0) in mkCncCats cdefs fid_cnt funs_cnt' seqs' funs' lindefs' mkCncCats (_ :cdefs) fid_cnt funs_cnt seqs funs lindefs = mkCncCats cdefs fid_cnt funs_cnt seqs funs lindefs @@ -237,6 +237,9 @@ genCncFuns gr am cm cdefs fid_cnt cnccats = ctxt = mapM (mkCtxt lindefs) hargs_C fids = map (mkFId arg_C) fid0s + mkLinDefId id = + identC (BS.append (BS.pack "lindef ") (ident2bs id)) + toLinDef res offs lindefs (Production fid0 funid0 _) = IntMap.insertWith (++) fid [offs+funid0] lindefs where