diff options
Diffstat (limited to 'src-3.0/GF/Speech/JSGF.hs')
| -rw-r--r-- | src-3.0/GF/Speech/JSGF.hs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src-3.0/GF/Speech/JSGF.hs b/src-3.0/GF/Speech/JSGF.hs index d49646152..dc9f4170a 100644 --- a/src-3.0/GF/Speech/JSGF.hs +++ b/src-3.0/GF/Speech/JSGF.hs @@ -44,10 +44,8 @@ prJSGF sisr srg comment "Generated by GF" $$ text ("grammar " ++ srgName srg ++ ";") lang = maybe empty text (srgLanguage srg) - mainCat = rule True "MAIN" [prCat (externalCat (srgStartCat srg))] - prRule (SRGRule cat rhs) - | isExternalCat srg cat = rule True (externalCat cat) (map prAlt rhs) - | otherwise = rule False cat (map prAlt rhs) + mainCat = rule True "MAIN" [prCat (srgStartCat srg)] + prRule (SRGRule cat rhs) = rule (isExternalCat srg cat) cat (map prAlt rhs) prAlt (SRGAlt mp n rhs) = sep [initTag, p (prItem sisr n rhs), finalTag] where initTag | isEmpty t = empty | otherwise = text "<NULL>" <+> t @@ -55,9 +53,6 @@ prJSGF sisr srg finalTag = tag sisr (profileFinalSISR n) p = if isEmpty initTag && isEmpty finalTag then id else parens -externalCat :: Cat -> Cat -externalCat c = c ++ "_cat" - prCat :: Cat -> Doc prCat c = char '<' <> text c <> char '>' |
