1
0
forked from GitHub/gf-core

Handle record tables, pass FoodSwe in testsuite

This commit is contained in:
John J. Camilleri
2021-02-12 23:51:16 +01:00
parent a12f58e7b0
commit 8cfaa69b6e
5 changed files with 60 additions and 32 deletions

View File

@@ -10,6 +10,6 @@ abstract Foods = {
Mod : Quality -> Kind -> Kind ;
Wine, Cheese, Fish, Pizza : Kind ;
Very : Quality -> Quality ;
Fresh, Warm, Italian,
Fresh, Warm, Italian,
Expensive, Delicious, Boring : Quality ;
}

View File

@@ -1,6 +1,6 @@
-- (c) 2009 Aarne Ranta under LGPL
concrete FoodsSwe of Foods = FoodsI with
concrete FoodsSwe of Foods = FoodsI with
(Syntax = SyntaxSwe),
(LexFoods = LexFoodsSwe) ** {flags language = sv_SE;} ;

View File

@@ -15,10 +15,10 @@ dir = "testsuite" </> "lpgf"
main :: IO ()
main = do
doGrammar "Tables"
doGrammar "Params"
doGrammar "Walking"
doGrammar "Foods"
doGrammar "Tables"
doGrammar :: String -> IO ()
doGrammar gname = do
@@ -42,7 +42,7 @@ doGrammar gname = do
printf "%s: %s\n" gname ast
let
Just tree = readExpr ast
-- Do some linearization
-- Do some linearization
langs =
[ printf "%s: %s" (showLanguage lang) (linearizeConcr concr tree)
| (lang,concr) <- Map.toList (concretes lpgf)