mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-29 22:42:52 -06:00
now the linearization is completely based on PMCFG
This commit is contained in:
@@ -90,7 +90,7 @@ children = JS.Ident "cs"
|
||||
|
||||
-- Parser
|
||||
parser2js :: ParserInfo -> [JS.Expr]
|
||||
parser2js p = [new "Parser" [JS.EObj $ [JS.Prop (JS.IntPropName cat) (JS.EArray (map frule2js (Set.toList set))) | (cat,set) <- IntMap.toList (productions0 p)],
|
||||
parser2js p = [new "Parser" [JS.EObj $ [JS.Prop (JS.IntPropName cat) (JS.EArray (map frule2js (Set.toList set))) | (cat,set) <- IntMap.toList (productions p)],
|
||||
JS.EArray $ (map ffun2js (Array.elems (functions p))),
|
||||
JS.EArray $ (map seq2js (Array.elems (sequences p))),
|
||||
JS.EObj $ map cats (Map.assocs (startCats p)),
|
||||
|
||||
Reference in New Issue
Block a user