diff options
Diffstat (limited to 'src/GF/Compile/ShellState.hs')
| -rw-r--r-- | src/GF/Compile/ShellState.hs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/GF/Compile/ShellState.hs b/src/GF/Compile/ShellState.hs index 661e1bedd..85bc24ae0 100644 --- a/src/GF/Compile/ShellState.hs +++ b/src/GF/Compile/ShellState.hs @@ -187,13 +187,23 @@ optionsOfLang st = stateOptions . stateGrammarOfLang st -- the last introduced grammar, stored in options, is the default for operations firstStateGrammar :: ShellState -> StateGrammar -firstStateGrammar st = errVal emptyStateGrammar $ do +firstStateGrammar st = errVal (stateAbstractGrammar st) $ do concr <- maybeErr "no concrete syntax" $ concrete st return $ stateGrammarOfLang st concr mkStateGrammar :: ShellState -> Language -> StateGrammar mkStateGrammar = stateGrammarOfLang +stateAbstractGrammar :: ShellState -> StateGrammar +stateAbstractGrammar st = StGr { + absId = maybe (identC "Abs") id (abstract st), --- + cncId = identC "#Cnc", --- + grammar = canModules st, ---- only abstarct ones + cf = emptyCF, + morpho = emptyMorpho + } + + -- analysing shell state into parts globalOptions = gloptions allLanguages = map fst . concretes |
