diff options
| author | krasimir <krasimir@chalmers.se> | 2008-06-19 12:48:29 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2008-06-19 12:48:29 +0000 |
| commit | 4dd62417dc64609e0c37633fbbba52e82c221b2e (patch) | |
| tree | ba6404c44f7f681c40a7dea5521243f0ede9c752 /src-3.0/PGF/Parsing/FCFG/Utilities.hs | |
| parent | 944eea8de9e077d1b3ee1a9edad9c52e9dbc2bd0 (diff) | |
split the Exp type to Tree and Expr
Diffstat (limited to 'src-3.0/PGF/Parsing/FCFG/Utilities.hs')
| -rw-r--r-- | src-3.0/PGF/Parsing/FCFG/Utilities.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src-3.0/PGF/Parsing/FCFG/Utilities.hs b/src-3.0/PGF/Parsing/FCFG/Utilities.hs index e435c6154..4187d0f24 100644 --- a/src-3.0/PGF/Parsing/FCFG/Utilities.hs +++ b/src-3.0/PGF/Parsing/FCFG/Utilities.hs @@ -179,9 +179,9 @@ applyProfileToForest (FFloat f) = [FFloat f] applyProfileToForest (FMeta) = [FMeta] -forest2exps :: SyntaxForest CId -> [Exp] -forest2exps (FNode n forests) = map (EApp n) $ forests >>= mapM forest2exps -forest2exps (FString s) = [EStr s] -forest2exps (FInt n) = [EInt n] -forest2exps (FFloat f) = [EFloat f] -forest2exps (FMeta) = [EMeta 0] +forest2trees :: SyntaxForest CId -> [Tree] +forest2trees (FNode n forests) = map (Fun n) $ forests >>= mapM forest2trees +forest2trees (FString s) = [Lit (LStr s)] +forest2trees (FInt n) = [Lit (LInt n)] +forest2trees (FFloat f) = [Lit (LFlt f)] +forest2trees (FMeta) = [Meta 0] |
