1
0
forked from GitHub/gf-core

Disable special treatment of lists in SRGS+SISR generation, since OptimTalk can't handle it.

This commit is contained in:
bringert
2006-05-31 19:41:05 +00:00
parent 7a8922c4da
commit d71e8b65d8

View File

@@ -59,8 +59,10 @@ prSrgsXml sisr (SRG{grammarName=name,startCat=start,
++ map ruleToXML rs)
ruleToXML (SRGRule cat origCat alts) =
rule (prCat cat) (comments ["Category " ++ origCat] ++ prRhs isList alts)
where isList = "List" `isPrefixOf` origCat && length cs == 2
&& isBase (cs!!0) && isCons (cs!!1)
where isList = False
-- Disabled list build since OptimTalk can't handle it ATM
{- "List" `isPrefixOf` origCat && length cs == 2
&& isBase (cs!!0) && isCons (cs!!1) -}
cs = sortNub [f | SRGAlt _ (Name f _) _ <- alts]
prRhs isList rhss = [oneOf (map (mkProd sisr isList) rhss)]
-- externally visible rules for each of the GF categories