From a77519ba1045d23a7bb8ea1c56cc90518e9fedb9 Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 16 Jun 2004 14:49:50 +0000 Subject: bug fixes ; command so ; reintroduce batch mode --- src/GF/Compile/ShellState.hs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/GF/Compile/ShellState.hs') 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 -- cgit v1.2.3