diff options
| author | aarne <aarne@cs.chalmers.se> | 2007-12-13 20:19:47 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2007-12-13 20:19:47 +0000 |
| commit | b447cf1a047a6f6e1c4945e809bffa57c88a08af (patch) | |
| tree | 4b6792997f34b764796a8b787b3e8a9638c6ff49 /src/GF/GFCC/API.hs | |
| parent | a311dda5392ac1d019bc4f60bd94b37df01a1411 (diff) | |
new GFCC concrete syntax in place everywhere
Diffstat (limited to 'src/GF/GFCC/API.hs')
| -rw-r--r-- | src/GF/GFCC/API.hs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/GF/GFCC/API.hs b/src/GF/GFCC/API.hs index 093d13b97..bf795d91b 100644 --- a/src/GF/GFCC/API.hs +++ b/src/GF/GFCC/API.hs @@ -19,8 +19,9 @@ import GF.GFCC.Linearize import GF.GFCC.Generate import GF.GFCC.Macros import GF.GFCC.DataGFCC -import GF.GFCC.AbsGFCC -import GF.GFCC.ParGFCC +import GF.GFCC.Raw.AbsGFCCRaw (CId (..)) +import GF.GFCC.Raw.ConvertGFCC +import GF.GFCC.Raw.ParGFCCRaw import GF.Command.PPrTree import GF.GFCC.ErrM @@ -81,8 +82,10 @@ file2grammar f = do gfcc2parsers gfcc = [(lang, buildFCFPInfo fcfg) | (CId lang,fcfg) <- convertGrammar gfcc] -file2gfcc f = - readFileIf f >>= err (error) (return . mkGFCC) . pGrammar . myLexer +file2gfcc f = do + s <- readFileIf f + g <- parseGrammar s + return $ toGFCC g linearize mgr lang = GF.GFCC.Linearize.linearize (gfcc mgr) (CId lang) |
