diff options
| author | krasimir <krasimir@chalmers.se> | 2008-05-29 11:43:28 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2008-05-29 11:43:28 +0000 |
| commit | 363ddd7b916a48f86f1520350097f83175a0debf (patch) | |
| tree | 55c3dbc6cb3d80e8e0d4d72c93e988d937607678 /src-3.0/GF/GFCC | |
| parent | 4d1809ef2d824eb6e80fc1bf1d0f5e0aaf23ec16 (diff) | |
simplify FSymbol type
Diffstat (limited to 'src-3.0/GF/GFCC')
| -rw-r--r-- | src-3.0/GF/GFCC/GFCCtoJS.hs | 2 | ||||
| -rw-r--r-- | src-3.0/GF/GFCC/Raw/ConvertGFCC.hs | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src-3.0/GF/GFCC/GFCCtoJS.hs b/src-3.0/GF/GFCC/GFCCtoJS.hs index abf7e45a9..e55655796 100644 --- a/src-3.0/GF/GFCC/GFCCtoJS.hs +++ b/src-3.0/GF/GFCC/GFCCtoJS.hs @@ -113,7 +113,7 @@ lins2js :: Array FIndex (Array FPointPos FSymbol) -> JS.Expr lins2js ls = JS.EArray [ JS.EArray [ sym2js s | s <- Array.elems l] | l <- Array.elems ls] sym2js :: FSymbol -> JS.Expr -sym2js (FSymCat _ l n) = new "ArgProj" [JS.EInt n, JS.EInt l] +sym2js (FSymCat l n) = new "ArgProj" [JS.EInt n, JS.EInt l] sym2js (FSymTok t) = new "Terminal" [JS.EStr t] new :: String -> [JS.Expr] -> JS.Expr diff --git a/src-3.0/GF/GFCC/Raw/ConvertGFCC.hs b/src-3.0/GF/GFCC/Raw/ConvertGFCC.hs index 324f8be04..cebc06a31 100644 --- a/src-3.0/GF/GFCC/Raw/ConvertGFCC.hs +++ b/src-3.0/GF/GFCC/Raw/ConvertGFCC.hs @@ -5,7 +5,6 @@ import GF.GFCC.DataGFCC import GF.GFCC.Raw.AbsGFCCRaw import GF.Infra.PrintClass -import GF.Data.Assoc import GF.Formalism.FCFG import GF.Formalism.Utilities import GF.Parsing.FCFG.PInfo (FCFPInfo(..), buildFCFPInfo) @@ -95,7 +94,7 @@ toFName (App f ts) = (mkCId f, lmap toProfile ts) toProfile (App "_U" ts) = [expToInt t | App "_A" [t] <- ts] toSymbol :: RExp -> FSymbol -toSymbol (App "P" [c,n,l]) = FSymCat (expToInt c) (expToInt l) (expToInt n) +toSymbol (App "P" [n,l]) = FSymCat (expToInt l) (expToInt n) toSymbol (AStr t) = FSymTok t toType :: RExp -> Type @@ -231,7 +230,7 @@ fromFName (f,ps) | f == wildCId = fromProfile (head ps) daughter n = App "_A" [intToExp n] fromSymbol :: FSymbol -> RExp -fromSymbol (FSymCat c l n) = App "P" [intToExp c, intToExp n, intToExp l] +fromSymbol (FSymCat l n) = App "P" [intToExp n, intToExp l] fromSymbol (FSymTok t) = AStr t -- ** Utilities |
