From b447cf1a047a6f6e1c4945e809bffa57c88a08af Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 13 Dec 2007 20:19:47 +0000 Subject: new GFCC concrete syntax in place everywhere --- src/GF/GFCC/API.hs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/GF/GFCC/API.hs') 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) -- cgit v1.2.3