mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
Finish type passing in val2lin, generalise projection case and pass FoodsFre testsuite.
This commit is contained in:
8
testsuite/lpgf/Projection.gf
Normal file
8
testsuite/lpgf/Projection.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
abstract Projection = {
|
||||
flags startcat = Comment ;
|
||||
cat
|
||||
Comment ; Item ;
|
||||
fun
|
||||
Pred : Item -> Comment ;
|
||||
Wine : Item ;
|
||||
}
|
||||
3
testsuite/lpgf/Projection.treebank
Normal file
3
testsuite/lpgf/Projection.treebank
Normal file
@@ -0,0 +1,3 @@
|
||||
Projection: Pred Wine
|
||||
ProjectionCnc: ce vin
|
||||
|
||||
1
testsuite/lpgf/Projection.trees
Normal file
1
testsuite/lpgf/Projection.trees
Normal file
@@ -0,0 +1 @@
|
||||
Pred Wine
|
||||
20
testsuite/lpgf/ProjectionCnc.gf
Normal file
20
testsuite/lpgf/ProjectionCnc.gf
Normal file
@@ -0,0 +1,20 @@
|
||||
concrete ProjectionCnc of Projection = {
|
||||
-- param Case = Nom | Acc ;
|
||||
|
||||
lincat
|
||||
Comment = {s : Str} ;
|
||||
Item = {
|
||||
-- s : Case => {comp : Str} ;
|
||||
nom : {comp: Str}
|
||||
} ;
|
||||
lin
|
||||
Wine = {
|
||||
-- s = table {
|
||||
-- Nom => {comp = "ce" ++ "vin"} ;
|
||||
-- Acc => {comp = "ce" ++ "vin"}
|
||||
-- } ;
|
||||
nom = {comp = "ce" ++ "vin"} ;
|
||||
} ;
|
||||
-- Pred item = { s = ((item.s)!Nom).comp } ;
|
||||
Pred item = { s = (item.nom).comp } ;
|
||||
}
|
||||
@@ -19,6 +19,8 @@ main = do
|
||||
doGrammar "Tables"
|
||||
doGrammar "Params"
|
||||
doGrammar "Pre"
|
||||
doGrammar "Projection"
|
||||
|
||||
doGrammar "Walking"
|
||||
doGrammar "Foods"
|
||||
-- doGrammar' "Foods" ["Fre"]
|
||||
|
||||
Reference in New Issue
Block a user