From dc1db399f698ec80ca80cf2e0925239527087a01 Mon Sep 17 00:00:00 2001 From: bjorn Date: Mon, 18 Aug 2008 12:34:56 +0000 Subject: When producing PGF, do UTF-8 encoding of the whole file after pretty printing instead of walking through the PGF structure before pretty-printing. The old code was brittle, and only converted strings in the lins and opers, not in printnames and parsers. The old code also double encoded some grammars when using gfc to combine PGF files. --- src/PGF/Raw/Convert.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/PGF/Raw/Convert.hs') diff --git a/src/PGF/Raw/Convert.hs b/src/PGF/Raw/Convert.hs index af3708eb5..8e429660a 100644 --- a/src/PGF/Raw/Convert.hs +++ b/src/PGF/Raw/Convert.hs @@ -136,7 +136,7 @@ toTerm e = case e of ------------------------------ fromPGF :: PGF -> Grammar -fromPGF pgf0 = Grm [ +fromPGF pgf = Grm [ App "pgf" (AInt pgfMajorVersion:AInt pgfMinorVersion : App (prCId (absname pgf)) [] : map (flip App [] . prCId) (cncnames pgf)), App "flags" [App (prCId f) [AStr v] | (f,v) <- Map.toList (gflags pgf `Map.union` aflags apgf)], @@ -147,7 +147,6 @@ fromPGF pgf0 = Grm [ App "concrete" [App (prCId lang) (fromConcrete c) | (lang,c) <- Map.toList (concretes pgf)] ] where - pgf = utf8GFCC pgf0 apgf = abstract pgf fromConcrete cnc = [ App "flags" [App (prCId f) [AStr v] | (f,v) <- Map.toList (cflags cnc)], -- cgit v1.2.3