diff --git a/grammars/testConversions/MicroAbs.gf b/grammars/testConversions/MicroAbs.gf new file mode 100644 index 000000000..44a3a0982 --- /dev/null +++ b/grammars/testConversions/MicroAbs.gf @@ -0,0 +1,8 @@ + +abstract MicroAbs = { + +cat S; + +fun vars : S; + +} diff --git a/grammars/testConversions/MicroCnc.gf b/grammars/testConversions/MicroCnc.gf new file mode 100644 index 000000000..c58c44c9b --- /dev/null +++ b/grammars/testConversions/MicroCnc.gf @@ -0,0 +1,10 @@ + +concrete MicroCnc of MicroAbs = { + +lincat S = {a : {s1:Str ; s2:Str}}; + +lin vars = {a = variants { {s1="a" ; s2=variants{"b";"c"}} ; {s1="d";s2="e"} }}; + +} + + diff --git a/src/GF/UseGrammar/Custom.hs b/src/GF/UseGrammar/Custom.hs index 03e66837d..66ba55934 100644 --- a/src/GF/UseGrammar/Custom.hs +++ b/src/GF/UseGrammar/Custom.hs @@ -169,6 +169,7 @@ customGrammarPrinter = -- grammar conversions, (peb) ,(strCI "gfc_show", show . grammar2canon . stateGrammarST) ,(strCI "gfc_raw", prRaw . stateGrammarST) + ,(strCI "tnf", prCanon . convertCanonToTNF . stateGrammarST) ,(strCI "mcfg", prMCFG . convertCanonToMCFG . stateGrammarST) ,(strCI "mcfg_cf", prCF . convertCanonToCF . stateGrammarST) ,(strCI "mcfg_canon", prCanon . convertCanonToMCFG . stateGrammarST)