1
0
forked from GitHub/gf-core

resources and new instantiation syntax

This commit is contained in:
aarne
2005-02-04 19:17:57 +00:00
parent 0ace2a1a4b
commit 0796338380
48 changed files with 1699 additions and 1006 deletions

View File

@@ -33,7 +33,7 @@ data MGrammar i f a = MGrammar {modules :: [(i,ModInfo i f a)]}
data ModInfo i f a =
ModMainGrammar (MainGrammar i)
| ModMod (Module i f a)
| ModWith (ModuleType i) ModuleStatus i [OpenSpec i]
| ModWith (ModuleType i) ModuleStatus i [i] [OpenSpec i]
deriving Show
data Module i f a = Module {

View File

@@ -254,10 +254,18 @@ getModuleHeader ws = case ws of
((MTyResource,name),(m,MUInstance):(n,MUComplete):[(n,MUOther) | n <- ms])
ms -> ((MTyResource,name),(m,MUInstance):[(n,MUOther) | n <- ms])
"concrete":name:a:ws2 -> case span (/= "with") ws2 of
(es,_:ms) -> ((MTyOther,name),
[(m,MUOther) | m <- es] ++
[(n,MUComplete) | n <- ms])
--- m:"with":ms -> ((MTyOther,name),(m,MUOther):[(n,MUComplete) | n <- ms])
(ms,[]) -> ((MTyOther,name),[(n,MUOther) | n <- a:ms])
_:name:ws2 -> case ws2 of
"reuse":m:_ -> ((MTyOther,name),[(m,MUReuse)])
m:n:"with":ms ->
((MTyOther,name),(m,MUInstance):(n,MUOther):[(n,MUComplete) | n <- ms])
---- m:n:"with":ms ->
---- ((MTyOther,name),(m,MUInstance):(n,MUOther):[(n,MUComplete) | n <- ms])
m:"with":ms -> ((MTyOther,name),(m,MUOther):[(n,MUComplete) | n <- ms])
ms -> ((MTyOther,name),[(n,MUOther) | n <- ms])