mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-17 00:39:32 -06:00
two versions of semantics (the Logic version incomplete)
This commit is contained in:
20
examples/tutorial/semantics/Answer.hs
Normal file
20
examples/tutorial/semantics/Answer.hs
Normal file
@@ -0,0 +1,20 @@
|
||||
module Main where
|
||||
|
||||
import GSyntax
|
||||
import AnswerBase
|
||||
import GF.GFCC.API
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
gr <- file2grammar "base.gfcc"
|
||||
loop gr
|
||||
|
||||
loop :: MultiGrammar -> IO ()
|
||||
loop gr = do
|
||||
s <- getLine
|
||||
let t:_ = parse gr "BaseEng" "S" s
|
||||
putStrLn $ showTree t
|
||||
let p = iS $ fg t
|
||||
putStrLn $ show p
|
||||
loop gr
|
||||
|
||||
Reference in New Issue
Block a user