mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-12 04:32:50 -06:00
made -fcfg default parser; added lexer textvars
This commit is contained in:
@@ -21,6 +21,7 @@ module GF.Grammar.LookAbs (GFCGrammar,
|
||||
lookupRef,
|
||||
refsForType,
|
||||
funRulesOf,
|
||||
hasHOAS,
|
||||
allCatsOf,
|
||||
allBindCatsOf,
|
||||
funsForType,
|
||||
@@ -130,6 +131,10 @@ funRulesOf gr =
|
||||
mtype m == MTAbstract,
|
||||
(f, C.AbsFun typ _) <- tree2list (jments m)]
|
||||
|
||||
-- testing for higher-order abstract syntax
|
||||
hasHOAS :: GFCGrammar -> Bool
|
||||
hasHOAS gr = any isHigherOrderType [t | (_,t) <- funRulesOf gr] where
|
||||
|
||||
allCatsOf :: GFCGrammar -> [(Cat,Context)]
|
||||
allCatsOf gr =
|
||||
[((i,c),cont) | (i, ModMod m) <- modules gr,
|
||||
|
||||
Reference in New Issue
Block a user