diff options
| author | bringert <bringert@cs.chalmers.se> | 2007-01-21 17:10:10 +0000 |
|---|---|---|
| committer | bringert <bringert@cs.chalmers.se> | 2007-01-21 17:10:10 +0000 |
| commit | abeb18fb20386ff7f14c8a564bc5af2d5eef1432 (patch) | |
| tree | fbe98a212a90f7dbe082f203e294d16b5b4815bb /src/GF/Speech/PrSRGS_ABNF.hs | |
| parent | 71111e0a7c23c3b6b8bf99915f5e1479141cc27b (diff) | |
Use _cat category as root in SRGS ABNF and JSGF. SRGS XML already did this.
Diffstat (limited to 'src/GF/Speech/PrSRGS_ABNF.hs')
| -rw-r--r-- | src/GF/Speech/PrSRGS_ABNF.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/GF/Speech/PrSRGS_ABNF.hs b/src/GF/Speech/PrSRGS_ABNF.hs index d79ee7b55..9ba705926 100644 --- a/src/GF/Speech/PrSRGS_ABNF.hs +++ b/src/GF/Speech/PrSRGS_ABNF.hs @@ -60,7 +60,9 @@ prABNF sisr probs srg@(SRG{grammarName=name,grammarLanguage=ml, language = maybe empty (\l -> text "language" <+> text l <> char ';') ml tagFormat | isJust sisr = text "tag-format" <+> text "<semantics/1.0>" <> char ';' | otherwise = empty - mainCat = text "root" <+> prCat start <> char ';' + mainCat = case cfgCatToGFCat origStart of + Just c -> text "root" <+> prCat (catFormId c) <> char ';' + Nothing -> empty prRule (SRGRule cat origCat rhs) = comment origCat $$ rule False cat (map prAlt (ebnfSRGAlts rhs)) |
