mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-29 04:38:55 -06:00
Eliminate more redundant item tags in SRGS XML.
This commit is contained in:
@@ -146,5 +146,8 @@ optimizeSRGS = bottomUpXML f
|
|||||||
where f (Tag "item" [] [x@(Tag "item" _ _)]) = x
|
where f (Tag "item" [] [x@(Tag "item" _ _)]) = x
|
||||||
f (Tag "item" [] [x@(Tag "one-of" _ _)]) = x
|
f (Tag "item" [] [x@(Tag "one-of" _ _)]) = x
|
||||||
f (Tag "item" as [Tag "item" [] xs]) = Tag "item" as xs
|
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 (Tag "one-of" [] [x]) = x
|
||||||
f x = x
|
f x = x
|
||||||
|
|||||||
Reference in New Issue
Block a user