summaryrefslogtreecommitdiff
path: root/src/GF/Compile
diff options
context:
space:
mode:
authoraarne <unknown>2004-06-16 14:49:50 +0000
committeraarne <unknown>2004-06-16 14:49:50 +0000
commita77519ba1045d23a7bb8ea1c56cc90518e9fedb9 (patch)
tree68d72eb77950cf179e8a23ca749a9909b1f2d457 /src/GF/Compile
parent9fae09a77c1f31468129a47cb79156d55f5f2939 (diff)
bug fixes ; command so ; reintroduce batch mode
Diffstat (limited to 'src/GF/Compile')
-rw-r--r--src/GF/Compile/ShellState.hs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/GF/Compile/ShellState.hs b/src/GF/Compile/ShellState.hs
index 6a25ed1cb..acf87494f 100644
--- a/src/GF/Compile/ShellState.hs
+++ b/src/GF/Compile/ShellState.hs
@@ -323,6 +323,10 @@ firstCatOpts opts sgr =
maybe (stateFirstCat sgr) (string2CFCat (P.prt (absId sgr))) $
getOptVal opts firstCat
+-- the first cat for random generation
+firstAbsCat :: Options -> StateGrammar -> G.QIdent
+firstAbsCat opts = cfCat2Cat . firstCatOpts opts
+
-- a grammar can have start category as option startcat=foo ; default is S
stateFirstCat sgr =
maybe (string2CFCat a "S") (string2CFCat a) $
@@ -330,12 +334,6 @@ stateFirstCat sgr =
where
a = P.prt (absId sgr)
--- the first cat for random generation
-firstAbsCat :: Options -> StateGrammar -> G.QIdent
-firstAbsCat opts sgr =
- maybe (absId sgr, identC "S") (\c -> (absId sgr, identC c)) $ ----
- getOptVal opts firstCat
-
{-
-- command-line option -cat=foo overrides the possible start cat of a grammar
stateTransferFun :: StateGrammar -> Maybe Fun