mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
parsing method in EmbedAPI
This commit is contained in:
@@ -31,7 +31,7 @@ import GF.Infra.Modules (emptyMGrammar)
|
|||||||
import GF.CF.CFIdent (string2CFCat)
|
import GF.CF.CFIdent (string2CFCat)
|
||||||
import GF.Infra.UseIO
|
import GF.Infra.UseIO
|
||||||
import GF.Data.Operations
|
import GF.Data.Operations
|
||||||
import GF.Infra.Option (noOptions,useUntokenizer)
|
import GF.Infra.Option (noOptions,useUntokenizer,options,iOpt)
|
||||||
import GF.Infra.Ident (prIdent)
|
import GF.Infra.Ident (prIdent)
|
||||||
import GF.Embed.EmbedCustom
|
import GF.Embed.EmbedCustom
|
||||||
|
|
||||||
@@ -68,7 +68,8 @@ categories :: MultiGrammar -> [Category]
|
|||||||
|
|
||||||
file2grammar file = do
|
file2grammar file = do
|
||||||
can <- useIOE (error "cannot parse grammar file") $ getCanonGrammar file
|
can <- useIOE (error "cannot parse grammar file") $ getCanonGrammar file
|
||||||
return $ errVal (error "cannot build multigrammar") $ grammar2shellState noOptions (can,emptyMGrammar)
|
return $ errVal (error "cannot build multigrammar") $
|
||||||
|
grammar2shellState (options [iOpt "docf"]) (can,emptyMGrammar)
|
||||||
|
|
||||||
linearize mgr lang =
|
linearize mgr lang =
|
||||||
untok .
|
untok .
|
||||||
|
|||||||
Reference in New Issue
Block a user