mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
English Base implementation with functor
This commit is contained in:
8
examples/tutorial/semantics/BaseIEng.gf
Normal file
8
examples/tutorial/semantics/BaseIEng.gf
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
--# -path=.:prelude:present:api:mathematical
|
||||||
|
|
||||||
|
concrete BaseIEng of Base = BaseI with
|
||||||
|
(Syntax = SyntaxEng),
|
||||||
|
(Grammar = GrammarEng),
|
||||||
|
(G = GrammarEng),
|
||||||
|
(Symbolic = SymbolicEng),
|
||||||
|
(LexBase = LexBaseEng) ;
|
||||||
17
examples/tutorial/semantics/LexBaseEng.gf
Normal file
17
examples/tutorial/semantics/LexBaseEng.gf
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
instance LexBaseEng of LexBase = open SyntaxEng, ParadigmsEng in {
|
||||||
|
|
||||||
|
oper
|
||||||
|
even_A = mkA "even" ;
|
||||||
|
odd_A = mkA "odd" ;
|
||||||
|
prime_A = mkA "prime" ;
|
||||||
|
equal_A2 = mkA2 (mkA "equal") (mkPrep "to") ;
|
||||||
|
greater_A2 = mkA2 (mkA "greater") (mkPrep "than") ; ---
|
||||||
|
smaller_A2 = mkA2 (mkA "smaller") (mkPrep "than") ; ---
|
||||||
|
divisible_A2 = mkA2 (mkA "divisible") (mkPrep "by") ;
|
||||||
|
number_N = mkN "number" ;
|
||||||
|
sum_N2 = mkN2 (mkN "sum") (mkPrep "of") ;
|
||||||
|
-- product_N2 : N2 ;
|
||||||
|
-- gcd_N2 : N2 ;
|
||||||
|
|
||||||
|
-- noSg_Det : Det ;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user