forked from GitHub/gf-core
ids for GF rather than BNFC in AbsToBNF
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user