mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
15 lines
281 B
Plaintext
15 lines
281 B
Plaintext
concrete CalculatorP of Calculator = open Prelude in {
|
|
|
|
lincat
|
|
Exp = SS ;
|
|
lin
|
|
EPlus = infix "+" ;
|
|
EMinus = infix "-" ;
|
|
ETimes = infix "*" ;
|
|
EDiv = infix "/" ;
|
|
EInt i = i ;
|
|
oper
|
|
infix : Str -> SS -> SS -> SS = \f,x,y ->
|
|
ss ("(" ++ x.s ++ f ++ y.s ++ ")") ;
|
|
}
|