diff options
| author | krasimir <krasimir@chalmers.se> | 2009-09-08 08:40:28 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-09-08 08:40:28 +0000 |
| commit | 28a7c4b5c7659dc18166e06e914fb0a81c1c43bc (patch) | |
| tree | 3d4a866f0fe37d8b45230581c44f459d7ac16e3d /src/PGF/Parsing/FCFG/Active.hs | |
| parent | 9940c44259fe3ee4501e324b4d1816a50d77fa37 (diff) | |
now the datatype Tree is only internal. All API functions are working with Expr directly. Commands gt, gr, p and rf filter out the output via the typechecker
Diffstat (limited to 'src/PGF/Parsing/FCFG/Active.hs')
| -rw-r--r-- | src/PGF/Parsing/FCFG/Active.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/PGF/Parsing/FCFG/Active.hs b/src/PGF/Parsing/FCFG/Active.hs index 07fa1ba4f..e88926f6e 100644 --- a/src/PGF/Parsing/FCFG/Active.hs +++ b/src/PGF/Parsing/FCFG/Active.hs @@ -16,6 +16,7 @@ import qualified GF.Data.MultiMap as MM import PGF.CId import PGF.Data +import PGF.Tree import PGF.Parsing.FCFG.Utilities import PGF.BuildParser @@ -37,8 +38,8 @@ makeFinalEdge cat 0 0 = (cat, [EmptyRange]) makeFinalEdge cat i j = (cat, [makeRange i j]) -- | the list of categories = possible starting categories -parse :: String -> ParserInfo -> Type -> [FToken] -> [Tree] -parse strategy pinfo (DTyp _ start _) toks = nubsort $ filteredForests >>= forest2trees +parse :: String -> ParserInfo -> Type -> [FToken] -> [Expr] +parse strategy pinfo (DTyp _ start _) toks = map (tree2expr) . nubsort $ filteredForests >>= forest2trees where inTokens = input toks starts = Map.findWithDefault [] start (startCats pinfo) |
