mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 11:19:32 -06:00
add the FCFG parser
This commit is contained in:
@@ -151,7 +151,7 @@ emptyStateGrammar = StGr {
|
||||
cf = emptyCF,
|
||||
mcfg = [],
|
||||
cfg = [],
|
||||
pInfo = Prs.buildPInfo [] [],
|
||||
pInfo = Prs.buildPInfo [] [] [],
|
||||
morpho = emptyMorpho,
|
||||
probs = emptyProbs,
|
||||
loptions = noOptions
|
||||
@@ -231,9 +231,9 @@ updateShellState opts ign mcnc sh ((_,sgr,gr),rts) = do
|
||||
let probss = [] -----
|
||||
|
||||
|
||||
let fromGFC = snd . snd . Cnv.convertGFC opts
|
||||
(mcfgs, cfgs) = unzip $ map (curry fromGFC cgr) concrs
|
||||
pInfos = zipWith Prs.buildPInfo mcfgs cfgs
|
||||
let fromGFC = snd . snd . Cnv.convertGFC opts
|
||||
(mcfgs, fcfgs, cfgs) = unzip3 $ map (curry fromGFC cgr) concrs
|
||||
pInfos = zipWith3 Prs.buildPInfo mcfgs fcfgs cfgs
|
||||
|
||||
let funs = funRulesOf cgr
|
||||
let cats = allCatsOf cgr
|
||||
@@ -362,7 +362,7 @@ stateGrammarOfLangOpt purg st0 l = StGr {
|
||||
cf = maybe emptyCF id (lookup l (cfs st)),
|
||||
mcfg = maybe [] id $ lookup l $ mcfgs st,
|
||||
cfg = maybe [] id $ lookup l $ cfgs st,
|
||||
pInfo = maybe (Prs.buildPInfo [] []) id $ lookup l $ pInfos st,
|
||||
pInfo = maybe (Prs.buildPInfo [] [] []) id $ lookup l $ pInfos st,
|
||||
morpho = maybe emptyMorpho id (lookup l (morphos st)),
|
||||
probs = maybe emptyProbs id (lookup l (probss st)),
|
||||
loptions = errVal noOptions $ lookupOptionsCan allCan
|
||||
@@ -404,7 +404,7 @@ stateAbstractGrammar st = StGr {
|
||||
cf = emptyCF,
|
||||
mcfg = [],
|
||||
cfg = [],
|
||||
pInfo = Prs.buildPInfo [] [],
|
||||
pInfo = Prs.buildPInfo [] [] [],
|
||||
morpho = emptyMorpho,
|
||||
probs = emptyProbs,
|
||||
loptions = gloptions st ----
|
||||
|
||||
Reference in New Issue
Block a user