forked from GitHub/gf-core
completely phrase based parser and support for pre {} in PMCFG
This commit is contained in:
@@ -129,7 +129,7 @@ lins2js p ls = JS.EArray [JS.EArray [sym2js s | s <- Array.elems (sequences p Ar
|
||||
sym2js :: FSymbol -> JS.Expr
|
||||
sym2js (FSymCat n l) = new "ArgProj" [JS.EInt n, JS.EInt l]
|
||||
sym2js (FSymLit n l) = new "ArgProj" [JS.EInt n, JS.EInt l]
|
||||
sym2js (FSymTok (KS t)) = new "Terminal" [JS.EStr t]
|
||||
sym2js (FSymKS [t]) = new "Terminal" [JS.EStr t]
|
||||
|
||||
new :: String -> [JS.Expr] -> JS.Expr
|
||||
new f xs = JS.ENew (JS.Ident f) xs
|
||||
|
||||
Reference in New Issue
Block a user