diff options
| author | bjorn <bjorn@bringert.net> | 2008-08-18 12:34:56 +0000 |
|---|---|---|
| committer | bjorn <bjorn@bringert.net> | 2008-08-18 12:34:56 +0000 |
| commit | dc1db399f698ec80ca80cf2e0925239527087a01 (patch) | |
| tree | 40a662b47aac25bcb054b1955cc86e9202e133de /src/PGF/Raw/Convert.hs | |
| parent | 255b5488f453efdfefd4edaed2ce2eeb1a8d545c (diff) | |
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.
Diffstat (limited to 'src/PGF/Raw/Convert.hs')
| -rw-r--r-- | src/PGF/Raw/Convert.hs | 3 |
1 files changed, 1 insertions, 2 deletions
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)], |
