From cd3f290ff24d55d1d704f256e6c1f7fafb3fc600 Mon Sep 17 00:00:00 2001 From: krangelov Date: Tue, 7 Dec 2021 15:51:34 +0100 Subject: [PATCH] always generate PMCFG for the literal categories --- src/compiler/GF/Compile/GrammarToPGF.hs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/compiler/GF/Compile/GrammarToPGF.hs b/src/compiler/GF/Compile/GrammarToPGF.hs index e3cf1630e..bb7d1277a 100644 --- a/src/compiler/GF/Compile/GrammarToPGF.hs +++ b/src/compiler/GF/Compile/GrammarToPGF.hs @@ -53,8 +53,14 @@ grammar2PGF opts gr am probs = do createConcrete (mi2i cm) $ do let cflags = err (const noOptions) mflags (lookupModule gr cm) sequence_ [setConcreteFlag name value | (name,value) <- optionsPGF cflags] - forM_ (Look.allOrigInfos gr cm) createCncCats - forM_ (Look.allOrigInfos gr cm) createCncFuns + let id_prod = Production [] [PArg [] (LParam 0 [])] (LParam 0 []) [[SymCat 0 (LParam 0 [])]] + prods = ([id_prod],[id_prod]) + infos = (((cPredefAbs,cInt), CncCat (Just (noLoc GM.defLinType)) Nothing Nothing Nothing (Just prods)) + :((cPredefAbs,cString),CncCat (Just (noLoc GM.defLinType)) Nothing Nothing Nothing (Just prods)) + :((cPredefAbs,cFloat), CncCat (Just (noLoc GM.defLinType)) Nothing Nothing Nothing (Just prods)) + : Look.allOrigInfos gr cm) + forM_ infos createCncCats + forM_ infos createCncFuns return pgf where aflags = err (const noOptions) mflags (lookupModule gr am)