summaryrefslogtreecommitdiff
path: root/src/GF/Speech/PrJSGF.hs
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2007-01-21 17:10:10 +0000
committerbringert <bringert@cs.chalmers.se>2007-01-21 17:10:10 +0000
commitabeb18fb20386ff7f14c8a564bc5af2d5eef1432 (patch)
treefbe98a212a90f7dbe082f203e294d16b5b4815bb /src/GF/Speech/PrJSGF.hs
parent71111e0a7c23c3b6b8bf99915f5e1479141cc27b (diff)
Use _cat category as root in SRGS ABNF and JSGF. SRGS XML already did this.
Diffstat (limited to 'src/GF/Speech/PrJSGF.hs')
-rw-r--r--src/GF/Speech/PrJSGF.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/GF/Speech/PrJSGF.hs b/src/GF/Speech/PrJSGF.hs
index f6f0b19b2..a86cd71b7 100644
--- a/src/GF/Speech/PrJSGF.hs
+++ b/src/GF/Speech/PrJSGF.hs
@@ -55,7 +55,9 @@ prJSGF sisr srg@(SRG{grammarName=name,grammarLanguage=ml,
text ("grammar " ++ name ++ ";")
lang = maybe empty text ml
mainCat = comment ("Start category: " ++ origStart) $$
- rule True "MAIN" [prCat start]
+ case cfgCatToGFCat origStart of
+ Just c -> rule True "MAIN" [prCat (catFormId c)]
+ Nothing -> empty
prRule (SRGRule cat origCat rhs) =
comment origCat $$
rule False cat (map prAlt (ebnfSRGAlts rhs))