summaryrefslogtreecommitdiff
path: root/src/GF/API/IOGrammar.hs
diff options
context:
space:
mode:
authoraarne <unknown>2005-11-14 15:03:40 +0000
committeraarne <unknown>2005-11-14 15:03:40 +0000
commitf339b8839bcb25a57cb22baa3342032892f9be63 (patch)
tree59b15d37579d5b5630d9ae5ac7a9d701cf3e09a4 /src/GF/API/IOGrammar.hs
parent505eb2ec5794e741d343e52be4f75da7b4980a62 (diff)
arbitrary lincat records; noparse pragmas
Diffstat (limited to 'src/GF/API/IOGrammar.hs')
-rw-r--r--src/GF/API/IOGrammar.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/GF/API/IOGrammar.hs b/src/GF/API/IOGrammar.hs
index f06799da1..ce522a9e5 100644
--- a/src/GF/API/IOGrammar.hs
+++ b/src/GF/API/IOGrammar.hs
@@ -5,9 +5,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/10/31 19:02:35 $
+-- > CVS $Date: 2005/11/14 16:03:40 $
-- > CVS $Author: aarne $
--- > CVS $Revision: 1.19 $
+-- > CVS $Revision: 1.20 $
--
-- for reading grammars and terms from strings and files
-----------------------------------------------------------------------------
@@ -21,6 +21,7 @@ import GF.Compile.PGrammar
import GF.Grammar.TypeCheck
import GF.Compile.Compile
import GF.Compile.ShellState
+import GF.Compile.NoParse
import GF.Probabilistic.Probabilistic
import GF.Infra.Modules
@@ -52,15 +53,16 @@ string2annotTree gr m = annotate gr . string2absTerm (prt m) ---- prt
shellStateFromFiles :: Options -> ShellState -> FilePath -> IOE ShellState
shellStateFromFiles opts st file = do
+ ign <- ioeIO $ getNoparseFromFile opts file
let top = identC $ justModuleName file
sh <- case fileSuffix file of
"gfcm" -> do
cenv <- compileOne opts (compileEnvShSt st []) file
- ioeErr $ updateShellState opts Nothing st cenv
+ ioeErr $ updateShellState opts ign Nothing st cenv
s | elem s ["cf","ebnf"] -> do
let osb = addOptions (options []) opts
grts <- compileModule osb st file
- ioeErr $ updateShellState opts Nothing st grts
+ ioeErr $ updateShellState opts ign Nothing st grts
_ -> do
b <- ioeIO $ isOldFile file
let opts' = if b then (addOption showOld opts) else opts
@@ -70,7 +72,7 @@ shellStateFromFiles opts st file = do
else addOptions (options [emitCode]) opts'
grts <- compileModule osb st file
let mtop = if oElem showOld opts' then Nothing else Just top
- ioeErr $ updateShellState opts' mtop st grts
+ ioeErr $ updateShellState opts' ign mtop st grts
if (isSetFlag opts probFile || oElem (iOpt "prob") opts)
then do
probs <- ioeIO $ getProbsFromFile opts file