1
0
forked from GitHub/gf-core

ids for GF rather than BNFC in AbsToBNF

This commit is contained in:
aarne
2007-05-10 14:06:45 +00:00
parent 94531fac8a
commit 283cf9900a

View File

@@ -5,6 +5,8 @@ import GF.Data.Operations
import GF.Infra.Option
import GF.Canon.GFC (CanonGrammar)
-- AR 10/5/2007
abstract2bnf :: CanonGrammar -> String
abstract2bnf = sgrammar2bnf . gr2sgr noOptions emptyProbs
@@ -25,7 +27,11 @@ mkBNF (pfun,(args,cat)) =
[] -> prQuotedString (snd pfun)
_ -> unwords (map gfId args)
gfId i = case i of
-- good for GF
gfId i = i
-- good for BNFC
gfIdd i = case i of
"Int" -> "Integer"
"String" -> i
"Float" -> "Double"