mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-17 16:59:34 -06:00
two versions of semantics (the Logic version incomplete)
This commit is contained in:
38
examples/tutorial/semantics/BaseEng.gf
Normal file
38
examples/tutorial/semantics/BaseEng.gf
Normal file
@@ -0,0 +1,38 @@
|
||||
--# -path=.:prelude
|
||||
|
||||
concrete BaseEng of Base = open Prelude in {
|
||||
|
||||
flags lexer=literals ; unlexer=text ;
|
||||
|
||||
-- English concrete syntax; greatly simplified - just for demo purposes
|
||||
|
||||
lin
|
||||
PredAP = infixSS "is" ;
|
||||
|
||||
ComplA2 = cc2 ;
|
||||
|
||||
ModCN = cc2 ;
|
||||
|
||||
ConjS c = infixSS c.s ;
|
||||
ConjAP c = infixSS c.s ;
|
||||
ConjNP c = infixSS c.s ;
|
||||
|
||||
Every = prefixSS "every" ;
|
||||
Some = prefixSS "some" ;
|
||||
|
||||
And = ss "and" ;
|
||||
Or = ss "or" ;
|
||||
|
||||
UseInt n = n ;
|
||||
|
||||
Number = ss "number" ;
|
||||
|
||||
Even = ss "even" ;
|
||||
Odd = ss "odd" ;
|
||||
Prime = ss "prime" ;
|
||||
Equal = ss ("equal" ++ "to") ;
|
||||
Greater = ss ("greater" ++ "than") ;
|
||||
Smaller = ss ("smaller" ++ "than") ;
|
||||
Divisible = ss ("divisible" ++ "by") ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user