mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
prevent pgf from being empty when there are no concrete syntaxes
This commit is contained in:
@@ -260,13 +260,15 @@ reorder abs cg = M.MGrammar $
|
|||||||
|
|
||||||
-- one grammar per language - needed for symtab generation
|
-- one grammar per language - needed for symtab generation
|
||||||
repartition :: Ident -> SourceGrammar -> [SourceGrammar]
|
repartition :: Ident -> SourceGrammar -> [SourceGrammar]
|
||||||
repartition abs cg = [M.partOfGrammar cg (lang,mo) |
|
repartition abs cg =
|
||||||
let mos = M.allModMod cg,
|
[M.partOfGrammar cg (lang,mo) |
|
||||||
lang <- M.allConcretes cg abs,
|
let mos = M.allModMod cg,
|
||||||
let mo = errVal
|
lang <- case M.allConcretes cg abs of
|
||||||
(error ("no module found for " ++ A.prt lang)) $ M.lookupModule cg lang
|
[] -> [abs] -- to make pgf nonempty even when there are no concretes
|
||||||
]
|
cncs -> cncs,
|
||||||
|
let mo = errVal
|
||||||
|
(error ("no module found for " ++ A.prt lang)) $ M.lookupModule cg lang
|
||||||
|
]
|
||||||
|
|
||||||
-- translate tables and records to arrays, parameters and labels to indices
|
-- translate tables and records to arrays, parameters and labels to indices
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user