Use ebnf srg generation in PrSRGS.

This commit is contained in:
bringert
2006-12-12 14:01:42 +00:00
parent ebb3382418
commit 9e3500024b
3 changed files with 52 additions and 42 deletions

View File

@@ -8,7 +8,7 @@
-- Utilities for creating XML documents.
-----------------------------------------------------------------------------
module GF.Data.XML (XML(..), Attr, comments, showsXMLDoc, showsXML) where
module GF.Data.XML (XML(..), Attr, comments, showsXMLDoc, showsXML, bottomUpXML) where
import GF.Data.Utilities
@@ -48,3 +48,7 @@ escape = concatMap escChar
escChar '&' = "&"
escChar '"' = """
escChar c = [c]
bottomUpXML :: (XML -> XML) -> XML -> XML
bottomUpXML f (Tag n attrs cs) = f (Tag n attrs (map (bottomUpXML f) cs))
bottomUpXML f x = f x