mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-01 23:32:51 -06:00
gf-book web page index and toc
This commit is contained in:
11
gf-book/examples/chapter8/CalculatorS.gf
Normal file
11
gf-book/examples/chapter8/CalculatorS.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
concrete CalculatorS of Calculator = open Prelude in {
|
||||
lin
|
||||
EPlus = infix "plus" ;
|
||||
EMinus = infix "minus" ;
|
||||
ETimes = infix "times" ;
|
||||
EDiv = infix ["divided by"] ;
|
||||
EInt i = i ;
|
||||
oper
|
||||
infix : Str -> SS -> SS -> SS = \op,x,y ->
|
||||
ss (x.s ++ op ++ y.s ++ "PAUSE") ;
|
||||
}
|
||||
Reference in New Issue
Block a user