summaryrefslogtreecommitdiff
path: root/examples/tutorial/old/semantics/Top.hs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tutorial/old/semantics/Top.hs')
-rw-r--r--examples/tutorial/old/semantics/Top.hs23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/tutorial/old/semantics/Top.hs b/examples/tutorial/old/semantics/Top.hs
new file mode 100644
index 000000000..51d5fbb99
--- /dev/null
+++ b/examples/tutorial/old/semantics/Top.hs
@@ -0,0 +1,23 @@
+module Main where
+
+import Base
+import SemBase
+import Logic
+import PGF
+
+main :: IO ()
+main = do
+ gr <- file2grammar "Base.pgf"
+ loop gr
+
+loop :: PGF -> IO ()
+loop gr = do
+ s <- getLine
+ let t:_ = parse gr "BaseEng" "S" s
+ putStrLn $ showTree t
+ let p = iS $ fg t
+ putStrLn $ show p
+ let v = valProp exModel [] p
+ putStrLn $ show v
+ loop gr
+