Finish type passing in val2lin, generalise projection case and pass FoodsFre testsuite.

This commit is contained in:
John J. Camilleri
2021-02-16 21:07:24 +01:00
parent 4c06c3f825
commit 2d03b9ee0c
6 changed files with 55 additions and 26 deletions

View File

@@ -0,0 +1,8 @@
abstract Projection = {
flags startcat = Comment ;
cat
Comment ; Item ;
fun
Pred : Item -> Comment ;
Wine : Item ;
}

View File

@@ -0,0 +1,3 @@
Projection: Pred Wine
ProjectionCnc: ce vin

View File

@@ -0,0 +1 @@
Pred Wine

View 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 } ;
}

View File

@@ -19,6 +19,8 @@ main = do
doGrammar "Tables"
doGrammar "Params"
doGrammar "Pre"
doGrammar "Projection"
doGrammar "Walking"
doGrammar "Foods"
-- doGrammar' "Foods" ["Fre"]