summaryrefslogtreecommitdiff
path: root/src-3.0/GF/Speech/SRG.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src-3.0/GF/Speech/SRG.hs')
-rw-r--r--src-3.0/GF/Speech/SRG.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src-3.0/GF/Speech/SRG.hs b/src-3.0/GF/Speech/SRG.hs
index a4a41afb5..8bb509d22 100644
--- a/src-3.0/GF/Speech/SRG.hs
+++ b/src-3.0/GF/Speech/SRG.hs
@@ -8,12 +8,13 @@
-- FIXME: remove \/ warn \/ fail if there are int \/ string literal
-- categories in the grammar
----------------------------------------------------------------------
-module GF.Speech.SRG (SRG(..), SRGRule(..), SRGAlt(..), SRGItem
+module GF.Speech.SRG (SRG(..), SRGRule(..), SRGAlt(..), SRGItem, SRGSymbol
, SRGNT, CFTerm
, makeSRG
, makeSimpleSRG
, makeNonRecursiveSRG
, getSpeechLanguage
+ , isExternalCat
, lookupFM_, prtS
) where
@@ -139,6 +140,9 @@ cfRulesToSRGRule rs@(r:_) = SRGRule (lhsCat r) rhs
allSRGCats :: SRG -> [String]
allSRGCats SRG { srgRules = rs } = [c | SRGRule c _ <- rs]
+isExternalCat :: SRG -> Cat -> Bool
+isExternalCat srg c = c `Set.member` srgExternalCats srg
+
--
-- * Size-optimized EBNF SRGs
--