started a subdir for the book

This commit is contained in:
aarne
2010-11-22 12:55:37 +00:00
parent 8ab5ec00c6
commit 46137ab6a6
97 changed files with 2026 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
concrete CalculatorJ of Calculator = open Prelude in {
lincat
Exp = SS ;
lin
EPlus = postfix "iadd" ;
EMinus = postfix "isub" ;
ETimes = postfix "imul" ;
EDiv = postfix "idiv" ;
EInt i = ss ("ldc" ++ i.s) ;
oper
postfix : Str -> SS -> SS -> SS = \op,x,y ->
ss (x.s ++ ";" ++ y.s ++ ";" ++ op) ;
}