diff options
| author | bringert <bringert@cs.chalmers.se> | 2007-01-21 16:33:44 +0000 |
|---|---|---|
| committer | bringert <bringert@cs.chalmers.se> | 2007-01-21 16:33:44 +0000 |
| commit | 169659c096a38f8fc0cf48e3054efbdf30a96c8c (patch) | |
| tree | baf3f08f571514fe113055ce7dfd321e746b1f44 /src/GF/Speech/PrSRGS_ABNF.hs | |
| parent | b974ab06cdd64ba1db9278516fbd5803f236d5ee (diff) | |
Get speechLanguage flag from both command-line and grammar. Reformat it to RFC3066 format (- instead of _) and use it in SRGS, VoiceXML and JSGF.
Diffstat (limited to 'src/GF/Speech/PrSRGS_ABNF.hs')
| -rw-r--r-- | src/GF/Speech/PrSRGS_ABNF.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GF/Speech/PrSRGS_ABNF.hs b/src/GF/Speech/PrSRGS_ABNF.hs index 2b965e9cb..d79ee7b55 100644 --- a/src/GF/Speech/PrSRGS_ABNF.hs +++ b/src/GF/Speech/PrSRGS_ABNF.hs @@ -47,7 +47,7 @@ srgsAbnfPrinter :: Maybe SISRFormat srgsAbnfPrinter sisr probs opts s = show $ prABNF sisr probs $ makeSimpleSRG opts s prABNF :: Maybe SISRFormat -> Bool -> SRG -> Doc -prABNF sisr probs srg@(SRG{grammarName=name,grammarLanguage = l, +prABNF sisr probs srg@(SRG{grammarName=name,grammarLanguage=ml, startCat=start,origStartCat=origStart,rules=rs}) = header $++$ vcat topCatRules $++$ foldr ($++$) empty (map prRule rs) where @@ -57,7 +57,7 @@ prABNF sisr probs srg@(SRG{grammarName=name,grammarLanguage = l, ++ ". " ++ "Original start category: " ++ origStart) $$ meta "generator" ("Grammatical Framework " ++ version) $$ language $$ tagFormat $$ mainCat - language = text "language" <+> text l <> char ';' + 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 ';' |
