summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2007-06-26 12:27:46 +0000
committerbringert <bringert@cs.chalmers.se>2007-06-26 12:27:46 +0000
commit3371605af01d49c6a0f5bec07763827f279fff61 (patch)
tree4eea6f19f5af68f7c86d309c9d5504cdb4eaeaac /src
parent7eaa2af27c2b5db7eb1ec713cbdb5f115e871667 (diff)
Eliminate more redundant item tags in SRGS XML.
Diffstat (limited to 'src')
-rw-r--r--src/GF/Speech/PrSRGS.hs3
1 files changed, 3 insertions, 0 deletions
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