diff options
| author | krasimir <krasimir@chalmers.se> | 2009-09-11 13:45:34 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-09-11 13:45:34 +0000 |
| commit | 1cdf171251a56baf0867b65a95c9bd59801ff912 (patch) | |
| tree | 837e65fa23f3041c3bbf4b7f1dbfcf63990e09a1 /src/GF/Speech/VoiceXML.hs | |
| parent | 28a7c4b5c7659dc18166e06e914fb0a81c1c43bc (diff) | |
polish the PGF API and make Expr and Type abstract types. Tree is a type synonym of Expr
Diffstat (limited to 'src/GF/Speech/VoiceXML.hs')
| -rw-r--r-- | src/GF/Speech/VoiceXML.hs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/GF/Speech/VoiceXML.hs b/src/GF/Speech/VoiceXML.hs index a30342cd0..cf6f7120f 100644 --- a/src/GF/Speech/VoiceXML.hs +++ b/src/GF/Speech/VoiceXML.hs @@ -29,7 +29,7 @@ import Debug.Trace grammar2vxml :: PGF -> CId -> String grammar2vxml pgf cnc = showsXMLDoc (skel2vxml name language start skel qs) "" where skel = pgfSkeleton pgf - name = prCId cnc + name = showCId cnc qs = catQuestions pgf cnc (map fst skel) language = getSpeechLanguage pgf cnc start = lookStartCat pgf @@ -73,7 +73,7 @@ lin gr fun = do getCatQuestion :: CId -> CatQuestions -> String getCatQuestion c qs = - fromMaybe (error "No question for category " ++ prCId c) (lookup c qs) + fromMaybe (error "No question for category " ++ showCId c) (lookup c qs) -- -- * Generate VoiceXML @@ -93,7 +93,7 @@ grammarURI name = name ++ ".grxml" catForms :: String -> CatQuestions -> CId -> [(CId, [CId])] -> [XML] catForms gr qs cat fs = - comments [prCId cat ++ " category."] + comments [showCId cat ++ " category."] ++ [cat2form gr qs cat fs] cat2form :: String -> CatQuestions -> CId -> [(CId, [CId])] -> XML @@ -111,20 +111,20 @@ cat2form gr qs cat fs = fun2sub :: String -> CId -> CId -> [CId] -> [XML] fun2sub gr cat fun args = - comments [prCId fun ++ " : (" - ++ concat (intersperse ", " (map prCId args)) - ++ ") " ++ prCId cat] ++ ss + comments [showCId fun ++ " : (" + ++ concat (intersperse ", " (map showCId args)) + ++ ") " ++ showCId cat] ++ ss where ss = zipWith mkSub [0..] args mkSub n t = subdialog s [("src","#"++catFormId t), - ("cond","term.name == "++string (prCId fun))] + ("cond","term.name == "++string (showCId fun))] [param "old" v, filled [] [assign v (s++".term")]] - where s = prCId fun ++ "_" ++ show n + where s = showCId fun ++ "_" ++ show n v = "term.args["++show n++"]" catFormId :: CId -> String -catFormId c = prCId c ++ "_cat" +catFormId c = showCId c ++ "_cat" -- |
