mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-16 08:19:31 -06:00
2beta2
This commit is contained in:
@@ -56,8 +56,9 @@ batchCompileOld f = compileOld defOpts f
|
||||
compileModule :: Options -> ShellState -> FilePath ->
|
||||
IOE (GFC.CanonGrammar, (SourceGrammar,[(FilePath,ModTime)]))
|
||||
|
||||
compileModule opts st0 file | oElem showOld opts ||
|
||||
elem suff ["cf","ebnf"] = do
|
||||
compileModule opts st0 file |
|
||||
oElem showOld opts ||
|
||||
elem suff ["cf","ebnf"] = do
|
||||
let putp = putPointE opts
|
||||
let path = [] ----
|
||||
grammar1 <- if suff == "cf"
|
||||
|
||||
@@ -210,6 +210,20 @@ greatestAbstract gr = case allAbstracts gr of
|
||||
[] -> Nothing
|
||||
a -> return $ last a
|
||||
|
||||
-- all resource modules
|
||||
allResources :: G.SourceGrammar -> [Ident]
|
||||
allResources gr = [i | (i,M.ModMod m) <- M.modules gr, M.mtype m == M.MTResource]
|
||||
|
||||
|
||||
-- the last resource in dependency order
|
||||
greatestResource :: G.SourceGrammar -> Maybe Ident
|
||||
greatestResource gr = case allResources gr of
|
||||
[] -> Nothing
|
||||
a -> return $ last a
|
||||
|
||||
resourceOfShellState :: ShellState -> Maybe Ident
|
||||
resourceOfShellState = greatestResource . srcModules
|
||||
|
||||
qualifTop :: StateGrammar -> G.QIdent -> G.QIdent
|
||||
qualifTop gr (_,c) = (absId gr,c)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user