mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-21 17:12:50 -06:00
*** empty log message ***
This commit is contained in:
@@ -5,7 +5,7 @@ cat
|
|||||||
S; VP; NP; V; N; D; P; PP;
|
S; VP; NP; V; N; D; P; PP;
|
||||||
|
|
||||||
fun
|
fun
|
||||||
cyclic : S -> S;
|
-- cyclic : S -> S;
|
||||||
mkS : NP -> VP -> S;
|
mkS : NP -> VP -> S;
|
||||||
mkVP : V -> NP -> VP;
|
mkVP : V -> NP -> VP;
|
||||||
mkNP1 : D -> N -> NP;
|
mkNP1 : D -> N -> NP;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ PP = {s : Str};
|
|||||||
P = {s : Str};
|
P = {s : Str};
|
||||||
|
|
||||||
lin
|
lin
|
||||||
cyclic x = x;
|
-- cyclic x = x;
|
||||||
mkS x y = {s = x.s ++ y.s};
|
mkS x y = {s = x.s ++ y.s};
|
||||||
mkVP x y = {s = x.s ++ y.s};
|
mkVP x y = {s = x.s ++ y.s};
|
||||||
mkNP1 x y = {s = x.s ! y.g ++ y.s ! x.n};
|
mkNP1 x y = {s = x.s ! y.g ++ y.s ! x.n};
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ concrete TestVars of TestVarsA = open TestVarsR in {
|
|||||||
lincat S = { s : Str };
|
lincat S = { s : Str };
|
||||||
lin
|
lin
|
||||||
--s = { s = variants { "a" ; "b" ; "c" } };
|
--s = { s = variants { "a" ; "b" ; "c" } };
|
||||||
e = { s = variants { "e" ; "f" } };
|
--e = { s = variants { "e" ; "f" } };
|
||||||
|
e = { s = "e" };
|
||||||
ee x = { s = x.s ++ x.s };
|
ee x = { s = x.s ++ x.s };
|
||||||
f = { s = "g" };
|
f = { s = "g" };
|
||||||
ff x = { s = "e" ++ x.s };
|
ff x = { s = "e" ++ x.s };
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ data ShellState = ShSt {
|
|||||||
canModules :: CanonGrammar , -- compiled abstracts and concretes
|
canModules :: CanonGrammar , -- compiled abstracts and concretes
|
||||||
srcModules :: G.SourceGrammar , -- saved resource modules
|
srcModules :: G.SourceGrammar , -- saved resource modules
|
||||||
cfs :: [(Ident,CF)] , -- context-free grammars
|
cfs :: [(Ident,CF)] , -- context-free grammars
|
||||||
pInfos :: Cnv.PInfo, -- peb 8/6
|
pInfos :: [(Ident,Cnv.PInfo)], -- peb 18/6
|
||||||
morphos :: [(Ident,Morpho)], -- morphologies
|
morphos :: [(Ident,Morpho)], -- morphologies
|
||||||
gloptions :: Options, -- global options
|
gloptions :: Options, -- global options
|
||||||
readFiles :: [(FilePath,ModTime)],-- files read
|
readFiles :: [(FilePath,ModTime)],-- files read
|
||||||
@@ -59,7 +59,7 @@ emptyShellState = ShSt {
|
|||||||
canModules = M.emptyMGrammar,
|
canModules = M.emptyMGrammar,
|
||||||
srcModules = M.emptyMGrammar,
|
srcModules = M.emptyMGrammar,
|
||||||
cfs = [],
|
cfs = [],
|
||||||
pInfos = Cnv.pInfo M.emptyMGrammar, -- peb 8/6
|
pInfos = [], -- peb 18/6
|
||||||
morphos = [],
|
morphos = [],
|
||||||
gloptions = noOptions,
|
gloptions = noOptions,
|
||||||
readFiles = [],
|
readFiles = [],
|
||||||
@@ -88,7 +88,7 @@ emptyStateGrammar = StGr {
|
|||||||
cncId = identC "#EMPTY", ---
|
cncId = identC "#EMPTY", ---
|
||||||
grammar = M.emptyMGrammar,
|
grammar = M.emptyMGrammar,
|
||||||
cf = emptyCF,
|
cf = emptyCF,
|
||||||
pInfo = Cnv.pInfo M.emptyMGrammar, -- peb 8/6
|
pInfo = Cnv.emptyPInfo, -- peb 18/6
|
||||||
morpho = emptyMorpho,
|
morpho = emptyMorpho,
|
||||||
loptions = noOptions
|
loptions = noOptions
|
||||||
}
|
}
|
||||||
@@ -129,7 +129,7 @@ updateShellState opts sh ((_,sgr,gr),rts) = do
|
|||||||
notInrts f = notElem f $ map fst rts
|
notInrts f = notElem f $ map fst rts
|
||||||
cfs <- mapM (canon2cf opts cgr) concrs --- would not need to update all...
|
cfs <- mapM (canon2cf opts cgr) concrs --- would not need to update all...
|
||||||
|
|
||||||
let pinfos = Cnv.pInfo gr -- peb 8/6
|
let pinfos = map (Cnv.pInfo cgr) concrs -- peb 18/6
|
||||||
|
|
||||||
let funs = funRulesOf cgr
|
let funs = funRulesOf cgr
|
||||||
let cats = allCatsOf cgr
|
let cats = allCatsOf cgr
|
||||||
@@ -148,7 +148,7 @@ updateShellState opts sh ((_,sgr,gr),rts) = do
|
|||||||
canModules = cgr,
|
canModules = cgr,
|
||||||
srcModules = src,
|
srcModules = src,
|
||||||
cfs = zip concrs cfs,
|
cfs = zip concrs cfs,
|
||||||
pInfos = pinfos, -- peb 8/6
|
pInfos = zip concrs pinfos, -- peb 8/6
|
||||||
morphos = zip concrs (map (mkMorpho cgr) concrs),
|
morphos = zip concrs (map (mkMorpho cgr) concrs),
|
||||||
gloptions = gloptions sh, --- opts, -- this would be command-line options
|
gloptions = gloptions sh, --- opts, -- this would be command-line options
|
||||||
readFiles = [ft | ft@(f,_) <- readFiles sh, notInrts f] ++ rts,
|
readFiles = [ft | ft@(f,_) <- readFiles sh, notInrts f] ++ rts,
|
||||||
@@ -250,7 +250,7 @@ stateGrammarOfLang st l = StGr {
|
|||||||
cncId = l,
|
cncId = l,
|
||||||
grammar = can,
|
grammar = can,
|
||||||
cf = maybe emptyCF id (lookup l (cfs st)),
|
cf = maybe emptyCF id (lookup l (cfs st)),
|
||||||
pInfo = pInfos st, -- peb 8/6
|
pInfo = maybe Cnv.emptyPInfo id (lookup l (pInfos st)), -- peb 18/6
|
||||||
morpho = maybe emptyMorpho id (lookup l (morphos st)),
|
morpho = maybe emptyMorpho id (lookup l (morphos st)),
|
||||||
loptions = errVal noOptions $ lookupOptionsCan can
|
loptions = errVal noOptions $ lookupOptionsCan can
|
||||||
}
|
}
|
||||||
@@ -280,7 +280,7 @@ stateAbstractGrammar st = StGr {
|
|||||||
cncId = identC "#Cnc", ---
|
cncId = identC "#Cnc", ---
|
||||||
grammar = canModules st, ---- only abstarct ones
|
grammar = canModules st, ---- only abstarct ones
|
||||||
cf = emptyCF,
|
cf = emptyCF,
|
||||||
pInfo = Cnv.pInfo (canModules st), -- peb 8/6
|
pInfo = Cnv.emptyPInfo, -- peb 18/6
|
||||||
morpho = emptyMorpho,
|
morpho = emptyMorpho,
|
||||||
loptions = gloptions st ----
|
loptions = gloptions st ----
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ lookupAbsDef gr m c = errIn ("looking up absdef of" +++ prt c) $ do
|
|||||||
_ -> Bad $ prt m +++ "is not an abstract module"
|
_ -> Bad $ prt m +++ "is not an abstract module"
|
||||||
|
|
||||||
lookupFunType :: GFCGrammar -> Ident -> Ident -> Err Type
|
lookupFunType :: GFCGrammar -> Ident -> Ident -> Err Type
|
||||||
lookupFunType gr m c = errIn ("looking up funtype of" +++ prt c) $ do
|
lookupFunType gr m c = errIn ("looking up funtype of" +++ prt c +++ "in module" +++ prt m) $ do
|
||||||
mi <- lookupModule gr m
|
mi <- lookupModule gr m
|
||||||
case mi of
|
case mi of
|
||||||
ModMod mo -> do
|
ModMod mo -> do
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ GHCFLAGS=-package lang -package util -fglasgow-exts
|
|||||||
GHCOPTFLAGS=-O -package lang -package util -fglasgow-exts
|
GHCOPTFLAGS=-O -package lang -package util -fglasgow-exts
|
||||||
GHCFUDFLAG=-package Fudgets
|
GHCFUDFLAG=-package Fudgets
|
||||||
|
|
||||||
HUGSINCLUDE =.:for-hugs:api:source:canonical:cf:grammar:infra:shell:useGrammar:compile:parsing:conversions:trace:
|
HUGSINCLUDE =.:for-hugs:api:source:canonical:cf:grammar:infra:shell:useGrammar:compile:newparsing:trace:
|
||||||
BASICINCLUDE =-iapi -icompile -igrammar -iinfra -ishell -isource -icanonical -iuseGrammar -icf -iparsing -iparsers -iconversions -inotrace
|
BASICINCLUDE =-iapi -icompile -igrammar -iinfra -ishell -isource -icanonical -iuseGrammar -icf -inewparsing -iparsers -inotrace
|
||||||
GHCINCLUDE =-ifor-ghc $(BASICINCLUDE)
|
GHCINCLUDE =-ifor-ghc $(BASICINCLUDE)
|
||||||
GHCINCLUDENOFUD=-ifor-ghc-nofud $(BASICINCLUDE)
|
GHCINCLUDENOFUD=-ifor-ghc-nofud $(BASICINCLUDE)
|
||||||
GHCINCLUDEGFT =-ifor-gft $(BASICINCLUDE)
|
GHCINCLUDEGFT =-ifor-gft $(BASICINCLUDE)
|
||||||
@@ -60,8 +60,4 @@ help:
|
|||||||
# added by peb:
|
# added by peb:
|
||||||
tracing:
|
tracing:
|
||||||
$(GHMAKE) $(GHCFLAGS) -itrace $(GHCINCLUDENOFUD) --make GF.hs -o gf2 ; strip gf2 ; mv gf2 ../bin/
|
$(GHMAKE) $(GHCFLAGS) -itrace $(GHCINCLUDENOFUD) --make GF.hs -o gf2 ; strip gf2 ; mv gf2 ../bin/
|
||||||
newparser:
|
|
||||||
$(GHMAKE) $(GHCFLAGS) -itrace -ifor-ghc-nofud -iapi -icompile -igrammar -iinfra -ishell -isource -icanonical -iuseGrammar -icf -inewparsing -iparsers --make GF.hs -o gf2 ; strip gf2 ; mv gf2 ../bin/
|
|
||||||
newhugs:
|
|
||||||
hugs -h10M -P.:for-hugs:api:source:canonical:cf:grammar:infra:shell:useGrammar:compile:newparsing:trace:
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user