From 77920fd23a494f09be7d22219bc6e998229b4028 Mon Sep 17 00:00:00 2001 From: bringert Date: Tue, 26 Jun 2007 12:27:46 +0000 Subject: [PATCH] Eliminate more redundant item tags in SRGS XML. --- src/GF/Speech/PrSRGS.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/GF/Speech/PrSRGS.hs b/src/GF/Speech/PrSRGS.hs index 58170842f..3b88cad3a 100644 --- a/src/GF/Speech/PrSRGS.hs +++ b/src/GF/Speech/PrSRGS.hs @@ -146,5 +146,8 @@ optimizeSRGS = bottomUpXML f where f (Tag "item" [] [x@(Tag "item" _ _)]) = x f (Tag "item" [] [x@(Tag "one-of" _ _)]) = x f (Tag "item" as [Tag "item" [] xs]) = Tag "item" as xs + f (Tag "item" as xs) = Tag "item" as (map g xs) + where g (Tag "item" [] [x@(ETag "ruleref" _)]) = x + g x = x f (Tag "one-of" [] [x]) = x f x = x