summaryrefslogtreecommitdiff
path: root/src/GF/Parsing/FCFG
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2008-01-03 17:10:05 +0000
committerbringert <bringert@cs.chalmers.se>2008-01-03 17:10:05 +0000
commitaf1a3a2473747942dcec647a42e5724fcb21d1b9 (patch)
treee08020dce28ad35a5434328e6483ec695693fc20 /src/GF/Parsing/FCFG
parent43ddb41d314e7d547fa8f8bb1cd23397dfa30f65 (diff)
Store FCFPInfo (all information needed for FCFG parsing) in GFCC files, and in the internal DataGFCC.GFCC structure. The parsing information format is still in flux.
Diffstat (limited to 'src/GF/Parsing/FCFG')
-rw-r--r--src/GF/Parsing/FCFG/PInfo.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/GF/Parsing/FCFG/PInfo.hs b/src/GF/Parsing/FCFG/PInfo.hs
index bf2859911..8b288f2f1 100644
--- a/src/GF/Parsing/FCFG/PInfo.hs
+++ b/src/GF/Parsing/FCFG/PInfo.hs
@@ -99,6 +99,9 @@ buildFCFPInfo (grammar,startup) = -- trace (unlines [prt (x,Set.toList set) | (x
grammarcats = aElems topdownrules
grammartoks = nubsort [t | (FRule _ _ _ lins) <- grammar, lin <- elems lins, FSymTok t <- elems lin]
+fcfPInfoToFGrammar :: FCFPInfo -> FGrammar
+fcfPInfoToFGrammar pinfo = (elems (allRules pinfo), startupCats pinfo)
+
----------------------------------------------------------------------
-- pretty-printing of statistics